29 September 2010

How to Use Temporary tables in reports

Ex:1 Report with datasource added
//Take a Report and Add a Table.
//Make sure that Table Properties set as "Temporary: YES" or
//In Report init method write this code "Tmtab.setTmp();" to make tamp
//Write the following code in the report Fetch Method

public boolean fetch()
{
str acc;

boolean ret;
// ret = super();
while select custTable
{
Tmtab_1.CustAccount = custTable.AccountNum;
Tmtab_1.doInsert();
this.send(Tmtab_1);
}
return true;
}
Ex:2 Report without Datasource
Step:1
Write the below code in fetch method
public boolean fetch()
{
str acc;

boolean ret;
// ret = super();
while select custTable
{
Tmtab.CustAccount = custTable.AccountNum;
Tmtab.doInsert();
//this.send(Tmtab);
element.execute(1);
}
return true;
}
Step:2
Create a display method and return the field value
//BP Deviation Documented
display CustAccount acc()
{
return Tmtab.CustAccount;
}

No comments:

Post a Comment

Give me the commetns and solutions

Ledger Voucher creation Framework and x++ code to create ledger voucher

 Please click her for MS reference file Below is the out of the box example reference and code. SalesInvoiceJournalPostSubBill_Extension->...