After I rendered report in my ASP.NET web application, I want check if datasource is empty or not (datasource have rows or not).
If data exist I want proceed with generating PDF, and if is empty I don't want do this.
Does exist way for checking if is empty data before I generate PDF?
I using following syntax in my web application:
Best regards,using (StiReport report = new StiReport())
{
report.Load(HttpContext.Current.Server.MapPath("../Reports/CourseWWorks.mrt"));
report.Dictionary.Variables["idcourse"].ValueObject = 55;
report.Dictionary.Variables["iduser"].ValueObject = 100;
Stimulsoft.Report.Dictionary.StiSqlDatabase sqlDB = (Stimulsoft.Report.Dictionary.StiSqlDatabase)report.Dictionary.Databases[0];
sqlDB.ConnectionString = DataLayer.GetConnectionString;
report.Render(false);
/*
This is place where I want make checking !
*/
Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(CurrentPage, report, true);
}
Sasa