Crystal Report run through DTS

  • Hi,

    I just run crystal report daily without any parameter and after run, save the file in c:\temp directory. I have created many DTS but I dont know how can I run my crystal report which has no paramter and save result in pdf format. Please help.

    Thanks.

  • In order to export Crystal Reports to PDF you have to write some code in an ActiveX script task. I must say that it's not so simple, since I had to do it myself too. I set up a small utility to perform this task. You can find it attached here.

    The zip contains 3 files:

    RPTExport.dll

    PDFExport.exe

    PDFExport.ini

    To make it work:

    1) register RPTExport.dll (run "regsvr32 RPTExport.dll")

    2) edit PDFExport.ini and set up your connection properties

    3) run PDFExport.exe with appropriate parameters

    SYNTAX:

    --------------------------------

    PDFexport reportFile=file

    exportFile=file

    [selectionFormula=formula]

    [param=paramName;paramValue;{True|False}]

    ...

    [param=paramName;paramValue;{True|False}]

    ARGUMENTS:

    ---------------------------------

    reportFile Path to report (file .rpt)

    exportFile Path to export File

    selectionFormula Selection formula

    param Report parameter

    Usually I don't run binary code from people I don't know, so I won't be surprise if you don't like the idea of running mine. If you want I can provide the full source code (Visual Basic 6).

    Hope this helps

    Gianluca

    -- Gianluca Sartori

  • Hi I just tried to use your solution with a crystal report (version 9) and it reposnds with the following error;

    "C:\Program Files\Crystal Decisions\PDFexport\PDFExport>pdfexport reportFile=prod

    uctsalesbymonth.rtp exportFile=test param=ProdCode;CUM001

    Invalid object name 'LABELS'."

    Am i doing somthing wrong???? πŸ™

  • I see...

    The application looks fro a LABELS table that contains all the labels in the report for translation in other languages.

    That's something I failed to remove from this project and was set up that way in my environment.

    You could create a LABLES table (I don't remember the definition offhand, but you could guess it upon error messages).

    Otherwise I would have to look up the code (given that I still have it lying somewhere) and post it again.

    Regards

    Gianluca

    -- Gianluca Sartori

  • thanks for your rapid reply... to save time can you remeber if this solution support Crystal 9?

  • It should work with CR 9.

    Have you tried creating the table?

    -- Gianluca Sartori

  • ActiveX component can't create object

  • Hi there, unfortunately it isn’t possible to create a table due to the way we have crystal implemented in our business. πŸ™

    Is there a way to get around this problem? It looks like this is just what I am looking for so it is a real shame I am having this problem. Any help you can throw my way would be greatly appreciated. πŸ™‚

  • I use a program called "CutePDF". you can google for it and find the download site. It installs as a printer driver. All you have to do is "print" to the printer "CutePDF Writer" and it saves your document as pdf file.

  • hi there, i need it to be a command line application so that i can export a Crystal report to a PDF from a DTS in SQL server without any manual intervention.

  • OK, I updated the code, but I don't have a working report to test it.

    So, if you want to try it, it's totally untested, but should work.

    Hope this helps

    Gianluca

    -- Gianluca Sartori

  • Thanks very much for your help i will test it and let you know.

    Best Regards

    Remo

Viewing 12 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic. Login to reply