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

    Thanks for all your valuable answers. The issue with using software like Visual Cut or Logicity is that it is not as customizable as I would like. I need to get certain transactions with specific criteria and then use certain fields as variables to store the exported files.

    For instance, exporting Purchase orders, must save to a specific folder structure and file name. The folder structure would Purchase orders\Vendor ID\PO Number.pdf

    From what I've seen so far, Visual Cut and Logicity does not have this level of config (unless I've missed that part).

    It looks like I will have to attempt using the COM API in conjunction with recording macros.

Reply
  • 0

    Thanks for all your valuable answers. The issue with using software like Visual Cut or Logicity is that it is not as customizable as I would like. I need to get certain transactions with specific criteria and then use certain fields as variables to store the exported files.

    For instance, exporting Purchase orders, must save to a specific folder structure and file name. The folder structure would Purchase orders\Vendor ID\PO Number.pdf

    From what I've seen so far, Visual Cut and Logicity does not have this level of config (unless I've missed that part).

    It looks like I will have to attempt using the COM API in conjunction with recording macros.

Children
  • 0 in reply to Eddie Willcox_1

    PrintBoss handles that very gracefully.  You can even configure it to save to the logged-in user's folder.  It will sing and dance for you.

  • 0 in reply to Eddie Willcox_1

    if you have the premium version of Logicity (it's not that much) you can use variables in the file names.  It really all depends on how deep you need it to go.  I use it for exporting sales people sales reports to their separate files.  again, your situation may be different.  if you can figure it out with coding then you are good to go and no additional software needed.   If you are just using it to store PO's once you send them, then maybe PrintBoss is the way to go.

  • 0 in reply to Eddie Willcox_1

    The challenge with these external tools is that they aren't going to work with the datapipe reports. You need to automate Sage, first, to generate the report. You can tell Sage to create a PDF and then file that PDF as required.

    Since you're also wanting to file the PDFs based on PO data then, once you have the routine working for generating the PDF for a single PO, you can write a routine that travels through the new POs and pass along the vendor and PO number to your PDF routine.