Good Morning Sage Community!
There was a request to run report code "ATB" on an automated basis and have it emailed, etc. So the first part is to get the report to send to a network directory...
We currently run multiple reports through 4GL TRT files, and then automate those files on a batch basis. I copied the 4GL down from another process, and this is what I came up with:
Local Char ETAT
Local Char FONCTION
Local Char TBPAR(150) (150)
Local Char TBVAL(150) (150)
If clalev([F:BPC])=0 : Local File BPCUSTOMER [BPC] : Endif
If clalev([F:BPR])=0 : Local File BPARTNER [BPR] : Endif
If clalev([F:DUD])=0 : Local File GACCDUDATE [DUD] : Endif
If clalev([F:HAE])=0 : Local File GACCENTRY [HAE] : Endif
If clalev([F:HAE])=0 : Local File GACCENTRY [HAE] : Endif
If clalev([F:DAE])=0 : Local File GACCENTRYD [DAE] : Endif
If clalev([F:TCU])=0 : Local File TABCUR [TCU] : Endif
Local Char ETAT
Local Char FONCTION
Local Char TBPAR(150) (150)
Local Char TBVAL(150) (150)
TBPAR(0) ="asofdate"
TBPAR(1) ="sitedeb"
TBPAR(2) ="sitefin"
TBPAR(3) ="coldeb"
TBPAR(4) ="colfin"
TBPAR(5) ="tiersdeb"
TBPAR(6) ="tiersfin"
TBPAR(7) ="datebase"
TBPAR(8) ="bprtype"
TBPAR(9) ="summary"
TBPAR(10) ="namesort"
TBPAR(11) ="txncur"
TBPAR(12) ="rptcur"
TBPAR(13) ="filnam"
TBVAL(0) = date$
TBVAL(1) = ""
TBVAL(2) = ""
TBVAL(3) = ""
TBVAL(4) = ""
TBVAL(5) = ""
TBVAL(6) = ""
TBVAL(7) = "1"
TBVAL(8) = "1"
TBVAL(9) = "1"
TBVAL(10) = "1"
TBVAL(11) = "1"
TBVAL(12) = GSYSCUR
TBVAL(13) = "\\10.10.9.208\comm\test\TESTTTT.PDF"
ETAT = "ZATB"
GSERVEUR = 1
GSILENCE = 1
Call ETAT(ETAT,"YNEW","eng",0,FONCTION,TBPAR,TBVAL) From AIMP3
I copied the canned "ATB" in both the Crystal Repot and Report Dictionary so that I could add the "filnam" parameter.
Here's a screenshot of the Report Dictionary:
Any advice would be greatly appreciated. Thank you!