Click here to Skip to main content
15,885,904 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello


Here i have to generate crystal report from sql server data .Here i am working on visual studio 2010 and sap crystal report 2008 on windows 10.
I have installed
CRRuntime_64bit_13_0_12
for crystal report.

When i did same thing on windows 7 it works fine .but when i am going to switch from windows 7 to windows 10 ,then it gives following error
Method not found: 'CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag CrystalDecisions.ReportAppServer.ReportDefModel.ISCRExportOptions.get_ExportOptionsEx()'.


Please help me its very urgent.

thanks

What I have tried:

This is my code
SqlConnection conn=null;
           string filename = "";
           try
           {
                conn = new SqlConnection(DataUtil.getconnection());

               ReportDocument objRpt = new ReportDocument();
               conn.Open();
              // MessageBox.Show("MRN_ID=" + MyGlobale.MRN_ID1);

               SqlDataAdapter ad = new SqlDataAdapter();
               SqlParameter param;
               cmd.Connection = conn;
               cmd.CommandType = CommandType.StoredProcedure;
               cmd.CommandText = "proc_MRNDETAIL_PRINT";
               param = new SqlParameter("@MRN_ID", MyGlobale.MRN_ID1);
               param.DbType = DbType.Int32;
               cmd.Parameters.Add(param);

               ad = new SqlDataAdapter(cmd);
               MessageBox.Show("AD=" + ad);
               MRN_DataSet ds = new MRN_DataSet();
               ad.Fill(ds, "MRN");
               MessageBox.Show("count" + ds.Tables[0].Rows.Count);

               if (ds.Tables[0].Rows.Count == 0)
               {
                   MessageBox.Show("No data Found", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                   return;
               }
               else
               {
                   MessageBox.Show(Application.StartupPath);

                   objRpt.Load(Application.StartupPath + "/mrnPrint.rpt");
                   objRpt.SetDataSource(ds.Tables[0]);

                   objRpt.Refresh();

                   //MessageBox.Show("object=" + objRpt);
                   try
                   {

                      string result = Path.GetTempPath();
                       objRpt.ExportToDisk(ExportFormatType.PortableDocFormat, result + filename + ".pdf");
                       MessageBox.Show("File exported in temp folder");
                       System.Diagnostics.Process.Start(result + filename + ".pdf");
                       ClearAll();
                   }


                   catch (Exception ex)
                   {
                       MessageBox.Show(ex.Message);
                       Console.WriteLine(ex.Message);
                       ex = null;
                   }
               }
           }
           // ad.Fill(dt);

           catch (Exception ex)
           {
               ex.ToString();

           }
           finally
           {
               conn.Close();
           }



When i am going to shows dataset count
i.e
MessageBox.Show("count" + ds.Tables[0].Rows.Count);
it gives count2
Here

objRpt.ExportToDisk(ExportFormatType.PortableDocFormat, result + filename + ".pdf");

it shows this exception
Method not found: 'CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag CrystalDecisions.ReportAppServer.ReportDefModel.ISCRExportOptions.get_ExportOptionsEx()'.


Please help me.
Posted
Updated 4-May-18 0:56am

1 solution

Hi,

I think you have to check Here[^]

--RA
 
Share this answer
 
Comments
Maciej Los 4-May-18 8:49am    
5ed!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900