SetGlobals function in report

gbierkensgbierkens Member Posts: 49
edited 2015-05-06 in NAV Three Tier
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");

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.


  • Options
    Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    This is not possible when running classic reports in RTC
  • Options
    gbierkensgbierkens Member Posts: 49
    Okay thnx.

    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.... :)
  • Options
    MBergerMBerger Member Posts: 413
    As a workaround you could make a table to hold your global values, and read that table from the report.
  • Options
    gbierkensgbierkens Member Posts: 49
    I allready have that table.
    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()".
Sign In or Register to comment.