Tag: crystal reports

在c#中执行水晶报表时TLV记录无效

我正在创建一个C#程序,它将显示使用水晶报告创建的报告。 我已经完成了报告。 但是,当我试图在C#中查看报告时,它提示我一个错误,即“ INVALID TLV RECORD ”。 可能是什么原因? 请帮忙。 谢谢。 码: private void reportViewer1_Load(object sender, EventArgs e) { CRAXDRT.Report rpt = new CRAXDRT.Report(); CRAXDRT.Application app = new CRAXDRT.Application(); rpt = app.OpenReport(Application.StartupPath + “\\Reports\\Pay2Final.rpt”, null); } 错误信息:

在运行时隐藏水晶报表中的列?

如何在运行时隐藏水晶报表中的列? 谢谢你的任何建议。

Crystal报表查看器不会出现在工具箱中 – Visual Studio 2010

我有一个ac #windows窗体应用程序,在安装了适用于Visual Studio 2010的SAP Crystal Report之后(http://www.businessobjects.com/jump/xi/crvs2010/default.asp),我无法在工具箱中看到Crystal Report Viewer。 我究竟做错了什么?

为Crystal Reports中的参数指定多个值

我已在报表中添加了一个参数,并选中了“允许多个值”选项。 这是一个状态列(IE,Proposed,In Progress,Completed,Cancelled),我希望用户能够选择要报告的不同OrderStatus(以及多少个)。 我通常如何设置参数是: report.SetParameterValue(“@dtBegin”, dtBegin.DateTime); 我试图为多个值做的是这样的: //pseudo loop foreach(int intOrderStatus in intSelectedOrderStatuses) { report.Parameter_OrderStatus.CurrentValues.AddValue(intOrderStatus); } 我已检查它是否将值添加到OrderStatus参数,但是当报表运行时,会弹出CrystalReports对话框并要求我输入OrderStatus参数的值。 因此,似乎值不会“提交”到参数。 我做了很多搜索,无法弄清楚它为什么不起作用。 谢谢,

清理Crystal Reports ReportDocument对象使用的资源的最佳方法是什么?

我正在开发一个使用Crystal Reports进行报告的应用程序。 它在ReportDocument对象中打开一个给定的报告,完成它需要做的事情然后关闭报告。 using (var report = OpenReport(reportSourceInfo)) { // Do stuff with the report report.Close(); } OpenReport方法对源文件进行一些validation,并返回一个打开的ReportDocument对象。 测试表明,此代码完成了它的意图并且似乎没有任何问题。 我真正建议的问题是当我进行报告项目的代码分析(CA)构建时,我得到以下CA消息: CA2202:Microsoft.Usage:对象’report’可以在方法’CrystalReportingProvider.ReportExecute(ReportSourceInformation)’中多次处理。 为避免生成System.ObjectDisposedException,不应在对象上多次调用Dispose。 现在显然我可以改变代码,所以我没有得到这个CA警告,但我的问题是我应该吗? Crystal Reports ReportDocument.Close()方法是否可以正确处理资源清理? 该消息似乎表明Close方法调用Dispose方法,但这似乎不正确。 任何意见,将不胜感激。

打开/关闭抽屉的C#代码并同时打印收据?

有没有人知道如何创建一个C#应用程序,可以打开连接到计算机的抽屉并同时打印收据? 抽屉名称:PCD-354电子现金抽屉 现金收据打印机:Epson TM-T88v

Visual Studio 2013中的Crystal Reportsexception

rptdoc.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, “DO- ” + DateTime.Now.ToString(“dd-MM-yyyy HHmmss”)); 上面的代码行抛出了这个exception: CrystalDecisions.CrystalReports.Engine.dll中出现“System.MissingMethodException”类型的exception,但未在用户代码中处理 其他信息:找不到方法:’CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag CrystalDecisions.ReportAppServer.ReportDefModel.ISCRExportOptions.get_ExportOptionsEx()’ 我正在使用Visual Studio 2013和Crystal Reports 13

如何将参数发送到Crystal Reports中的子报表

使用VS 2008。 我有两个存储过程,一个用于获取主报表的数据,另一个用于Sub报表,两个SP都使用相同的参数QuoteID。 我使用ReportDocument将参数发送到主报表。 但我不知道如何将参数发送到SubReport。 我尝试了很多使用reportdocument的setparameter方法的diff方法,该方法也将子报告名称作为参数。但它没有。 以下是我使用过的代码 string Type = gvQuotationDetails.Rows[QuoteIndex].Cells[“Type”].EditedFormattedValue.ToString(); FilePath = ConfigurationManager.AppSettings[“EMP_IMG_PATH”].ToString() + “\\” + ValQuoteID.ToString() + “.pdf”; DeleteExistingFile(FilePath); try { AccountsPayableMaster objAPM = new AccountsPayableMaster(); QuotationReport obj = new QuotationReport(); objReportDocument.Load(Application.StartupPath + @”\rptQuotationReport.rpt”); obj.crysQuotationReport.LogOnInfo = objAPM.ConnectionDetails(“SD_SalesOrderReport;1”); obj.crysQuotationReport.LogOnInfo = objAPM.ConnectionDetails(“SD_GetBatchReportDetails;1”); obj.crysQuotationReport.ReportSource = objReportDocument; objReportDocument.SetParameterValue(“@QuoteID”, ValQuoteID); objReportDocument.SetParameterValue(“Type”, Type); //objReportDocument.Subreports[Application.StartupPath + @”\BatchSubReport.rpt”].SetParameterValue(“@QuoteID”, ValQuoteID); //objReportDocument.Subreports[“BatchReport.rpt”].SetParameterValue(“@QuoteID”, ValQuoteID); […]

如何动态更改crystal report数据库连接

我是水晶报道的新手。 我尝试使用报告向导visual studio 2012在我的win form c#应用程序中实现水晶报告,所以不知道反手发生了什么。 一切都在我的计算机上运行良好,但当我尝试在另一台计算机上安装此连接字符串更改并给出错误。 我尝试了许多链接,如动态连接字符串更改,但因为我使用报告向导进行设置,所以不知道在哪里使用它。 我还在报告向导中尝试了连接字符串的所有选项,但没有找到任何在运行时更改连接字符串的内容。 是否有任何选项可以attach connection String from app config at run time 。

如何在Crystal Report中合并行?

我正在使用Crystal Report Version = 10.2,Visual Studio 2008并在crystal report中显示存储过程的结果,我的存储过程返回输出,如下所示 但我想在报告中显示如下所示 提前致谢