Reusing report with different data - dictonary not synched
Posted: Tue May 21, 2013 11:53 am
Why doesn't this work?:
The data of the second printout is still 10.00m instead of 20.00. The form only contains a databand with a single field.
Code: Select all
var report = new StiReport();
var data1 = new
{
Amount = 10.0m,
};
report.Dictionary.Clear();
report.RegData("Voucher", data1);
report.Dictionary.Synchronize();
report.Design();
report.Print();
Console.ReadLine();
var data2 = new
{
Amount = 20.0m,
};
report.Dictionary.Clear();
report.RegData("Voucher", data2);
report.Dictionary.Synchronize();
report.Dictionary.SynchronizeBusinessObjects(100);
report.Print();