Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

batching Infomaker Reports

144 views
Skip to first unread message

Michael Slattery

unread,
Mar 8, 2016, 11:09:25 AM3/8/16
to
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

unread,
Mar 8, 2016, 4:34:54 PM3/8/16
to
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

unread,
Mar 9, 2016, 10:58:56 AM3/9/16
to
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

unread,
Mar 9, 2016, 2:46:20 PM3/9/16
to
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

unread,
Mar 9, 2016, 3:21:00 PM3/9/16
to
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

unread,
Mar 14, 2016, 5:22:30 PM3/14/16
to
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
0 new messages