Working with reports without DataSource
I want to be able to design a report and use it without a DataSource. I want to fill the data programatically in the various controls of the report.
What would be the best way to do this?
What would be the best way to do this?
Comments
TextObject text1 = report1.FindObject("Text1") as TextObject;
text1.Text = "my text";
Yes but what should I do to make a new band for every new row in my data? The same as FastReport does automatically when connected to a DataSource.
In the piece of code above, "Text1" is actually one control in one DataBand, as designed. However at runtime, when new rows are processed and so new bands are added, every band has its own Text1 control, right?
On a related note, do you plan to change the actual architecture to allow creation of reports as classes derived from FastReport.Report (the same way as VS does for forms) instead of just instances of FastReport.Report ? This way I can access every object in a report directly instead of using FindObject()...
We don't plan to change the architecture. You may save your report as a class. This is described in the programmer's manual, "Working with Windows.Forms/Storing and loading a report".