Options

Run Report without using report variable.

s_vahagns_vahagn Member Posts: 19
I want run report from my form, but I don't want print it, I want preview.
DDE functions in Navision

Comments

  • Options
    NaviTools.comNaviTools.com Member Posts: 88
    You will get report window where you can select a preview.

    You can use 'REPORT.RUNMODAL' or <report variable>.RUNMODAL. Check help on these two options.
    http://www.NaviTools.com
    Documentation for Microsoft Navision
    E/R diagrams, Workflow diagrams, UML diagrams, process diagrams
  • Options
    Timo_LässerTimo_Lässer Member Posts: 481
    It is not possible to run a report in preview mode directly from C/AL.
    You have to show the request form.
    REPORT.RUNMODAL(ReportID,TRUE,FALSE,Record);
    // or
    Report4711.USEREQUESTFORM(TRUE);
    Report4711.RUNMODAL;
    
    If the report should never be printed, use following code in the OnPreReport section:
    IF NOT CurrReport.PREVIEW THEN
      ERROR('This Report must be started in Preview mode!');
    
    Note: If you choose "SaveAsHTML" or "SaveAsXML", CurrReport.PREVIEW will be true!
    Timo Lässer
    Microsoft Dynamics NAV Developer since 1997
    MSDynamics.de - German Microsoft Dynamics Community - member of [clip]
Sign In or Register to comment.