Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problem in open Crystal Reports After Upgrade SAP 9.0 PL 05 to PL 09

Dear All,

When I Upgrade Success Full of SAP 9.0 PL 05 To SAP 9.0 PL 09, then i am unable to open Crsyal Reports on Visual Studio Windows Form.

and i faced on oRPT.SetDatasource then i put the code-

startup useLegacyV2RuntimeActivationPolicy="true">

    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />

  </startup>

After this i able to set Datasource for RPT.


But

oform.ShowDialog();

After this Windows form go in not responding not able to see .


I am giving all the source code detail.


              Form1 oform = new Form1();

                oform.Text = strReportName1;

               oRPT.Load(strCompletePath2);

                oRPT.SetDataSource(oDTReport);

                CrystalDecisions.CrystalReports.Engine.SubreportObject oSubReport;

                CrystalDecisions.CrystalReports.Engine.ReportDocument rptSubReportDoc;

               foreach (CrystalDecisions.CrystalReports.Engine.Table oMainReportTable in oRPT.Database.Tables)

                    oMainReportTable.SetDataSource(oDTReport)  ;

                foreach (CrystalDecisions.CrystalReports.Engine.Section rptSection in oRPT.ReportDefinition.Sections)

                {

                    foreach (CrystalDecisions.CrystalReports.Engine.ReportObject rptObject in rptSection.ReportObjects)

                    {

                        if (rptObject.Kind == CrystalDecisions.Shared.ReportObjectKind.SubreportObject)

                        {

                            oSubReport = (CrystalDecisions.CrystalReports.Engine.SubreportObject)rptObject;

                            rptSubReportDoc = oSubReport.OpenSubreport(oSubReport.SubreportName);

                            rptSubReportDoc.SetDataSource(oDTReport);

                            

                        }

                    }

                }

              

                oform.crystalReportViewer1.ReportSource = oRPT;

                Form2 oform1 = new Form2();

                oform1.Text = strReportName1;

                #region Common Code For All Crystal Reports

                oform.crystalReportViewer1.RefreshReport();

                oform.crystalReportViewer1.DisplayGroupTree = false;

                oform.crystalReportViewer1.EnableDrillDown = false;

                oform.TopMost = true;

                oform.Focus();

                oform.ShowDialog();

                //System.Windows.Forms.Application.Run(oform);

                oform.Activate();

                oDTReport = null;

This is code is running on SAP 9.0 PL 05 when i upgrade then why i am not able to see reports from Any machine.

Please advice me if you have any Solution.

Thanks in Advanced.

Ashish,

Former Member
Not what you were looking for? View more on this topic or Ask a question