Options

Running a Report

fazlehasanfazlehasan Member Posts: 62
edited 2021-10-29 in NAV Three Tier
Is it possible to run a report passing the report number (like in example 2), but before running the report passing some variables (like in example 1) to the report to use in the report (using Single Instance Codeunit is not an option).

Basically combining these 2 ways:

(1)

Variable MyReport: Report 50000

MyReport.setvalue(some decimal, some string, some date);
MyReport.run;

(2)
Report.Run(50000,true,true,rec);

Thanks

Best Answer

  • Options
    txerifftxeriff Member Posts: 492
    Answer ✓
    I dont think so.
    If you do report.run you cant pass anything.
    Is there any reason you cant declare a report variable?

    The only "workaround" I cant think of is assigning some values to the rec before doing report.run and then use them in "oninitreport/onprereport", like:

    Rec.isWhatever:=true;
    Report.Run(50000,true,true,rec);
    Oninitreport
    if isWhatEver then begin
    end;

Answers

  • Options
    txerifftxeriff Member Posts: 492
    Answer ✓
    I dont think so.
    If you do report.run you cant pass anything.
    Is there any reason you cant declare a report variable?

    The only "workaround" I cant think of is assigning some values to the rec before doing report.run and then use them in "oninitreport/onprereport", like:

    Rec.isWhatever:=true;
    Report.Run(50000,true,true,rec);
    Oninitreport
    if isWhatEver then begin
    end;
Sign In or Register to comment.