An expression is too long or complex to compile near 'Reports.Report.InitializeComponent

Stimulsoft Reports.NET discussion
Post Reply
Vikas
Posts: 20
Joined: Sat Jul 31, 2010 4:12 am
Location: Delhi

An expression is too long or complex to compile near 'Reports.Report.InitializeComponent

Post by Vikas »

Hi

I am using a Logo image with 927KB size. On runtime report showing below error

An expression is too long or complex to compile near 'Reports.Report.InitializeComponent.

If I am displaying 30KB image size on report . Then Its working fine. but if image size is large then its showing the error.

My code is :

((StiImage)rep.GetComponentByName("Image1")).Image = System.Drawing.Image.FromFile(HttpContext.Current.Server.MapPath(logoFilePath));

Please suggest me.


Regards
Vikas
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

An expression is too long or complex to compile near 'Reports.Report.InitializeComponent

Post by Ivan »

Hello,

Please set the StoreImagesInResources property of report to true.
This property is available since the 2010.1 version of our product.

Thank you.
Vikas
Posts: 20
Joined: Sat Jul 31, 2010 4:12 am
Location: Delhi

An expression is too long or complex to compile near 'Reports.Report.InitializeComponent

Post by Vikas »

Yes , I do Set this property as True as design time.

But at runtime I am changing this image with the new large size image.

At this moment It show the error.

Thanks
Vikas
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

An expression is too long or complex to compile near 'Reports.Report.InitializeComponent

Post by Ivan »

Hello,

Can you please send us a simple test application, which reproduces the issue?

Thank you.
Edna
Posts: 1
Joined: Wed Mar 30, 2016 8:26 am

Re: An expression is too long or complex to compile near 'Re

Post by Edna »

Hello,

The issue is old but I have the same problem.

I set the StoreImagesInResources property to True, but the error still exists.

Thank you!
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: An expression is too long or complex to compile near 'Re

Post by HighAley »

Hello.

Could you specify which version do you use?
Please, send us the error message, full error stack and other information that will help us to reproduce the issue.

Thank you.
Post Reply