cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports render on localhost but not from outside the network

Former Member
0 Kudos

I have an ASP.NET application that uses the .NET Framework 4 and CrystalReports Version=13.0.2000.0. I have deployed this application to a Windows Server 2008 R2 Standard SP1 64-bit machine.

I have installed the CR runtime engine for 32-bit AND 64-bit (in that order) on this server.

Here is the issue: I can run this application from the localhost (http://localhost/MyApp) and the Crystal Reports Viewer renders our reports just fine. I connect to the application from outside the network (using a public static IP address) 123.45.67.123/MyApp and the Crystal Reports View will not render the reports. I do not get an error of any kind, and the web application performs as if there is no issue. There is no exception raised when displaying the report, nor when binding data to the report.

This is not a browser-specific issue, as I get the same results with Chrome, IE, Firefox, Opera, and Safari.

This same build can be deployed to a Windows7 64-bit machine and a Windows Server 2003 and I have no issues at all.

To me, this sounds like a network issue. Perhaps something on the network is blocking the CRV, like a popup script blocker, or something. I am not the network administrator of this machine, just the developer trying to deploy his application.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I solved my own issue:  It has been posted on The Code Project for a while, but I thought I'd post it here for someone searching for an answer via this forum.

After a lot of headaches, I was able to resolve this issue.  This is what I did and how I got the issue resolved.

I installed this same .NET web application on another Windows 2008 Small Business.  I did it a little differently this time, though.  Instead of using the default web site in IIS for the creation of a virtual directory, I had to use the Create Web Site Wizard in IIS to generate a new database.  I chose framework 4 integrated application pool, btw.  I browsed to the application and once again, the crystal report viewer would not work.

Some other forum threads suggested changing your web.config and essentially telling the assembly where to find the crystalreportviewer13 runtime engine support files.  This is what clued me into what exactly is going on.  The crystal report viewer doesn't know how to render with out these script files, css files, etc.  If it can't find the path to these files, it can't render the crystal report viewer.  How I understand it is the crystal report viewer is dependent upon the runtime engine installation files for .NET Framework 4 (32 & 64 bit installs).  These assembly files don't get included in your .NET project.  I think that is a HUGE oversight by Visual Studio --- why not include ALL files required to run your object!?!?  Sorry, anyway, here's all I did:

1)  Go to the C\inetpub\wwwroot folder on any machine that has either/or crystal report runtime engine installations.  For my purposes, I just went to the one on the 2008 server I'm installing on.

2)  Copy the aspnet_client folder in the wwwroot directory.

3)  Paste this folder in the website directory folder.  I assume this would work with a web application that was created from a virtual directory as well, just paste it into the virtual directory.

You may be able to avoid this by creating all of the necessary folders and sub folders, then copying over each file into your web application project on your development machine, in order to include them in your published, complied web application.  If this is confusing, just perform the steps above in the deployment environment.

Here's the Code Project thread:  http://www.codeproject.com/Answers/361109/Crystal-Reports-not-rendering-when-webpage-is-serv#answer2

Answers (1)

Answers (1)

former_member183750
Active Contributor
0 Kudos

Moving to .NET - SAP Crystal Reports forum

I wonder if the following pieces of info are pointing to a solution:

Windows Server 2008 R2 Standard SP1 64-bit machine. -> does not work

Windows Server 2003 (32 / 64 bit? Assume 32 bit(?)) -> Works

localhost - > works

Now, not knowing what type of DB connection you are using I'll assume you are using ODBC.

So, the app on localhost will use 32 bit ODBC, Windows Server 2003 (32 bit(?)) will use 32 bit ODBC.

If the ODBC datasource on the Windows Server 2008 R2 Standard SP1 64-bit server is 64 bit, the app will fail. E.g.; you must ensure that the ODBC datasource is 32 bit. See KB [1505620|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533303335333633323330%7D.do].

I may be wrong in all of the above, but given the info, that's the best "guess". If I'm wrong, please provide more info.

Oh and of course, you will need 32 bit db client. (again, assumption is that this app is compiled as 32 bit(?)).

Ludek

Follow us on Twitter http://twitter.com/SAPCRNetSup

Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

Edited by: Ludek Uher on Feb 24, 2012 7:49 AM

Former Member
0 Kudos

No, this application is using the .NET Framework System.Data.Sqlclient data provider and thus it's using ADO.NET and SQL Server. The .NET Framework provides Exception handling for all SQL server errors, and the application would raise an exception if we couldn't connect to the database.

The thing is, the dataset is being returned fine and binding to the report successfully. It just seems like there's a problem with the Crystal Report Viewer... the report viewer is not rendering...

Former Member
0 Kudos

Regarding the 32-bit suggestion, it doesn't explain how the same build can be deployed to a Windows7 64-bit machine and run just fine.

former_member183750
Active Contributor
0 Kudos

If this was a 32 bit app, using 32 bit ODBC connection and you created a 32 bit ODBC datasource? That would explain it?

- Ludek

former_member183750
Active Contributor
0 Kudos

