BF [ 2828886 ] Problem with reports from temporary tables

https://sourceforge.net/tracker/?func=detail&atid=879332&aid=2828886&group_id=176962
This commit is contained in:
teo_sarca 2009-07-29 10:13:46 +00:00
parent 16d414a1e7
commit 5cf51bd492
1 changed files with 8 additions and 1 deletions

View File

@ -97,6 +97,8 @@ import org.eevolution.model.X_PP_Order;
* @author Teo Sarca, www.arhipac.ro
* <li>BF [ 2828300 ] Error when printformat table differs from DOC_TABLES
* https://sourceforge.net/tracker/?func=detail&aid=2828300&group_id=176962&atid=879332
* <li>BF [ 2828886 ] Problem with reports from temporary tables
* https://sourceforge.net/tracker/?func=detail&atid=879332&aid=2828886&group_id=176962
*/
public class ReportEngine implements PrintServiceAttributeListener
{
@ -1096,10 +1098,15 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
// Create Query from Parameters
MQuery query = null;
if (IsForm && pi.getRecord_ID() != 0) // Form = one record
if (IsForm && pi.getRecord_ID() != 0 // Form = one record
&& !TableName.startsWith("T_") ) // Not temporary table - teo_sarca, BF [ 2828886 ]
{
query = MQuery.getEqualQuery(TableName + "_ID", pi.getRecord_ID());
}
else
{
query = MQuery.get (ctx, pi.getAD_PInstance_ID(), TableName);
}
// Add to static where clause from ReportView
if (whereClause.length() != 0)