Link to home
Start Free TrialLog in
Avatar of vensali
vensaliFlag 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
Avatar of Mike McCracken
Mike McCracken

WHat version of Crystal?
Some will have issues with IIS7

WHat application are you using to display the reports?

mlmcc
Avatar of 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 ?
Avatar of 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
You have the Crystal display code inside the ELSE clause.

mlmcc
Avatar of 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.
Are you sure the dataset has data?

mlmcc
Avatar of vensali

ASKER

same application when opened from local machine works fine
WIll the recordset have more than 1 row?  You are only checking 1 row.

mlmcc
Avatar of vensali

ASKER

the dataset is having only one row
Have you displayed the data in the application?

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

mlmcc
ASKER CERTIFIED SOLUTION
Avatar of vensali
vensali
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of vensali

ASKER

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