Solved

Crystal Reports in asp.net stopped working

Posted on 2012-03-23
11
1,120 Views
Last Modified: 2012-03-23
I have several CR reports set up using VS 2010 and CR 2010 for VS. They were working perfectly yesterday. Now all of them are giving me this error:

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

Description:
An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the error and
where it originated in the code.

Exception Details:
System.Runtime.InteropServices.COMException: Unsupported Operation. A
document processed by the JRC engine cannot be opened in the C++ stack.

Line 48:     private void SetDBLogonForReport(ConnectionInfo connectionInfo)
Line 49:     {
Line 50:         TableLogOnInfos tableLogOnInfos = crystalReportViewer.LogOnInfo;
Line 51:         foreach (TableLogOnInfo tableLogOnInfo in tableLogOnInfos)
Line 52:         {

This is the code that I'm using that was working perfectly.

string reportPath = ("~/customreports/AP_TRANS_GL_POSTINGS2.rpt");
ConnectionInfo connectionInfo = new ConnectionInfo();
     connectionInfo.ServerName = "sdwinsql03v";
     connectionInfo.DatabaseName = "fin_prod";
     connectionInfo.UserID = "xxx";
     connectionInfo.Password = "xxx";
     crystalReportViewer.ReportSource = reportPath;
     SetDBLogonForReport(connectionInfo);
}

private void Page_Init(object sender, EventArgs e)
    {
        ConfigureCrystalReports();
    }

private void SetDBLogonForReport(ConnectionInfo connectionInfo)

    {
         TableLogOnInfos tableLogOnInfos = crystalReportViewer.LogOnInfo;
        foreach (TableLogOnInfo tableLogOnInfo in tableLogOnInfos)
       {
            tableLogOnInfo.ConnectionInfo = connectionInfo;
      }
}

What would cause them to quit working?
0
Comment
Question by:Hers2keep
  • 6
  • 4
11 Comments
 
LVL 19

Expert Comment

by:GJParker
ID: 37757928
What has changed since yesterday, have you changed the reports ? has someting on t database changed ?

I would check your database connection and user account to make sure it is still able to connect
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 37757930
WHat changed overnight on the system?

mlmcc
0
 

Author Comment

by:Hers2keep
ID: 37757931
I have narrowed it down to the path to the reports, however, nothing has changed since yesterday other than the authentication method on the IIS server. If I move the report into the website, it pulls up just fine. But, I can't do that as a permanent solution. I need help figuring out why the path isn't working. It's configured as a Virtual Directory in IIS pointing to the other server where the report files are actually located.
0
 

Author Comment

by:Hers2keep
ID: 37757942
Only the authentication method on IIS 7.5. It was set to Anonymous, but then I wasn't able to get the logged in user's name and that's required on many reports. So I changed the authentication to Windows and Digest, which is now working correctly. I even removed the virtual directory and re-added it, but it's still not working.
0
 
LVL 19

Expert Comment

by:GJParker
ID: 37757954
How have you changed the authentication method ? sounds like the user account running the application doesn't have permissions to the new report location.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:Hers2keep
ID: 37757966
Ok I am NOT a server engineer and am really flying blind here with the help of Google and Experts-Exchange. Someone in the IIS group helped me get the authentication working. I changed from Anonymous Authentication to Digest Authentication Enabled (no realm entered) and Windows Authentication, Extended Protection=Accept, Enable Kernel-mode authentication=False, Providers=NTLM, Negotiate (in that order). As far as the user account running the application, where do I find that?
0
 
LVL 19

Accepted Solution

by:
GJParker earned 500 total points
ID: 37758083
I'm not an IIS expert but I think this will be the user account set in the applications  Application Pool, you can check and change this using the link below.

http://technet.microsoft.com/en-us/library/cc771170%28WS.10%29.aspx

You might get better help by posting this in the IIS forum as this isn't really a crystal issue.
0
 

Author Comment

by:Hers2keep
ID: 37758103
When I first posted it, I didn't know what the problem was. But now that I know that is the problem, I could repost it in IIS if the above link doesn't get me where I need to be.
0
 

Author Closing Comment

by:Hers2keep
ID: 37758115
That was the problem. Once I changed the ApplicationPool identity to the user I'd given read/write access to the reports folder, it started working again. Thanks!
0
 
LVL 19

Expert Comment

by:GJParker
ID: 37758135
Glad you got it working.

Just a note, if you;re going to be running multiple applications on this server you might want to create new ApplicationPools for each individual application.
0
 

Author Comment

by:Hers2keep
ID: 37758151
There are separate app pools so far. Right now all that's running is one web app and Sharepoint 2010 Foundation and they do have separate app pools. Geesh, talk about a crash course in server engineering! This has been nuts, but I've learned a lot for sure!
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now