Skip to Content
author's profile photo Former Member
Former Member

Setting ReportDocument.Filename to variable is a no go

I am trying to set the filename dynamically for my CrystalReportViewer webpart and when I do I get the following error
"

Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack. "

but if I hardcode the path it works fine. I've checked the variable and the string is the same. To me a string is a string.

This works:

reportDoc.FileName = "\\\\workspaces10dev.CT.blackwaterprotection.com\\Shared Documents\\TEST.rpt";

This does not

string url = "\\\\workspaces10dev.CT.blackwaterprotection.com\\Shared Documents\\TEST.rpt";
reportDoc.FileName = url

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Apr 29, 2012 at 02:41 PM

    Hello,

    Use ProcessMonitor or Fiddler and look for Access Denied errors. Could be the WEB server doesn't have permissions to access the folder.

    Don

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Phillip,

      Going back to your original post:

      This works:

      reportDoc.FileName = "\\\\workspaces10dev.CT.blackwaterprotection.com\\Shared Documents\\TEST.rpt";

      This does not

      string url = "\\\\workspaces10dev.CT.blackwaterprotection.com\\Shared Documents\\TEST.rpt";
      reportDoc.FileName = url

      I tried this and it works for me:

      string url = "/inetpub/wwwroot/WebSite3/OLEDBProv.rpt";

      rd.FileName = url;

      rd.Load(url);

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.