I want to display the data for a report in a form instead. My idea was to call the processReport method of the report data provider class to populate the report's temp table:
ITMTmpCostReportTable tmp;
ITMCostingRepCatReportDP icrc=new ITMCostingRepCatReportDP();
icrc.processReport();
I would bind the form's data source to the temp table, which I am expecting to have the same data as if I ran the report. However, I get a run time error:
public class ITMCostingReportDP extends SrsReportDataProviderPreProcessTempDB
{
public void processReport()
{
Query query;
QueryRun queryRun;
// 'The setConnection function was called with an invalid argument.'
tmpShipCostReportTable.setConnection(this.parmUserConnection());
// ...
}
this = SrsReportDataProviderPreProcessTempDB and parmUserConnection is defined as
public abstract class SrsReportDataProviderPreProcessTempDB extends SRSReportDataProviderBase implements SrsReportDataProviderPreProcessInterface
{
UserConnection uc;
// ...
public UserConnection parmUserConnection(UserConnection _userConnection = uc)
{
uc = _userConnection;
return uc;
}
// ...
}
1. How do I initialise the user connection?
2. If I get past that, is this approach feasible? Can I use a report data provider class in this way?
Categories: