SSRS report unusual behaviour ssrsReportDataProviderBaseDynamicsdyna

Hello,

I have an issue with “LedgerTransAccountVoucher” report, i have added a new field then a new range on it. when i change table to regular table and DP class to extend "SrsReportDataProviderPreProcess" (debugging purpose) the new range is applied and it works perfectly but when i back table to “inMemory” and class to " SSRSReportDataProviderBase" the range is no more applied.

Does anyone face this issue, please help.

Thanks in advance for your replies.

Best Regards

Mehdi

Where did you define the range?

In the processReport method in DP Class like this in many places but the same way :

tmpQuery = new Query(query.pack());

tmpQuery.dataSourceTable(tableNum(MainAccountLedgerDimensionView)).addSortField(fieldNum(MainAccountLedgerDimensionView, MainAccount));
tmpQuery.dataSourceTable(tableNum(GeneralJournalEntry)).addSortField(fieldNum(GeneralJournalEntry, AccountingDate));
tmpQuery.dataSourceTable(tableNum(GeneralJournalEntry)).addSortField(fieldNum(GeneralJournalEntry, SubledgerVoucher));
tmpQuery.dataSourceTable(tableNum(GeneralJournalEntry)).addSortField(fieldNum(GeneralJournalEntry, JournalNumber));

tmpQuery.dataSourceTable(tableNum(MainAccountLedgerDimensionView)).addRange(fieldNum(MainAccountLedgerDimensionView, MainAccount)).value(queryRange(tmpFromAccount, tmpToAccount));
tmpQuery.dataSourceTable(tableNum(GeneralJournalEntry)).addRange(fieldNum(GeneralJournalEntry, AccountingDate) ).value(queryRange(fromDate, toDate));
tmpQuery.dataSourceTable(tableNum(FiscalCalendarPeriod)).addRange(fieldNum(FiscalCalendarPeriod, Type)).value(queryRange(periodTypeFrom, periodTypeTo));
tmpQuery.dataSourceTable(tableNum(GeneralJournalAccountEntry)).addRange(fieldNum(GeneralJournalAccountEntry, AccountingCurrencyAmount )).value(’!0’);

// - Modif. 21/09/2020 by me- begin
tmpQuery.dataSourceTable(tableNum(GeneralJournalAccountEntry)).addRange(fieldNum(GeneralJournalAccountEntry, SpecificField)).value(specificValue);
// - Modif. 21/09/2020 by me- end

I defined the range on processReport method in DP class ln many places but same way like this code below :

tmpQuery = new Query(query.pack());

tmpQuery.dataSourceTable(tableNum(MainAccountLedgerDimensionView)).addSortField(fieldNum(MainAccountLedgerDimensionView, MainAccount));
tmpQuery.dataSourceTable(tableNum(GeneralJournalEntry)).addSortField(fieldNum(GeneralJournalEntry, AccountingDate));
tmpQuery.dataSourceTable(tableNum(GeneralJournalEntry)).addSortField(fieldNum(GeneralJournalEntry, SubledgerVoucher));
tmpQuery.dataSourceTable(tableNum(GeneralJournalEntry)).addSortField(fieldNum(GeneralJournalEntry, JournalNumber));

tmpQuery.dataSourceTable(tableNum(MainAccountLedgerDimensionView)).addRange(fieldNum(MainAccountLedgerDimensionView, MainAccount)).value(queryRange(tmpFromAccount, tmpToAccount));
tmpQuery.dataSourceTable(tableNum(GeneralJournalEntry)).addRange(fieldNum(GeneralJournalEntry, AccountingDate) ).value(queryRange(fromDate, toDate));
tmpQuery.dataSourceTable(tableNum(FiscalCalendarPeriod)).addRange(fieldNum(FiscalCalendarPeriod, Type)).value(queryRange(periodTypeFrom, periodTypeTo));
tmpQuery.dataSourceTable(tableNum(GeneralJournalAccountEntry)).addRange(fieldNum(GeneralJournalAccountEntry, AccountingCurrencyAmount )).value(’!0’);

// - Modif. 21/09/2020 by me- begin
tmpQuery.dataSourceTable(tableNum(GeneralJournalAccountEntry)).addRange(fieldNum(GeneralJournalAccountEntry, specificField)).value(specificValue);
// - Modif. 21/09/2020 by me- end

Thanks in advance.

Didn’t you forget to build CIL?
Did you try to debug your code? If so, what did you find? If not, well, it’s time to do it.

i did Cil many times, i restarted the AOS nothing work.

Yes i also tried to debug but to debug i have to change the in memory table to regular and change extension class and in this case it works fine, the range is applied but when i back to in memory table and “SSRSReportDataProviderBase” extend the range is not applied i change it many times and have the same result everytime.

No, you don’t have to change the type of table and the code to debug your code. On the contrary, it’s a wrong thing, as you see. You have a piece of code that you want to debug, but you change it and then you debug different code.

Why do you think such a thing is needed? Maybe you’re using a wrong debugger.

Thanks for reply, but how can we debug on ssrs without using "SrsReportDataProviderPreProcess" extension?

How are you trying to debug it and what problem do you have with it?

A general overview is in documentation: Debugging in Microsoft Dynamics AX 2012 > Reports.

I have already read this documentation but stil enable to debug, it did not stop on breakpoint, i debug it because of range, the range is not applied (juste to debug processreport method.Even when i have changed the table to “TempsDB”, it works. the problem is only when table is “InMemory”.

Could you please finally tell us which debugger are you using?

By the way, TempDB would require SRSReportDataProviderPreProcessTempDB instead of SRSReportDataProviderPreProcess.

Explain your way of Debugging please. Even though if you are using TempDB with SRSReportDataProviderPreProcessTempDB debugger not hitting?

Make sure you Load all symbols before debugging…