Page 1 of 1
Value can not be null Parameter name: image, Azure RichText
Posted: Thu May 21, 2015 5:43 pm
by Hélio
hello, I'm using Stimulsoft report published in azure,
I have a problem when using a report containing the RichText component to load the same error happens:
[ArgumentNullException: Value can not be null.
Parameter name: image] System.Drawing.Graphics.DrawImage ..

- Erro.png (82.71 KiB) Viewed 2389 times

- report Error.png (41.11 KiB) Viewed 2389 times
I wonder if anyone can help, it looks like a bug in the report engine.
Is there any minimum requirement so you can use richtext in azure?
thank you
Re: Value can not be null Parameter name: image, Azure RichT
Posted: Fri May 22, 2015 1:02 pm
by HighAley
Hello.
Please, try to run next code:
Code: Select all
rep.Load(...);
rep.Render(false);
try
{
MemoryStream ms = new MemoryStream();
rep.ExportDocument(StiExportFormat.HtmlTable, ms);
}
catch
{
StiReport rep2 = rep.CompiledReport != null ? rep.CompiledReport : rep;
//check rep2.ReportRenderingMessages
}
Inside the catch check the ReportRenderingMessages and send them to us.
Thank you.
Re: Value can not be null Parameter name: image, Azure RichT
Posted: Fri May 22, 2015 2:19 pm
by Hélio
Hello, the problem continues, the value of report.ReportRenderingMessages property is null. In the execution after the Render(false) or in the catch block.
Thank you
Re: Value can not be null Parameter name: image, Azure RichT
Posted: Mon May 25, 2015 8:43 am
by HighAley
Hello.
If we right understand you issue, the report works before publishing it on Azure, then it don't work.
We have made some changes in the code from our previous post. Please, check the ReportRenderingMessages.
If there is still null, could you send us a sample project for analysis.
Thank you.
Re: Value can not be null Parameter name: image, Azure RichT
Posted: Mon May 25, 2015 12:01 pm
by Hélio
Hello, I made the change as it was past and the ReportRenderingMessages property is with the following error:
RichText1 A generic error occurred in GDI +
thank you
Re: Value can not be null Parameter name: image, Azure RichT
Posted: Wed May 27, 2015 11:52 am
by HighAley
Hello.
Sorry, but we couldn't build your project. There are missed assemblies.
Could you send us more simple project which reproduces the issue?
Thank you.
Re: Value can not be null Parameter name: image, Azure RichT
Posted: Wed May 27, 2015 4:54 pm
by Hélio
Hi, I'm sending a new project with my problem.
To run it, you must re-add the reference to these three dll:
Stimulsoft.Base.dll
Stimulsoft.Report.dll
Stimulsoft.Report.Mvc.dll
And must also recompile all solution, so that the nuget restore the project packages.
Now just run the site.
Recalling that the error only happens published in Azure.
Re: Value can not be null Parameter name: image, Azure RichT
Posted: Thu May 28, 2015 11:35 am
by HighAley
Hello, Helio.
We use Metafile to draw RichText. Unfortunately, it's impossible to create Metafile on Azure Websites because
it runs not in Full Trust environment.
Unfortunately it's impossible to use RichText components in your project.
To avoid such error you should set the StiOptions.Engine.FullTrust option to false.
Thank you.