cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Viewer report hangs

Former Member
0 Kudos

Hello,

I am having a problem deploying a Crystal report to run under IIS/aspx using the CrystalReportViewer.

I rdp to the windows 2008 server, start crystal reports and the report works under Crystal on the server fine.

Running the same crystal report on the same server using IIS/aspx and the viewer has a problem. I load the aspx page, the viewer shows a prompt with server name, database name, user name and password information. The details are all right, I enter the password and I just get the message 'Please wait while the document is being processed' that just stays there indefinitely. Everything is on the same server except the SQL Server and database. Crystal Reports and ODBC reach SQL Server fine and Crystal shows the report from the server, but the viewer just hangs.

I have done this on two other customer servers and the above worked fine - the crystal report showed in the viewer. There is something different on this server that I cannot figure out.

I stripped down the report to a single table and a few fields u2013 no multiple tables, joins, sub-reports, created a very simple report to try and isolate the problem. I also removed all the VB code behind u2013 pretty well just load the report and display.

I loaded the CRRuntime_32bit_13_0_2 on the server, created an IIS application, copied over the report and aspx/code behind and tested.

the web config has the Version=13.0.2000.0 assemblies.

Any help resolving this issue would be appreciated. I have looked at 100s of google posts, most very similar, but none have helped get this report going.

Thanks Nick

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Hello Nick

Good troubleshooting steps. I'd go even lower in troubleshooting this;

Create a real simple win app; CrystalReportViewer1.ReportSource = path to the report.

If you are not changing the datasource, that is all you should need - let the report prompt for all the info it needs. Move the exe to the server and run. If you are changing the datasource, add the logon code to the win project.

Alternatively, in your web app, use a saved data report (comment out any logon code).

Another useful tip; download the eval of CR designer and install it on the server. Run the report in the designer. Does it run there? If not, sometimes you'll get a better error message, etc. Free eval download of CR designer can be downloaded from here:

http://www.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx

In this way, we'll determine if this is a runtime issue or a configuration issue of some sort.

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]

Former Member
0 Kudos

Thanks for the information.

I should have clarified, I did download the eval of CR designer and installed it on the server. The report runs fine from the designer on the same server, which is the odd thing.

I tried a simple SqlCommand aspx (see below) that ran in the same server/IIS application as the Crystal aspx and worked fine - got to the db server and returned some data fine.

So, It does seem to be a Crystal runtime or configuration specific issue like you suggest. CR designer works and SqlCommand works so that confirms that all the plumbing (windows, odbc, IIS, aspx, etc) is working fine. Just seems to be the Crystal runtime that is having a problem getting to the database.

I will try the win app suggestion, but not sure if that adds anything to the above.

Please let me know if there are anyother suggestions or ideas I can try - at the moment I have pretty well run out of ideas to move this forward.

Thanks Again

Nick

Dim queryString As String = "SELECT TOP 10 * FROM xxxxxx;"

Dim connectionString As String = "Data Source=;Initial Catalog=xxxx;User ID=xx;Password=xxxx;"

Using connection As New SqlConnection(connectionString)

Dim command As New SqlCommand(queryString, connection)

connection.Open()

Dim reader As SqlDataReader = command.ExecuteReader()

Try

While reader.Read()

MyText.Text = "Got Data"

End While

Finally

' Always call Close when done reading.

reader.Close()

End Try

End Using

former_member183750
Active Contributor
0 Kudos

Just parroting Don who often post in these forums:

...need to install the Native 10 client, MS doesn't support SQL 2008 using the MDAC version of the Native client. Search MS's site and you'll find more info on this.

CR for VS 2010 and SQL 2008 must now use the SQL Native 10 driver. Others have had this problem also when connecting to SQL 2005 and they resolved the problem by install the Client tools for SQL 2008 and using the Native 10 driver.

Thank you very much for your reply. It worked form me.

