web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

Automatic PDF export

(0) ShareShare
ReportReport
Posted on by 110

Hello!

We've been trying to automatically export a report to an Acrobat file. For a specific standard report, when the user clicks Print in the ROI screen, the output should be a PDF file no matter what printer is selected. It seems that the File Type value is not saved in the rptruntime table but in an environment variable and therefore can't be manipulated with a SQL trigger. If we set the RI_PRINTER field to A and we set RI_OUTFILE to C:\TEST.PDF, the file that is created is a standard text file, not an Acrobat one. Does anybody has been able to change the output file type through a pre-process Stored Procedure, Trigger, or VB Tools Application?

Thanks!

Miguel

*This post is locked for comments

I have the same question (0)
  • Dinesh Parashar Profile Picture
    295 on at

     

    Set default printer to PDF. This is working fine on my system.

     

  • al561914 Profile Picture
    110 on at

    Thanks for the info Dinesh. Actually we need the PDF export just for the AP Batch Control report and the client requested that the name of the file to be the batch number generated.

     Miguel

  • Paul Phillips Profile Picture
    590 on at

    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

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics SL (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans