Can I RegisterDate in reportscript?
Can I create a report file and load data from external file with frx report script?
load report with designer, read multiple json files, sql query, mixed the data and put together in datatable then registerdata to report
Comments
Hello!
Yes, you can create a DataTable or DataSet (by reading files or a database) and register them using Report.RegisterData(...) directly within the report script in the _StartReport handler.
Example:
private void _StartReport(object sender, EventArgs e) { var dt = new System.Data.DataTable("MyData"); dt.Columns.Add("Name", typeof(string)); dt.Rows.Add("FromScriptRow1"); Report.RegisterData(dt, "MyData"); var ds = Report.GetDataSource("MyData"); ds.Enabled = true; Data1.DataSource = ds; }