Hi I do have a report with a range set in controller (with setRange-Methode)
In the Dataprovider where I try to fill my temptables for report printing the range set in the controller disappeared.
*This post is locked for comments
Hi I do have a report with a range set in controller (with setRange-Methode)
In the Dataprovider where I try to fill my temptables for report printing the range set in the controller disappeared.
*This post is locked for comments
The first thing to debug is your setRange() method. Is the condition met and the range added?
When this is verified, you can continue debugging to find out where things goes wrong.
Also, you shouldn't call prompt() and run() directly - use startOperation() instead. Now you're skipping a lot of logic, including the call of prePromptModifyContract(), where logic like yours is often placed.
public void setRange(Args _args, Query _query) { QueryBuildDataSource qbds; QueryBuildRange qbr; JournalId journalNum; LedgerJournalTrans ledgerJournalTrans; LedgerJournalTable ledgerJournalTable; if (_args && _args.dataset()) { switch(_args.dataset()) { case tablenum(LedgerJournalTrans) : ledgerJournalTrans = _args.record() as LedgerJournalTrans; journalNum = ledgerJournalTrans.JournalNum; break; case tablenum(LedgerJournalTable) : ledgerJournalTable = _args.record() as LedgerJournalTable; journalNum = ledgerJournalTable.JournalNum; break; } } if (journalNum != '') { qbds = _query.dataSourceTable(tablenum(GeneralJournalEntry)); qbr = qbds.findRange(fieldname2id(tablenum(GeneralJournalEntry),fieldstr(GeneralJournalEntry, JournalNumber))); if (!qbr) { qbr = qbds.addRange(fieldnum(GeneralJournalEntry, JournalNumber)); } qbr.value(journalNum); } }
public client static void main(Args _args) { CashbookController_GLD controller = new CashbookController_GLD(); controller.parmReportName(ssrsReportStr(CashbookGLD, Report)); controller.parmArgs(_args); controller.setRange(_args, controller.parmReportContract().parmQueryContracts().lookup(controller.getFirstQueryContractKey())); if (controller.prompt()) { controller.run(); } }
Maybe your implementation in the controller is incorrect. Either debug your code or show us what you've done; we can't find bugs in in unknown implementation.
I strongly recommend you start by debugging your code - it'll at least give you a better idea where the problem lies, which will increase your chance to solve it.
ok bit more specific.
In the controller I set a range to a journalid. when I come to the dataprovider and try to get my query the journalId range is missing
I reset all usage data and it is a new implemented report so no old data here
Can you b a bit more specific, please?
What did you find when you debugged your code before asking here?
Isn't it possible that you get an older version of the query from usage data? You can verify it either by debugging or simply resetting your usage data.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,235 Most Valuable Professional
nmaenpaa 101,156