hi,
I am having this error:
Message:ExecuteReader: CommandText property has not been initialized.
Type:System.InvalidOperationException
at this point:
report.Render(false)
sample code
DataTable dtTemp = new DataTable("lostpassword");
.
.
.
StiReport report = StiReport.GetReportFromAssembly("E:\\Projects\\HRS\\HRS\\lostpassword.dll");
report.RegData(dtTemp);
report.Render(false);
report.ExportDocument(Stimulsoft.Report.StiExportFormat.Pdf, "E:\\Projects\\HRS\\HRS\\" + sUserID + ".pdf");
thank you .
report.Render(false) ExecuteReader Error
report.Render(false) ExecuteReader Error
i am try to clear connection string but the problem still .
report.Dictionary.Databases.Clear();
report.Dictionary.Databases.Add(new StiSqlDatabase("HRS", strConString));
report.Dictionary.Databases.Clear();
report.Dictionary.Databases.Add(new StiSqlDatabase("HRS", strConString));
report.Render(false) ExecuteReader Error
Hello,
You are use Data from Sql database and from DataTable at same time?
Thank you.
You are use Data from Sql database and from DataTable at same time?
Thank you.
report.Render(false) ExecuteReader Error
thank you ,
yes , but how i can useing Data from DataTable Only ?
In other words, how do I delete the link between the report file (during design) and the database?
I deleted The ConnectionString and SQL Stament Manual, but to no avail!
report.Render(false) ExecuteReader Error
Hello,
You can use following code:
If you need replace Sql Source by DataTable DataSource you need use same Name of Data Source.
Thank you.
You can use following code:
Code: Select all
report.Dictionary.Databases.Clear();
report.Dictionary.DataSources.Clear();
report.RegData(dataTable);
report.Dictionary.Synchronize();
Thank you.