Automating transaction export using standard Crystal reports

SOLVED

Hi,

I was asked to create a custom service that will do the following:

1. Get Purchase Orders based on specific criteria

2. Export each Purchase Order using the standard Crystal Report file to a PDF document

Getting the purchase orders is easy enough to do, but how do I then send this data off to the Crystal report and export to PDF. It must be the Crystal report that was set up for this company as it has their approved look and feel already done.

I have looked at using Crystal Decisions in my code, but the report uses the POPORN.dll file as a data source and I am not entirely sure how to use this dll in code.

Another option would be to use the Accpac COM API, but there does not seem to be a lot of information or examples on using this.

Can anyone please point me in the right direction?

Parents
  • 0

    The challenge with that DLL is that it is a datapipe meaning that Sage 300 invokes functions in that DLL to pass a dataset to Crystal. You can't automate that unless you're automating Sage.

    If you're interested in using the COM API - which will allow you to do what you need - just record a macro of the process of sending a PO to PDF.  You'll have 99% of the code that you'll need. You'll be telling Sage to print the report to PDF and then you don't need to worry about the source of the data.

Reply
  • 0

    The challenge with that DLL is that it is a datapipe meaning that Sage 300 invokes functions in that DLL to pass a dataset to Crystal. You can't automate that unless you're automating Sage.

    If you're interested in using the COM API - which will allow you to do what you need - just record a macro of the process of sending a PO to PDF.  You'll have 99% of the code that you'll need. You'll be telling Sage to print the report to PDF and then you don't need to worry about the source of the data.

Children
No Data