Skip to main content

One post tagged with "SRS"

View All Tags

No data is inserted/modified in temporary table when processing an SRS report using Pre-process

· 2 min read
Kome Hoang
Maintainer of Automaly

References

How to

Pre-process RDP has become very commonplace these days, especially to ones who work with SSRS reports on Dynamics 365 FO a lot.

Recently, I faced an issue when no data was inserted into or modififed in my temporary table during run-time despite the fact that RDP class (and its related ones within the same framework) was executed successfully. Even debugging did not show me what was going wrong. There was simply no SQL statements in the trace that I captured.

Turned out that I will need to take ownership of the temp table instance before manipulating any data in it.

My code used to be (when it did not work):

internal final class CSG_PostedServiveOrderWithoutInvDP extends SrsReportDataProviderPreProcessTempDB
{
CSG_PostedServiveOrderWithoutInvTmp tmpTable;

[SRSReportDataSetAttribute(tableStr(CSG_PostedServiveOrderWithoutInvTmp))]
public CSG_PostedServiveOrderWithoutInvTmp getTmpTable()
{
select tmpTable;
return tmpTable;
}

public void processReport()
{
ttsbegin;
this.populateTmpTable();
ttscommit;
}

private void populateTmpTable()
{
// Insert data to tmp table here.
}
}