Skip to Content
avatar image
Former Member

passing serialized xml to crystal for distributed c# app

I am new to Crystal reports and I am investigating a Visual Studio 2008 .NET C# solution for my WPF application. I would like to create a dll that holds all of the Crystal rpts and schema and simply invoke a function calling a specific report with the data serialized to xml string. The output should be a PDF file. I would like to have this library be referenced in any of my applications to allow my application to call by initializing and calling the functuon passing in these two parameters. I also do not want to include anything in the GAC because I simply want no deployment issues using OneClick.

I would appreciate it any adivce in this area.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 12, 2009 at 06:28 PM

    I wrote and deployed the web service and it is working fine. There is only one problem. It takes forever to initialize. I suspect it is taking awile for Crystal to load. any ideas?

    Add comment
    10|10000 characters needed characters exceeded

    • Be more specific. How long is forever to you? 10 seconds? 30 seconds? 5 minutes?

      If this is a long running report then it is very possible for this to export completely to PDF format. You'll want to run this report in the Crystal Reports designer and export it to PDF format. That will give you a benchmark to compare to. We won't guarantee that the Crystal Reports .NET engine will do it just as fast, but you'll at least know what to expect when exporting via your web service.

      How large is the PDF file that you are producing?

      How long does it take to execute the Export() method in the web service? You can add some logging code to find out.

  • Jul 14, 2009 at 06:56 PM

    Hello bqsoftware,

    For the most part there should be no issue with this. There are tons of code samples on our site, and all over the web, not necessarily doing this but showing bits and peices. You just need to put them together. You can start at https://www.sdn.sap.com/irj/boc/samples.

    Firstly putting the reports into your own dll assembly will not be an issue. Putting the serialized XML string directly is something you can't do directly, you would need to convert it back into an ADO .NET Data table or Data Set then you can pass it to your report parameter using the .SetDataSource method.

    As for not placing your dll into the assembly directory that is not an issue, as long as you know how to load your own assembly. The however on this is that our Crystal DLL will need to be put into the assembly directory. We do have a click once deployment that will deploy our assemblies and other dlls, such as COM registerable ones.

    The alternatives is to host the dll that performs the reporting on your own web server as a webservice. Your WPF application could easily consume the webservice then return back the PDF file.Your DLL and the Crystal Runtime would not need to be destributed then, however the end-users would require an internet connection and your webserver would need to handle the load.

    Trevor

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 29, 2009 at 03:08 PM

    I implemented a call to a web service that creates a PDF on the box and sends a byte[] array back to the calling client of the PDF. Everything works fine but the service alwasys seems to die after the 10th iteration.

    Any ideas as to why this is happening. I am using 2008...

    Add comment
    10|10000 characters needed characters exceeded