Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Still Struggling & Need Assistance
Message
Information générale
Forum:
ASP.NET
Catégorie:
Rapports
Divers
Thread ID:
01504280
Message ID:
01504376
Vues:
45
It's not clear where you are getting the message from - looks like it's meant to represent a MessageBox.
What is the exact exception (and any inner exceptions) thrown by the SetDataSource() line ?

>I am really stuck here. This app runs fine on my PC, bhut when I try to generate the report on the client's server, I'm getting
>
>
>---------------------------
>Application Error
>---------------------------
>Application has generated an exception that could not be handled.
>
>Process ID=0x16d8 (5848), Thread ID=0x1170 (4464).
>
>Click OK to terminate the application.
>Click CANCEL to debug the application.
>---------------------------
>OK   Cancel   
>---------------------------
>
>
>Here's the code:
>
>
>
>private void _RunReport()
>{
>    try
>    {
>
>        // The selected project Id
>        int ProjectId = (int)cboProjects.SelectedValue;
>
>        // Create the project object
>        csCOSApp.ActiveProject = new csCOSProject();
>        csCOSApp.ActiveProject.ProjectId = ProjectId;
>        csCOSApp.ActiveProject.LoadData();
>
>
>
>        // Get the report's data using info from the active project
>        List<DbParameter> Params2 = new List<DbParameter>();
>        Params2.Add(new SqlParameter { ParameterName = "@ProjectId", Value = ProjectId });
>        Params2.Add(new SqlParameter { ParameterName = "@PrimaryWhseId", Value = csCOSApp.ActiveProject.PrimaryWhseId });
>        Params2.Add(new SqlParameter { ParameterName = "@SecondaryWhseId", Value = csCOSApp.ActiveProject.SecondaryWhseId });
>
>        DataSet dsProjectInfo = csCOSApp.DataLayer.ExecuteQuery("ap_GetProjectReportData", Params2, CommandType.StoredProcedure);
>
>
>        // Create an instance of the Crystal .RPT file
>        rptCorporateViewReport reportObj = new rptCorporateViewReport();
>
>
>        // Set the report's data source to the DataTable
>        reportObj.SetDataSource(dsProjectInfo.Tables[0]);       // <=====   APP DIES HERE
>
>        // Assign the report to the viewer
>        crlReportViewer.ReportObject = reportObj;
>    }
>    catch (Exception e)
>    {
>        logMessage(e.ToString());
>        throw e;
>    }
>}
>
>While I have made some slow progress in getting to this point, I need to deliver this report right now. Anyone see anything here?
>
>Thanks
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform