c# 4.0 - Filling rdlc report via asp.net code -


I am trying to fill the RDLC report with the dataset I have typed. I am trying to fill it through code, but I do not know what to put in specific places.

The name of the dataset is GPSDBDataSet.exd, the name of the report if the report is RDL, the name of the draftscher is coordinates

Using Microsoft. Reporting. Webform;

  Public Partial Category _Default: System.Web.UI.Page {Secure Zero Page_load (Object Sender, EventArgs E) {ReportViewer1 = Visible True; ReportDataSource rds = New ReportDataSource (); ReportViewer1.Reset (); ReportViewer1.ProcessingMode = ProcessingMode.Local; Local Report Rep = Report Details 1 Local reports; rep.Refresh (); rep.ReportPath = "Report.rdlc"; rds.Name = ???????; rds.value = ???? rep.dataSources.Add (RDS); }}    

It's been a while, but try it out.

Rds.name = "yourdatasetname" // In your case it should be up to cadinates

rds.value = ds.table [0];

Code Dataset DS = New Dataset ();

  try {ds = retrieveData (); // Some functions that give dataset ... ReportDataSource reportDataSource = new ReportDataSource (); // RDLC report should match datasource to datasource.name = "dataset 1"; // Coordinate in your case Report DataSource.Value = ds.Tables [0]; ReportViewer1.LocalReport.DataSources.Clear (); ReportViewer1.LocalReport.DataSources.Add (reportDataSource); ReportViewer1.LocalReport.Refresh (); } Hold (exception before) {new exception ("error generated report", prior); }    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -