Avatar of vensali
vensali
Flag for India asked on

Runtime error when opening crystal report from remote server

I have published Asp.net webapplication in IIS7  of Remote server. I am able to open the application and work with all aspx pages. But when i try to open crystal report in viewer  it throws up the following msg.


Runtime Error
  Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".



<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>
 

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.



<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>


But i am able to open the same through visual studio
ASP.NETCrystal ReportsVisual Basic.NET

Avatar of undefined
Last Comment
vensali

8/22/2022 - Mon
Mike McCracken

WHat version of Crystal?
Some will have issues with IIS7

WHat application are you using to display the reports?

mlmcc
vensali

ASKER
now I have another problem. In visual studio and local host  I am able to view the report.  When I publish to the remote server ( iis7)  and click on the print button on client  browser nothing is displayed on the client browser page. ( No Error message also)

I have copied the reports folder to the published folder on the remote server.  What might be issue ?
vensali

ASKER
Report is developed in SAP Crystalreports for vs2010.  Report is viewed in crystal report viewer placed on aspx page.

Code in the said aspx page is as below

 Private Sub Page_Init(sender As Object, e As System.EventArgs) Handles Me.Init
        ip = Request.QueryString("ip")
        Dim objDis As New UCTrn_Clinical

        Dim ds As New DataSet

        ds = objDis.print(ip)

        If ds.Tables(0).Rows(0)("DS_ENTDATE").ToString = "" Then
            lblmsg.Visible = True
        Else
            lblmsg.Visible = False
            crystalReport.Load(Server.MapPath("~/Reports/DisSumRpt.rpt"))
            crystalReport.SetDataSource(ds.Tables(0))
            CrystalReportViewer1.ReportSource = crystalReport
            CrystalReportViewer1.RefreshReport()
        End If
       

    End Sub
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Mike McCracken

You have the Crystal display code inside the ELSE clause.

mlmcc
vensali

ASKER
This is to check whether discharge summary is entered or not.  Only if the discharge summary is entered then only report is displayed.
Mike McCracken

Are you sure the dataset has data?

mlmcc
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
vensali

ASKER
same application when opened from local machine works fine
Mike McCracken

WIll the recordset have more than 1 row?  You are only checking 1 row.

mlmcc
vensali

ASKER
the dataset is having only one row
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Mike McCracken

Have you displayed the data in the application?

Perhaps the arrays (because they are for Crystal) are 1 based.

mlmcc
ASKER CERTIFIED SOLUTION
vensali

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
vensali

ASKER
set enable 32 bit application in appl pool = true and it started working