localreport

Getting the relative path to the rdlc report in my winform app

巧了我就是萌 提交于 2019-12-18 15:55:10
问题 I am automatically creating a PDF from some of our reports in a month-end process. I am running into a problem where ReportViewer.LocalReport can't find my report. Within the project, the report files are in "(project root folder)/Reports/report.rdlc". How do I set ReportViewer.LocalReport.ReportPath so I can reference my report file? I would rather not set the full path because I don't know where it would be installed when installed on the client machines. 回答1: Use the Application

.NET LocalReport / .rdlc AppDomain issues

こ雲淡風輕ζ 提交于 2019-12-12 10:58:06
问题 I'm using Microsoft.Reporting.WebForms.LocalReport and .rdlc Report files to generate .pdf:s. This is done in the background in a Windows Service (.NET 4.6, x64, VS2015). I'm having two issues: The Windows service keeps consuming memory an eventually OutOfMemoryException is thrown and process terminates At one occation the entire WindowsSerivce terminated with UnhandledException despite everything being enclosed in a try-catch statement. Now, I've read somewhere LocalReport under .NET 4 has

ASP.NET ReportViewer very slow in local mode

↘锁芯ラ 提交于 2019-12-06 03:20:49
问题 I'm using .Net 4.5 and ReportViewer 11 in local mode. My reports are rendered very slowly (10 min). I found in this post that adding <trust legacyCasModel="true" level="Full"/> to web.config will solve the problem, and it did. Report render time went from 10 minutes to 10 seconds, but now my dynamic variables in other parts of the system don't work. This is the error: Dynamic operations can only be performed in homogenous AppDomain. Is there a way to set <trust legacyCasModel="true" level=

Getting the relative path to the rdlc report in my winform app

帅比萌擦擦* 提交于 2019-11-30 13:42:29
I am automatically creating a PDF from some of our reports in a month-end process. I am running into a problem where ReportViewer.LocalReport can't find my report. Within the project, the report files are in "(project root folder)/Reports/report.rdlc". How do I set ReportViewer.LocalReport.ReportPath so I can reference my report file? I would rather not set the full path because I don't know where it would be installed when installed on the client machines. Use the Application.StartupPath property, it always points to directory where your EXE is located: using System.IO; ... string exeFolder =

how to set Datatable as datasource in ReportViewer

≯℡__Kan透↙ 提交于 2019-11-28 01:46:57
问题 I was searching in the last question about Datatable as datasource in ReportViewer and i found this as solution DataTable table = new DataTable(); table.Columns.Add("value", typeof(string)); table.Columns.Add("price", typeof(string)); table.Columns.Add("quantity", typeof(string)); table.Rows.Add("test1","10","20"); table.Rows.Add("test2", "10", "20"); reportViewer1.LocalReport.DataSources.Clear(); ReportDataSource rprtDTSource = new ReportDataSource("TITLE",table); reportViewer1.LocalReport

.NET DataTable skips rows on Load(DataReader)

不羁的心 提交于 2019-11-27 14:38:22
I'm trying to populate a DataTable, to build a LocalReport, using the following: MySqlCommand cmd = new MySqlCommand(); cmd.Connection = new MySqlConnection(Properties.Settings.Default.dbConnectionString); cmd.CommandType = CommandType.Text; cmd.CommandText = "SELECT ... LEFT JOIN ... WHERE ..."; /* query snipped */ // prepare data dataTable.Clear(); cn.Open(); // fill datatable dt.Load(cmd.ExecuteReader()); // fill report rds = new ReportDataSource("InvoicesDataSet_InvoiceTable",dt); reportViewerLocal.LocalReport.DataSources.Clear(); reportViewerLocal.LocalReport.DataSources.Add(rds); At one

.NET DataTable skips rows on Load(DataReader)

拥有回忆 提交于 2019-11-26 16:50:02
问题 I'm trying to populate a DataTable, to build a LocalReport, using the following: MySqlCommand cmd = new MySqlCommand(); cmd.Connection = new MySqlConnection(Properties.Settings.Default.dbConnectionString); cmd.CommandType = CommandType.Text; cmd.CommandText = "SELECT ... LEFT JOIN ... WHERE ..."; /* query snipped */ // prepare data dataTable.Clear(); cn.Open(); // fill datatable dt.Load(cmd.ExecuteReader()); // fill report rds = new ReportDataSource("InvoicesDataSet_InvoiceTable",dt);