Problem to the show report

Hi,

I've been testing the Fast Report Open Source, but when I fill data, it throw exception:

"Object reference not set to an instance of an object.", StackTrace FastReport.Data.DataSourceBase.RowComparer..ctor (Report report, DataSourceBase dataSource, String [] expressions, Boolean [] descending) ...


// Code

model.WebReport.Report.Load (Path.Combine (ReportsFolder(), "MyReport.frx"));

PostgresDataConnection conn = new PostgresDataConnection ();

conn.ConnectionString = "myconnection";

conn.CreateAllTables ();

model.WebReport.Report.Dictionary.Connections.RemoveAt (0);

model.WebReport.Report.Dictionary.Connections.Add (conn);

model.WebReport.Report.RegisterData (ds.Tables [0], "Data");

model.WebReport.Report.FindObject ("Data"). SetName ("DataReport"); //Name how is in the .frx report

model.WebReport.Report.Prepare (); // when it reach here exception

model.WebReport.Report.Refresh ();


Note: The columns of report are the same of DataTable,

Leave a Comment