Re: Re: Re: Automatic PDF export
Hi Miguel,
You might be able to accomplish what you are trying to do by calling ROI from a command line. This may not work for some scenarios. Here is a sample of the Customization manager code to do this:
ParmStr = "ROI.EXE "
+ PRMSEP + "01650/RUN"
+ PRMSEP + "01650/FORMAT"
+ PRMSEP + "C:\accounts.pdf/EXPFILENAME"
+ PRMSEP + "0/EXPFORMAT"
serr1 = Launch(ParmStr, True, True, 0)
Where EXPFORMAT is one of the valid formats that ROI supports. This example uses '0', the value for PDF. Full documentation on the command line parameters supported is in the SIV_RPTGD.pdf (Solomon 6.5) or sl_roi.pdf (SL 7.0) documentation files.
The EXPFILENAME parameter can be used to specify the name of the exported file. I'm not sure offhand how you will determine the batch number prior to running the report if this is intended to be used with automatic batch control report printing during data entry. You will most likely need to write custom code for each screen to override the standard behavior.
Similar code can be used from VBTools application code by substituting the SDK API call of CallApplic or CallApplicWait instead of 'Launch'.
Note that it is also possible to pass a WHERE clause in through the command line, if you need to run a report with selection criteria in the same manner. The documentation will give full detail on all of the options. There is also a knowledgebase article at the following address which describes the above code in more detail and provides the available export file type flags:
https://mbs.microsoft.com/knowledgebase/KBDisplay.aspx?WTNTZSMNWUKNTMMYLSVQUSPTNTNSMQPYWVZQPQTWSYXLTWXOPUVRXSUMVWTXWRMZYZOYNSWSNKXONZZLKKKLXQMNQPVUSKKN&wa=wsignin1.0
Hope this helps.
Paul Phillips
Kono Consulting, Inc.
268 Bush St. #429 | San Francisco, CA 94104