Page 1 of 1

"This file cannot be opened because it has no pages"!!

Posted: Sat Apr 30, 2011 2:20 am
by Jalal
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

"This file cannot be opened because it has no pages"!!

Posted: Mon May 02, 2011 3:01 am
by Andrew
Hello,

Please send us an application in which the problem can be reporduced for analysis.

Thank you.

"This file cannot be opened because it has no pages"!!

Posted: Sat May 21, 2011 5:28 am
by Jalal
Hello,

Thanks, it solved!

Regards,
Jalal

"This file cannot be opened because it has no pages"!!

Posted: Sat May 21, 2011 1:51 pm
by Andrew
Perfect!

Have a great weekend!
Thank you.