Tag: 报告

如何使用首先通过代码创建的数据库填充谷歌图表 – ASP.Net MVC

我想用我使用Code First方法创建的数据库中的数据替换下面代码中的硬编码数据。 但是,我完全不知道是怎么回事,因为我还是很陌生。 Google Chart与硬编码值完美配合,但如何使用我数据库中的实际数据来处理它是我的理解结束的地方。 关于如何使用硬编码数据但没有使用数据库中的数据,有很多教程(在Code First上)。 有人可以请我详细介绍一下如何做到这一点,以便我能更好地理解它吗? 我将非常感谢并提前感谢! 如果需要任何其他信息,请告诉我,我会尝试将其添加到问题中。 模型: using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace HealthHabitat.Models { public class ProductModel { public string YearTitle { get; set; } public string SaleTitle { get; set; } public string PurchaseTitle { get; set; } public Product ProductData { get; set; } } […]

无打印机选择对话框打印

我想直接打印我的水晶报告,没有打印机选择弹出窗口。 我怎样才能做到这一点 ? myReportDocument.SetDataSource(saveDataSet); //Print crystalReportViewer1.ShowRefreshButton = false; crystalReportViewer1.ShowCloseButton = false; crystalReportViewer1.ShowGroupTreeButton = false; crystalReportViewer1.ReportSource = myReportDocument; crystalReportViewer1.PrintReport(); 我正在使用默认(且仅限)打印机。

从列表(entity framework)提供RDLC(本地)报告报告

我得到了一个学生的BiningList (entity framework创建的类)。 我只想从中提供我的RDLC报告,而不是使用DataSet或存储过程。 该类包含多个属性,如: string Name; string FamilyName; string Mid; DateTime Birth; … 任何人都可以帮助我吗?

Rdlc tablix列标题在每个页面上不重复“已在每个页面上重复列标题”已经过检查

这是我的tablix属性 我错过了什么? 请帮忙谢谢!

如何将textbox / Combobox值传递给rdlc报告文本字段?

我的项目中的c#,mysql。 在那里我创建了一个rdlc报告。 我不知道将winform文本框值传递给rdlc报告文本字段。 我用Google搜索并尝试了一些代码。 但是不能那样。 如果你在报告中工作。 请帮我。 我的要求是,.. 我正在做大学项目。 在那他们问了bonafide证书。 所以我创建了一个winform,包括reportviwer,名称,课程,年份,学期,学年,目的文本框和一个按钮。 填充文本框时单击按钮。 那些文本值想要传递记录文本框。 有可能吗? 我的报告…

如何使用PrintDocument在热敏打印机上打印文本文件?

我正在使用带有Winforms的C#创建一个应用程序,现在我需要在热敏打印机上打印销售收据。 要做到这一点,我正在创建一个文本文件,并使用PrintDocument读取它进行打印,但我不能这样做,因为我不知道如何配置纸张大小,在纸张上对齐文本中心,以及其他配置。 当我打印文本文件被打印,但所有杂乱,并在结束打印后纸张没有停止。 我怎么能这样做? 试。 private PrintDocument printDocument = new PrintDocument(); private static String RECEIPT = Environment.CurrentDirectory + @”\comprovantes\comprovante.txt”; private String stringToPrint = “”; private void button1_Click(object sender, EventArgs e) { generateReceipt(); printReceipt(); } private void generateReceipt() { FileStream fs = new FileStream(COMPROVANTE, FileMode.Create); StreamWriter writer = new StreamWriter(fs); writer.WriteLine(“==========================================”); writer.WriteLine(” NOME DA EMPRESA AQUI […]

如何将数据表加载为ReportDataSource?

我想做的事情如下: this.reportViewer.LocalReport.DataSources.Clear(); DataTable dt = new DataTable(); dt = this.inputValuesTableAdapter.GetData(); Microsoft.Reporting.WinForms.ReportDataSource rprtDTSource = new Microsoft.Reporting.WinForms.ReportDataSource(); rprtDTSource = dt; // this line generates exception //this.reportViewer.LocalReport.DataSources.Add(rprtDTSource); this.reportViewer.RefreshReport(); 如何将数据表加载为ReportDataSource? 当前代码生成: “无法将类型’System.Data.DataTable’隐式转换为’Microsoft.Reporting.WinForms.ReportDataSource’”

设置本地报告的数据源 – .NET和报告查看器

我创建了一个自定义控件(带有报表查看器的Windows窗体)。 我有以下代码来加载本地报告: 包含在CustomReportViewer类中 //Load local report this.reportViewer1.ProcessingMode = ProcessingMode.Local; //enable loading of external images this.reportViewer1.LocalReport.EnableExternalImages = true; //pass the report to the viewer using (FileStream stream = new FileStream(filename, FileMode.Open)) { this.reportViewer1.LocalReport.LoadReportDefinition(stream); } 我用这个叫: CustomReportViewer reportViewer = new CustomReportViewer(); 这工作正常,出现一个包含报表查看器控件的窗体, 但我收到以下消息: A data source instance has not been supplied for the data source “ReportData” 我不完全确定如何设置数据源? […]