Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>ESchneider,</p> <p>I suspect the issue not due to your setting of connection details or parameters. To confirm my suspicions you could place your code into a simple web or windows form/page and instead of exporting just try to view the report by dropping a CrystalReportViewer object onto that page. (Note: There are some prerequisites to this working but if you are on a development machine that had the full Crystal installed it should easily meet those requirements.)</p> <p>Assuming that you don't see complaints (i.e. it prompts for a parameter or database credentials) then I would lean towards an entirely different theory.</p> <p>The clue is in your error message: "COM object that has been separated from its underlying RCW cannot be used." This error is not unique to Crystal Reports.</p> <p>Where I've seen this before is related to either garbage collection (be it automated or due to dispose/deconstruction occuring due to your code) OR multi-threading related challenges.</p> <p>I noticed you are calling this as a function that returns the PDF path as a string. Perhaps you've nested the call into a thread that is independent of the calling thread? Perhaps you have other code that triggers other events that could play into object disposal or resource/lock related issues like batching?</p> <p>One way to avoid speculating is to place all this into a brand new, dead simple, basic windows application. Do nothing but the absolute minimum to trigger the export. Make sure that the Windows application is just writing to a local folder and reading the report from a local directory. We wouldn't want file permissions or network issues (reading/writing over a network) to interfere.</p> <p>Best of luck.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload