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");
  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:

wj9v20.png

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

  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    This is not possible when running classic reports in RTC
  • 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.... :)
  • MBergerMBerger Member Posts: 413
    As a workaround you could make a table to hold your global values, and read that table from the report.
  • 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.