"This file cannot be opened because it has no pages"!!
Posted: Sat Apr 30, 2011 2:20 am
Hello,
I am trying to use this code in server side :
if (File.Exists(compiledReportFile))
{
_report = StiReport.GetReportFromAssembly(compiledReportFile);
_report.Dictionary.BusinessObjects.Clear();
_report.Dictionary.BusinessObjects.Add(CurrentBusinessObject);
_report.RegBusinessObject(CurrentBusinessObject.Category, CurrentBusinessObject.Name, CurrentBusinessObject.BusinessObjectValue);
_report.Dictionary.SynchronizeBusinessObjects();
_report.Render(false);
}
else
{
_report.Dictionary.BusinessObjects.Clear();
_report.Dictionary.BusinessObjects.Add(CurrentBusinessObject);
_report.RegBusinessObject(CurrentBusinessObject.Category, CurrentBusinessObject.Name, CurrentBusinessObject.BusinessObjectValue);
_report.Dictionary.SynchronizeBusinessObjects();
_report.Compile(compiledReportFile);
_report.Render(false);
}
This code works fine when i try it using windows forms. In silverlight project, it generate dll file correctly and it works fine in the first time (_report.complie(...)). However, the next time i run the code, I got the following msg when try to open the generated pdf file : "This file cannot be opened because it has no pages"
any help in this will be appreciated.
Regards,
Jalal
I am trying to use this code in server side :
if (File.Exists(compiledReportFile))
{
_report = StiReport.GetReportFromAssembly(compiledReportFile);
_report.Dictionary.BusinessObjects.Clear();
_report.Dictionary.BusinessObjects.Add(CurrentBusinessObject);
_report.RegBusinessObject(CurrentBusinessObject.Category, CurrentBusinessObject.Name, CurrentBusinessObject.BusinessObjectValue);
_report.Dictionary.SynchronizeBusinessObjects();
_report.Render(false);
}
else
{
_report.Dictionary.BusinessObjects.Clear();
_report.Dictionary.BusinessObjects.Add(CurrentBusinessObject);
_report.RegBusinessObject(CurrentBusinessObject.Category, CurrentBusinessObject.Name, CurrentBusinessObject.BusinessObjectValue);
_report.Dictionary.SynchronizeBusinessObjects();
_report.Compile(compiledReportFile);
_report.Render(false);
}
This code works fine when i try it using windows forms. In silverlight project, it generate dll file correctly and it works fine in the first time (_report.complie(...)). However, the next time i run the code, I got the following msg when try to open the generated pdf file : "This file cannot be opened because it has no pages"
any help in this will be appreciated.
Regards,
Jalal