In classic reports sometimes I added a global function "SetGlobals" which I used to preset certain variables.
Now I want to do something simular in NAV 2009 R2 RTC with a classic report.
lReport.SetGlobals("Some vars");
lReport.SETTABLEVIEW(record);
lReport.USEREQUESTFORM(TRUE);
lReport.RUN;
I want to use these globals in a requestform as default, but a user should be able to overwrite te defaults.
I know it's a bit quick and dirty, but in classic it used to work like a charm.
Now in RTC i'm getting the following error:
Does anyone have an alternative to fill the options tab of a classic report in RTC based on information that is present on the dataitem-record of the report.
Answers
I just created a RTC report and there the SetGlobals function still works.
So I guess it's time to roll up my sleeves and create a rdlc report layout....
The point is that users should be able to modify the default parameters before running the report.
And the defaults are based on the sales order line depending on the "item no." and the "variant code".
So the report doesn't "know" these variables untill "OnAfterGetRecord()".