After I installed [Microsoft SQL Server Native Client|http://download.microsoft.com/download/4/4/D/44DBDE61-B385-4FC2-A67D-48053B8F9FAD/sqlncli.msi] (32 bit), it worked.

I found the download link in this page:

[Feature Pack for Microsoft SQL Server 2005 - November 2005|http://www.microsoft.com/download/en/details.aspx?DisplayLang=en&id=15748]

I'm a little hazy on the reasons for the above requirements, but if you can have a closer look at the Microsoft SQL Server Native Client that would be great.

- Ludek

Former Member
0 Kudos

Thanks!

I downloaded sqlncli.msi 10/07/2008 2:21PM (Microsoft Microsoft SQL Server 2008 Native Client MSI) and tried to install and got the message 'Installation failed because a higher version already exists on the machine.'

I checked installed programs on the server and noticed that this was installed already - 'Microsoft SQL Server 2008 Native Client'.

So from what I can tell the SQL Native 10 driver is installed already.

I hope there are other things that I can try to get this resolved.

Thanks Nick

former_member183750
Active Contributor
0 Kudos

Let's try that test win app. At the least it may tell us if this is some sort of a permissions issue

- Ludek

Former Member
0 Kudos

Hello - I tried the winform and it works fine on the same server displaying the same Crystal report fine.

Let me know what we can try next.

Thanks

former_member183750
Active Contributor
0 Kudos

With a web application, make sure the account that is running the application has access to the database directory. Ensure the account has at least read/write permissions to the system temp folder. Use the [Process Monitor|http://technet.microsoft.com/en-ca/sysinternals/bb896645.aspx] utility to determine if permissions are an issue. Once you have a Process Monitor log, search for u201CAccess Deniedu201D.

- Ludek

Former Member
0 Kudos

Hello,

I installed the tool and monitored. There were some access denied for registry entries like

HKLM\Software\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0

I gave permission in the registry and retested. No more access denied now, but still get hung in the browser.

Let me know what else can be tried.

Nick

0 Kudos

Hi Nick,

When you created the DSN did you select the MS SQL Native 10 as the DB driver? And then when you created a new report use it also?

Another quick test is to create a report off of OLE DB and selecting the Native 10 driver, does that hang also? Expand the properties of the Connection in the Designer, it should indicate SQLNCLI10.dll is the dll being used.

See if this logging CR DB component helps:

1553469 - How to enable Database logging in Crystal Reports for Visual Studio 2010

https://bosap-support.wdf.sap.corp/sap/support/notes/1553469

I suspect the hang is something else is popping up and the Browser doesn't have access to it so no way to click OK button.

Do you have logging abilities in your app and using try/catch? Anything in the IIS Logs indicating what the hang/error is?

Don

saurabh_pathak
Active Contributor
0 Kudos

Hi Nick,

I would still check the project references again. Check the page where you have the viewer.

As you have deployed the application on IIS, could you please provide the OS (name , x64 and x86)?

You can also take a look at

Try upgrading your references to CRVS2010 SP02 from here

Recompile the application use the SP02 runtime.

- Saurabh

Former Member
0 Kudos

Hello,

I took a step back to basics.

I copied one of the sample projects and made the changes needed to get it working properly.

crsdk_net_samples_12_0_\Reduced_Code_Tutorials\ReducedCode_DBLogon\CS_Web_ReducedCode_DBLogon\CS_Web_ReducedCode_DBLogon.

The report appeared properly in the browser now - no hanging after entering login inforamtion.

I tested with the client 10 and native SQL Server drivers and both worked fine.

I thought great problem solved, but when went back to version using some code behind same problem. I checked the aspx and made it identical to the one that works. So the aspx, IIS app, Crystal report, everything else is identical. The only difference is the cod behind.


**** Using this works
 <Report FileName="C:\inetpub\wwwroot\CrystalReports\Transcript_ReportV3.rpt">

**** replace with codebehind creates hang
        Response.Write("Report Path = " & Server.MapPath("Transcript_ReportV3.rpt") & "</BR>")
        Test1.Load(Server.MapPath("Transcript_ReportV3.rpt"))

        With CrystalReportViewer
            .ReportSource = Test1
        End With

The full code used is below.

Getting closer but still not there yet.

Any other ideas appreciated.

Thanks Nick


'************ *This works - report shows in browser*
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Test-cl10-dynamic.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
    Namespace="CrystalDecisions.Web" TagPrefix="CR" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <link href="https://answers.sap.com/aspnet_client/System_Web/2_0_50701/CrystalReportWebFormViewer3/css/default.css"
        rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="True"
            Height="1039px" ReportSourceID="CrystalReportSource1" Width="901px" />
        <CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
            <Report FileName="C:\inetpub\wwwroot\CrystalReports\Transcript_ReportV3.rpt">
            </Report>
        </CR:CrystalReportSource>
    </div>
    </form>
</body>
</html>

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
}

'************ *This does not work - report hangs after entring authenticaion information*<%@ Page Language="VB" AutoEventWireup="true" CodeFile="Test1-dynamic.aspx.vb" Inherits="Test1" %>
<%@ Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" Namespace="CrystalDecisions.Web" TagPrefix="CR" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

<head id="Head1" runat="server">
    <title></title>
    <link href="https://answers.sap.com/aspnet_client/System_Web/2_0_50701/CrystalReportWebFormViewer3/css/default.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <asp:Label id="MyText" runat="server" />
    <CR:CrystalReportViewer ID="CrystalReportViewer" runat="server" AutoDataBind="True" Height="1039px" Width="901px" />
    </div>
    </form>
</body>
</html>

Partial Class Test1
    Inherits System.Web.UI.Page

    Dim Test1 As New CrystalDecisions.CrystalReports.Engine.ReportDocument

    Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init

        Response.Write("Report Path = " & Server.MapPath("Transcript_ReportV3.rpt") & "</BR>")
        Test1.Load(Server.MapPath("Transcript_ReportV3.rpt"))

        With CrystalReportViewer
            .ReportSource = Test1
        End With

    End Sub
End Class

Edited by: Don Williams on Jan 27, 2012 9:17 AM

0 Kudos

Looks to me like you don't have this defined anywhere:

Test1.Load(Server.MapPath("Transcript_ReportV3.rpt"))

Where is Server.MapPath defined, that is usually used if you are using BOE and Managed reports.

Try adding a folder Mapping to where the reports are saved and then giving IIS permissions on the folder.

Don

Former Member
0 Kudos

Hi

Test1.Load(Server.MapPath("Transcript_ReportV3.rpt")) - This points to the same drive, folder, report that works with the report reference in the aspx that works - C:\inetpub\wwwroot\CrystalReports\Transcript_ReportV3.rpt. I display Server.MapPath("Transcript_ReportV3.rpt") in the browser to confirm it is pointing to the same report.

The only difference is that the report is loaded from the code behind.

I changed to use Test1.Load("C:\inetpub\wwwroot\CrystalReports\Transcript_ReportV3.rpt") like the aspx, but still get the hang.

I would need to investigate what you suggested and try to set-up the mapping permission.

Don't the aspx and vb compile and run under the same worker process and permissions? Funny that the aspx works and codebehind hangs.

Former Member
0 Kudos

Hello,

Getting back to this one after being side tracked.

last we left this journey - the crytal report was appearing when all done through the aspx - worked fine!! When try to load through code behind get the hang mentioned above after entering login credentials.

Any other thoughts on how to resolve - I woufd leave as is but need to add some additional logic in the code behind.

Thanks for any suggestions.

0 Kudos

Start debugging and find out exactly what and where it's hanging. Likely permissions to report folder.

Don

Answers (0)