Value can not be null Parameter name: image, Azure RichText

Stimulsoft Reports.WEB discussion
Post Reply
Hélio
Posts: 4
Joined: Thu May 21, 2015 5:28 pm

Value can not be null Parameter name: image, Azure RichText

Post 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
Erro.png (82.71 KiB) Viewed 2381 times
report Error.png
report Error.png (41.11 KiB) Viewed 2381 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
Attachments
rptRICHTEXT.mrt
(3.78 KiB) Downloaded 294 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Value can not be null Parameter name: image, Azure RichT

Post 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.
Hélio
Posts: 4
Joined: Thu May 21, 2015 5:28 pm

Re: Value can not be null Parameter name: image, Azure RichT

Post 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
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Value can not be null Parameter name: image, Azure RichT

Post 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.
Hélio
Posts: 4
Joined: Thu May 21, 2015 5:28 pm

Re: Value can not be null Parameter name: image, Azure RichT

Post 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
Attachments
rptDocumento Error.mrt
report just with a richText component
(4.12 KiB) Downloaded 152 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Value can not be null Parameter name: image, Azure RichT

Post 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.
Hélio
Posts: 4
Joined: Thu May 21, 2015 5:28 pm

Re: Value can not be null Parameter name: image, Azure RichT

Post 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.
Attachments
MVCREpTeste - Copia.zip
Project test Error published in azure
(2.99 MiB) Downloaded 164 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Value can not be null Parameter name: image, Azure RichT

Post 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.
Post Reply