Using the Form to Select Columns
Our sample projects and report templates can help you learn the basics of working with our products.The report template drives which data columns are printed; the host only loads data, binds it and opens the report so the selection can be applied.
Bind data and open the report.
How it works. Column choice lives in the
Bind data and open the report.
var data = new DataSet();
data.ReadXmlSchema("Demo.xsd");
data.ReadXml("Demo.xml");
var report = new StiReport();
report.Load("SelectingColumns.mrt");
report.RegData(data);
report.Design(); // or report.Show();RegData(dataSet)— makes the dataset available to the template's column-selection logic.Design()opens the designer,Show()opens the viewer — both honour the columns chosen in the template.
How it works. Column choice lives in the
.mrt, so the same code produces different printed columns without any change to the application.