Automatically print a report in a network directory

Hello,

I would like to be able to automatically generate invoice in PDF format in a specific directory right after validating it.

I was thinking of using "Call ETAT(ZINVOICE,PDF) From AIMP3" and EXEBOUT in my invoice script (SPESIH)

Where ZINVOICE is my report and PDF my destination.

I don't really understand how to do that nor how to define the directory where the file should be generated.

could you help me?

Thanks

  • Good day,

    The function to print works as follows, there are 6 inputs (listed below). The report will by default print into the [tmp] directory of the folder you are in, from there you can move it to another storage location using "Call MOVE("CUR_LOC","DEST_LOC", STAT) From ORDSYS"

    Input parameters

    1. The report code

    2. The destination as setup in X3

    3. The language of the report

    4. Trace indicator, 1 - Print log, 0 - No log

    5. Print message

    6. Input parameter definition (as defined on the report)

    7. Input parameter value (require by report)

    Example input.

    TBPAR(1) = "" : TBVAL(1) = ""

    Call ETAT("LISREG","EMAIL","ENG",0,"",TBPAR,TBVAL) From AIMP3

  • Hello,

    Here is what I tried:


    $EXEBOUT_

    If BOUT="Z" Then
    #    Infbox "Bout"
        Local Char ZTBPAR (50) (1..50), ZTBVAL(30) (1..50)
        Local Char ZDEST ([V]GLONAIM)    , ZETAT(100)
        ZDEST="YPDF"
        ZETAT="INVOICE3"
        
        Call ETAT(ZETAT,ZDEST,"",0,"",[L]ZTBPAR(1..10),[L]ZTBVAL(1..10)) From  AIMP3
        Infbox "Done"
    Endif
    Return

    Yet nothing is printed into the TMP folder.

  • What are the normal parameters on your report, i.e. when you go to Reports > Reports, what are the parameters needed for you report? If you print the report from here with destination of YPDF, where does is print to?

    In this example there of report PINVOICE you need to set parameters needed by the report:

    ZTBPAR(1) = 'Company' : ZTBVAL(0) = 'CORP'

    .......