Skip to main content

Notifications

Announcements

No record found.

Understanding getTableTmp method in X++

We use the getTableTmp method in SSRS report development. This method includes a select query for the temp table and returns the temp table buffer. It should be noted that the buffer temp table buffer is not declared as a local variable within the method. TempTable is declared as an instance variable in the class declaration and can be accessed through any of the class's methods. Use the same table variable throughout the class to populate the values.

Public class CustAgingReportDP extends SRSReportDataProviderPreProcessTempDB
{
	TableTmp		tableTmp;
	
	
	
    [
    SRSReportDataSetAttribute(TableTmp)
    ]
    Public TableTmp getTableTmp()
    {
    	select * from tableTmp;
    	return tableTmp;
    }
}

In report design, methods with the SRSReportDataSetAttribute in the class provide the query written within those methods. As a result, the buffer used in gettemptable will only be populated with the report design.

Any other local or instance variables declared for the temp table will be overlooked by the report designer.

pastedimage1678003024460v1.png

Comments

*This post is locked for comments