locked
CRYSTAL REPORT CANNOT GENARATE IN ASP.NET AFTER HOST. RRS feed

  • Question

  • User236073396 posted

    Hi,

     

    I created a crystal report output using asp.net to be used for multiple people. I used the template ASP.NET crystal report to create the report. Its created and run successfully during development in MS visual studio 2008. But after host ,the default.aspx page will ask the SERVER NAME,DATABASE NAME,USER NAME & PASSWORD. Server name and user Name will come automatic and I need to give only password. When I am giving password to run the report before hosting its working but after hosting the report is not coming after press logon button.

     

    Is there any control is missing or the database details rather than report do I need to provide anywhere. please advice. 

     

    Refeesh Aliyar 

    Tuesday, April 2, 2013 9:19 AM

Answers

  • User-1137493631 posted

    you have to configure your crystal report like this,

    private void configureCRYSTALREPORT()
    {
    	ConnectionInfo myConnectionInfo = new ConnectionInfo();
    
    	myConnectionInfo.DatabaseName = "DBName";
    	myConnectionInfo.UserID = "UID";
    	myConnectionInfo.Password = "PWD";
    	setDBLOGONforREPORT(myConnectionInfo);
    }
    
    private void setDBLOGONforREPORT(ConnectionInfo myconnectioninfo)
    {
    	TableLogOnInfos mytableloginfos = new TableLogOnInfos();
    	mytableloginfos = CrystalReportViewer1.LogOnInfo;
    	foreach (TableLogOnInfo myTableLogOnInfo in mytableloginfos) {
    		myTableLogOnInfo.ConnectionInfo = myconnectioninfo;
    	}
    
    }



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, April 2, 2013 8:00 PM

All replies

  • User-1137493631 posted

    you have to configure your crystal report like this,

    private void configureCRYSTALREPORT()
    {
    	ConnectionInfo myConnectionInfo = new ConnectionInfo();
    
    	myConnectionInfo.DatabaseName = "DBName";
    	myConnectionInfo.UserID = "UID";
    	myConnectionInfo.Password = "PWD";
    	setDBLOGONforREPORT(myConnectionInfo);
    }
    
    private void setDBLOGONforREPORT(ConnectionInfo myconnectioninfo)
    {
    	TableLogOnInfos mytableloginfos = new TableLogOnInfos();
    	mytableloginfos = CrystalReportViewer1.LogOnInfo;
    	foreach (TableLogOnInfo myTableLogOnInfo in mytableloginfos) {
    		myTableLogOnInfo.ConnectionInfo = myconnectioninfo;
    	}
    
    }



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, April 2, 2013 8:00 PM
  • User236073396 posted

    hi,

    i applied the below code and still in hosting the same no error message but its not moving to the report window or report. please advice.

    -------------------------------------------------------------------------------

    Imports CrystalDecisions.Shared
    Imports CrystalDecisions.CrystalReports.Engine
    Imports CrystalDecisions.Web

    Partial Class _Default
    Inherits System.Web.UI.Page

    Private Sub configureCRYSTALREPORT()

    Dim myConnectionInfo As New ConnectionInfo()

    myConnectionInfo.DatabaseName = "EDSS"

    myConnectionInfo.UserID = "EDSS"

    myConnectionInfo.Password = "EDSS"

    setDBLOGONforREPORT(myConnectionInfo)

    End Sub

    Private Sub setDBLOGONforREPORT(ByVal myconnectioninfo As ConnectionInfo)

    Dim mytableloginfos As New TableLogOnInfos()

    mytableloginfos = CrystalReportViewer1.LogOnInfo

    For Each myTableLogOnInfo As TableLogOnInfo In mytableloginfos

    myTableLogOnInfo.ConnectionInfo = myconnectioninfo

    Next

    End Sub


    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    ' CrystalReportSource1.Report.FileName = "C:\RPT\CRYSTALREPORT1.RPT"
    configureCRYSTALREPORT()

    End Sub
    End Class



    Monday, April 15, 2013 6:57 AM
  • User236073396 posted

    Is it compulsory that i have to install the crystal report developer on the hosted server. 

    Monday, April 15, 2013 8:17 AM