When should I attach data - before loading of a report or after it?
It does not matter. See the example:
Example 1:
C#
StiReport report = new StiReport();
report.Load("MyReport.mrt");
report.RegData("MyDataSet",dataSet1);
VB
Dim Report As StiReport = New StiReport()
Report.Load("MyReport.mrt")
Report.RegData("MyDataSet",DataSet1)
Example 2:
C#
StiReport report = new StiReport();
report.RegData("MyDataSet",dataSet1);
report.Load("MyReport.mrt");
VB
Dim Report As StiReport = New StiReport()
Report.RegData("MyDataSet",DataSet1)
Report.Load("MyReport.mrt")
Both examples are equivalent.