[REPORTS] Dynamically setting the ProcessingOnly property

PaLPiTaTioNPaLPiTaTioN Member Posts: 55
edited 2004-08-05 in Navision Attain
I want to let the user choose between creating output on screen (with sections), or creating a CSV-file with the data. If the user selects the CSV-option, the sections should not be printed. Should I do this with setting the ProcessingOnly to False, and if so, how should I do it in OnPreReport? If not, how should I let the sections not be printed? If I set all sections on SHOWOUTPUT=FALSE, the window which would contain the sections would still pop up, saying "Generated 0 pages.".

Comments

  • AfonsoAfonso Member Posts: 27
    Hello,

    If you use a variable to choose between print or crate a file, you can on prereport create a function :

    begin Funtion XXX

    file.crate;
    .
    .
    .

    file.close;

    currreport.quit;

    end Function XXX

    I think in this way you'll not have the 0 pages report generated.


    Regards

    Afonso
  • PaLPiTaTioNPaLPiTaTioN Member Posts: 55
    It won't work. First of all, you cannot create a function in that way, because one should declare and define the functions through the Global Variables-window. Also, the CurrReport.QUIT does not prevent the output window to appear. The ProcessingOnly-property really must be set to true if the output is to be text.
  • kvbkvb Member Posts: 107
    Maybe it will be better to ask user what he wants before running a report?
    For example something like this:
    CASE STRMENU('Make a report,Make a CSV-file') OF
      1: REPORT.RUN(NumberOfYourReport);
      2: DATAPORT.RUN(NumberOfYourMakingCSVFileDataport);
    END;
    
Sign In or Register to comment.