Page 1 of 1

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

Posted: Tue Aug 31, 2010 11:09 pm
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

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

Posted: Wed Sep 01, 2010 1:16 am
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.

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

Posted: Wed Sep 01, 2010 1:50 am
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

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

Posted: Wed Sep 01, 2010 7:13 am
by Ivan
Hello,

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

Thank you.

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

Posted: Wed Mar 30, 2016 8:32 am
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!

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

Posted: Wed Mar 30, 2016 9:59 am
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.