It's a bug.
The tempDBTableNamesMap variable was not initialised in \Classes\SrsReportProviderQueryBuilder\initializePreProcessedDetails for preview mode.
I fixed this issue for Dax 2012 R3 CU13
You need to customize
\Classes\SrsReportProviderQueryBuilder\initializePreProcessedDetails
private void initializePreProcessedDetails()
{
#SRSFramework
RecId preProcessedRecId;
str preProcessedRecIdStr;
Container tempDBTableNames;
int idx, size;
// if pre-processed report, get the table record here
if(reportProviderMetadata.isPreProcessingRegular() || reportProviderMetadata.isPreProcessingTempDB())
{
// If running in preview mode, get the details table without the RecId
// Find by name for the RDP name, inPreviewMode, this will provide the record from the previous run to ensure we clean it up.
if(isPreviewMode)
{
// this can be empty if no record exists for previous run of previewMode.
preProcessedDetails = SrsReportPreProcessedDetails::findByName(reportProviderName, true);
// JEV005559, PKoz 27.11.2020 -->
/*
(S)\Classes\SrsReportProviderQueryBuilder\addTempDBCursorToQueryRun - line 18
(S)\Classes\SrsReportProviderQueryBuilder\getQueryRun - line 28
(S)\Jobs\
. SrsRevenueReport_MRC.ChartDesign [Preview] 0 0
*/
if (!tempDBTableNamesMap)
{
tempDBTableNames = preProcessedDetails.TempDBNames;
size = conLen(tempDBTableNames);
// if preprocessing is of TempDB type, and container size less than 2, then something went wrong..error out
if(reportProviderMetadata.isPreProcessingTempDB())
{
if(size < 2)
{
throw error(strFmt("@SYS4007195", preProcessedRecIdStr));
}
else
{
tempDBTableNamesMap = new Map(Types::String, Types::String);
for(idx = 1; idx <= size ; idx+=2)
{
// AOT TempDBName, SQL tempDB name
tempDBTableNamesMap.insert(conPeek(tempDBTableNames, idx), conPeek(tempDBTableNames, idx+1));
}
}
}
}
// JEV005559, PKoz 27.11.2020 <--
}
else
{
// get the pre-processed details table record.
if(reportProviderParameters.exists(#RdpPreProcessedIdParameter))
{
preProcessedRecIdStr = reportProviderParameters.lookup(#RdpPreProcessedIdParameter);
preProcessedRecId = str2int64(preProcessedRecIdStr);
preProcessedDetails = SrsReportPreProcessedDetails::findByRecId(preProcessedRecId, reportProviderName);
tempDBTableNames = preProcessedDetails.TempDBNames;
size = conLen(tempDBTableNames);
// if preprocessing is of TempDB type, and container size less than 2, then something went wrong..error out
if(reportProviderMetadata.isPreProcessingTempDB())
{
if(size < 2)
{
throw error(strFmt("@SYS4007195", preProcessedRecIdStr));
}
else
{
tempDBTableNamesMap = new Map(Types::String, Types::String);
for(idx = 1; idx <= size ; idx+=2)
{
// AOT TempDBName, SQL tempDB name
tempDBTableNamesMap.insert(conPeek(tempDBTableNames, idx), conPeek(tempDBTableNames, idx+1));
}
}
}
}
else
{
throw error("@SYS334989");
}
}
}
}