So, if in the CR designer you go to the Database menu and select "Set Datasource Location", than expand the "Properties" node. What do you see for "Database Type"?

- Ludek

Former Member
0 Kudos

As I stated earlier:

Database Type: OLE DB (ADO)

Provider: SQLNCLI10

But this isn't a connectivity issue. It has something to do with these issues, I think:

http://forums.sdn.sap.com/thread.jspa?threadID=1291143

and

http://social.msdn.microsoft.com/Forums/en-CA/vscrystalreports/thread/ef56f72b-7ede-47d8-ba9e-9e63b9...

former_member183750
Active Contributor
0 Kudos

I'm going to stay on the database connectivity horse for a bit longer - sorry

From your 1st post:

 

MyApp and the Crystal Reports View will not render the reports. I do not get an error 
of any kind, and the web application performs as if there is no issue. There is no exception 
raised when displaying the report, nor when binding data to the report. 

Perhaps I should have asked earlier, but the question that needs to answered is this;

What is the detail re. Crystal Reports View will not render the reports

Does the viewer come up, but the report does not?

Does the viewer come up with the report headings, but no data?

Does the viewer no come up at all?

Perhaps a link to a screenshot of what you actually see will be helpful(?).

If the viewer does come up, it should have a toolbar which will have an export button on it. Can you use this export button to export the report (such as it is) to report file format?

- Ludek

Former Member
0 Kudos

Correction on this thread -- The error first popped up on a Windows Server 2003. The client then bought a new Windows Server 2008. I installed the .NET application on the second one and THOUGHT I was testing it externally on the new box, but I was actually pointing back to the original server (2003). When the firewall rules were updated, I connected to the 2008 Server and the Crystal Report Viewer works fine! This is still an unresolved issue on 2003, but I'm hopeful that the links above will provide at least a viable work-around for future 2003 installs. I will report back when I've had a chance to test the suggestions from the above links.

Former Member
0 Kudos

Thanks, yes, I should be more specific. The Crystal Report Viewer will not render -- the entire thing -- The toolbar, the Group Tree, the fun little SAP CRYSTAL REPORTS text in the upper right-hand corner, The print button, the page control, the panel where the report should be -- nothing... A screen shot will not be helpful, there's nothing to see. We should see something or get an error... This is much closer to the "bobj is undefined" issue that other people are having... Once I get a chance to test the solution that others are posting regarding the crystalreportviewers13 folder I will reply back to this issue with the results.

0 Kudos

Hello,

Use something like Fiddler to trace the browser connection to the Server.

It should show you what is being denied access.

Don

Former Member
0 Kudos

After a lot of headaches, I was able to resolve this issue.  This is what I did and how I got the issue resolved.

I installed this same .NET web application on another Windows 2008 Small Business.  I did it a little differently this time, though.  Instead of using the default web site in IIS for the creation of a virtual directory, I had to use the Create Web Site Wizard in IIS to generate a new database.  I chose framework 4 integrated application pool, btw.  I browsed to the application and once again, the crystal report viewer would not work. 

Some other forum threads suggested changing your web.config and essentially telling the assembly where to find the crystalreportviewer13 runtime engine support files.  This is what clued me into what exactly is going on.  The crystal report viewer doesn't know how to render with out these script files, css files, etc.  If it can't find the path to these files, it can't render the crystal report viewer.  How I understand it is the crystal report viewer is dependent upon the runtime engine installation files for .NET Framework 4 (32 & 64 bit installs).  These assembly files don't get included in your .NET project.  I think that is a HUGE oversight by Visual Studio --- why not include ALL files required to run your object!?!?  Sorry, anyway, here all I did:

1)  Go to the C\inetpub\wwwroot folder on any machine that has either/or crystal report runtime engine installations.  For my purposes, I just went to the one on the 2008 server I'm installing on.

2)  Copy the aspnet_client folder in the wwwroot directory.

3)  Paste this folder in the website directory folder.  I assume this would work with a web application that was created from a virtual directory as well, just paste it into the virtual directory.

You may be able to avoid this by creating all of the necessary folders and sub folders, then copying over each file into your web application project on your development machine, in order to include them in your published, complied web application.  If this is confusing, just perform the steps above in the deployment environment.

Former Member
0 Kudos

We have the same issue, but none of the suggestions in any of the threads have worked for us.  We have Crystal Reports for VS 2010 (v13.0.2) installed on the dev machine, and Crysta Reports Runtime (v13.0.2) installed on the remote server.  The assemblies are referenced in the web.config file; we have copied the aspnet_client folder to the website directory folder; we have the Application Pool's identity to Local_Service.  All permissions have been granted.  Still the reports do not render on the remote server, but they do in Visual Studio. 

The application has recently been upgraded from VS2005 to VS2010 - could there be some problem with that?  Any other ideas?

former_member183750
Active Contributor
0 Kudos

The application has recently been upgraded from VS2005 to VS2010 - could there be some problem with that?

Double check that all the CR references in your project are version 13.x, not 10.5

If that does not help, use Fiddler or Charles to find out where the app is looking for the viewers folder.

- Ludek

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces