Discussion:
batching Infomaker Reports
(too old to reply)
Michael Slattery
2016-03-08 16:09:25 UTC
Permalink
Hello All,
I'm a half-decent Infomaker report writer with no idea about PowerBuilder.
My IT support tells me that there is no way from inside Infomaker to batch Infomaker reports, that is, to run a function which takes as an argument the report exe, and a list of arguments (report targets).

This is too bad, because I have a number of reports that need to be updated several times a year, which are run for hundreds of sites (the report targets from above). Having the ability to batch these reports would be a big step forward!. Currently, I run each report individually, and then save as a pdf.

My question: is there a way to get this done in a PB wrapper of some sort? Or even within Infomaker?

Hope my description is clear enough, I'm using Infomaker v.12.5, b.2511

thanks all!
best,
Mike
Rick
2016-03-08 21:34:53 UTC
Permalink
Post by Michael Slattery
Hello All,
I'm a half-decent Infomaker report writer with no idea about PowerBuilder.
My IT support tells me that there is no way from inside Infomaker to batch Infomaker reports, that is, to run a function which takes as an argument the report exe, and a list of arguments (report targets).
This is too bad, because I have a number of reports that need to be updated several times a year, which are run for hundreds of sites (the report targets from above). Having the ability to batch these reports would be a big step forward!. Currently, I run each report individually, and then save as a pdf.
My question: is there a way to get this done in a PB wrapper of some sort? Or even within Infomaker?
Hope my description is clear enough, I'm using Infomaker v.12.5, b.2511
thanks all!
best,
Mike
You can compile of your reports into an InfoMaker executable, then use command-line parameters to launch each report: http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc37789.1250/html/imug/BACJBJJG.htm?resultof=%22%69%6e%66%6f%6d%61%6b%65%72%22%20%22%69%6e%66%6f%6d%61%6b%22%20%22%63%6f%6d%6d%61%6e%64%22%20%22%6c%69%6e%65%22%20

List the command for each report in a .bat file to fully automate everything. Haven't done this for a while, but I recall if you set your default printer to PDF it can be made completely seamless. Back when I used it, the user wanted a paper copy, so it went to his printer every morning by scheduling the .bat through Windows task scheduler.

Rick
Michael Slattery
2016-03-09 15:58:55 UTC
Permalink
Rick,
Thanks! Got it working....almost. I currently have both a Retrieval Argument and a Column Specification. The Retrieval argument is handled easily with the /A flag, but it balks if I add the second argument for the Column Specification ("Number of Arguments passed on commandline does not match number of report arguments).

But, the Column Specification is the important one. I will remove the Retrieval Argument and see if I can put the Col. Spec. in the /A flag.

Another question:
Can I specify the output pdf file names in each call inside the .bat somehow?

thanks again!
Mike
Rick
2016-03-09 19:46:19 UTC
Permalink
Post by Michael Slattery
Rick,
Thanks! Got it working....almost. I currently have both a Retrieval Argument and a Column Specification. The Retrieval argument is handled easily with the /A flag, but it balks if I add the second argument for the Column Specification ("Number of Arguments passed on commandline does not match number of report arguments).
But, the Column Specification is the important one. I will remove the Retrieval Argument and see if I can put the Col. Spec. in the /A flag.
Can I specify the output pdf file names in each call inside the .bat somehow?
thanks again!
Mike
Not sure about specifying the names, but if you are getting random file names, then you could insert a line in the .bat to rename the new file when it is created.
Michael Slattery
2016-03-09 20:20:58 UTC
Permalink
No, these would be very specific names, which I could easily hard code into the .bat, I just dont know the syntax relative to the construction:

xxx.exe /RP myprog /A arg1
Rick
2016-03-14 21:22:28 UTC
Permalink
Post by Michael Slattery
Hello All,
I'm a half-decent Infomaker report writer with no idea about PowerBuilder.
My IT support tells me that there is no way from inside Infomaker to batch Infomaker reports, that is, to run a function which takes as an argument the report exe, and a list of arguments (report targets).
This is too bad, because I have a number of reports that need to be updated several times a year, which are run for hundreds of sites (the report targets from above). Having the ability to batch these reports would be a big step forward!. Currently, I run each report individually, and then save as a pdf.
My question: is there a way to get this done in a PB wrapper of some sort? Or even within Infomaker?
Hope my description is clear enough, I'm using Infomaker v.12.5, b.2511
thanks all!
best,
Mike
I was thinking about a new line in the .bat file. You could run the .exe, find out where the random file is being created, and copy that to a new folder with the correct name. The .bat would be something like...



xxx.exe /RP myprog /A arg1

COPY c:\whatever\*.pdf c:\yourfolder\correctname.pdf

xxx.exe /RP myprog /A arg1

COPY c:\whatever\*.pdf c:\yourfolder\correctname2.pdf

Loading...