Crystal报表不适用于Windows 10 [英] Crystal report is not working on windows 10

查看:117
本文介绍了Crystal报表不适用于Windows 10的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好





这里我必须从sql server data生成水晶报告。我正在研究visual studio 2010和sap Windows 10上的水晶报告。

我已经为水晶报告安装了

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





当我在Windows 7上做同样的事情它工作正常。但是当我要从Windows 7切换到Windows 10时,它会出现以下错误

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);

它给count2

这里



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.

推荐答案





我认为你必须检查这里 [ ^ ]



--RA
Hi,

I think you have to check Here[^]

--RA


这篇关于Crystal报表不适用于Windows 10的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