FastReport
FastReport copied to clipboard
how to replace design jsondatasource when print report?
my code.
// create report instance
Report report = new Report();
// load the existing report
report.Load($@"{inFolder}\report.frx");
// register the data list
report.RegisterData(data,"JSON");
// prepare the report
report.Prepare();
when print report, report data not change. how to right assignment json data when print or preview?
use dictionary
@ilivecoding do you have a example of this?
SORRY, NO.
Hello!
Try doing it like this:
var builder = new JsonDataSourceConnectionStringBuilder();
builder.Json = "[]";
JsonDataSourceConnection conn = new JsonDataSourceConnection();
conn.ConnectionString = builder.ToString();
report.Dictionary.Connections.Add(conn);
conn.CreateAllTables();
Best regards Marat