BF [ 1761891 ] Included print format with report view attached issue
http://sourceforge.net/tracker/index.php?func=detail&aid=1761891&group_id=176962&atid=879332
This commit is contained in:
parent
54a8771182
commit
5537e69a4e
|
@ -28,6 +28,8 @@ import org.compiere.util.*;
|
||||||
*
|
*
|
||||||
* @author Jorg Janke
|
* @author Jorg Janke
|
||||||
* @version $Id: DataEngine.java,v 1.3 2006/07/30 00:53:02 jjanke Exp $
|
* @version $Id: DataEngine.java,v 1.3 2006/07/30 00:53:02 jjanke Exp $
|
||||||
|
*
|
||||||
|
* @author Teo Sarca, SC ARHIPAC SERVICE SRL - BF [ 1761891 ]
|
||||||
*/
|
*/
|
||||||
public class DataEngine
|
public class DataEngine
|
||||||
{
|
{
|
||||||
|
@ -79,7 +81,7 @@ public class DataEngine
|
||||||
//
|
//
|
||||||
if (format.getAD_ReportView_ID() != 0)
|
if (format.getAD_ReportView_ID() != 0)
|
||||||
{
|
{
|
||||||
String sql = "SELECT t.AD_Table_ID, t.TableName, rv.Name "
|
String sql = "SELECT t.AD_Table_ID, t.TableName, rv.Name, rv.WhereClause "
|
||||||
+ "FROM AD_Table t"
|
+ "FROM AD_Table t"
|
||||||
+ " INNER JOIN AD_ReportView rv ON (t.AD_Table_ID=rv.AD_Table_ID) "
|
+ " INNER JOIN AD_ReportView rv ON (t.AD_Table_ID=rv.AD_Table_ID) "
|
||||||
+ "WHERE rv.AD_ReportView_ID=?"; // 1
|
+ "WHERE rv.AD_ReportView_ID=?"; // 1
|
||||||
|
@ -92,6 +94,10 @@ public class DataEngine
|
||||||
{
|
{
|
||||||
tableName = rs.getString(2); // TableName
|
tableName = rs.getString(2); // TableName
|
||||||
reportName = rs.getString(3);
|
reportName = rs.getString(3);
|
||||||
|
// Add WhereClause restriction from AD_ReportView - teo_sarca BF [ 1761891 ]
|
||||||
|
String whereClause = rs.getString(4);
|
||||||
|
if (!Util.isEmpty(whereClause))
|
||||||
|
query.addRestriction(whereClause);
|
||||||
}
|
}
|
||||||
rs.close();
|
rs.close();
|
||||||
pstmt.close();
|
pstmt.close();
|
||||||
|
|
Loading…
Reference in New Issue