CS1647 while using images

Stimulsoft Reports.WEB discussion
mohammad272005
Posts: 5
Joined: Sun Apr 24, 2011 7:49 am
Location: Ca

CS1647 while using images

Post by mohammad272005 »

Hi,
This is my first post.
We use Stimulsoft Reports.Web.
We use images in our reports. In some systems (not all of them), we've got the following error:
Compiler Error Message: CS1647: An expression is too long or complex to compile near ''
But in the others, it doesn't happend. All the systems almost have same application configurations. The big deference is thier OSes. There is no problem, in windows 7. But in some of Window 2008 system, we can see it.
Would you please help us?

With thanks
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

CS1647 while using images

Post by Ivan »

Hello,

This error occurs because of the compiler restrictions on the maximum length of a string. Large images are serialized in a very long line, so the report cannot be compiled. In WinForms large images are stored in the report resources. But in the Web there are problems with resource files, so, by default, storage in resources is disabled. Pleasetry to enable the following option:

Code: Select all

	StiOptions.Engine.ReportResources.AllowUseResourcesInWeb = true.
If this fails, then the only one way to solve the problem is to use smaller images.

Thank you.
mohammad272005
Posts: 5
Joined: Sun Apr 24, 2011 7:49 am
Location: Ca

CS1647 while using images

Post by mohammad272005 »

Thank you for your reply. I added the code you gave me, in my source, just before where the report is being given to the report viewer. But no use. Maybe the place where I put the code is incorrect. Would you please tell me where I can place it?

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

CS1647 while using images

Post by Ivan »

Hello,

This property is static.
So please place this line of code in the begin part of your application.

Thank you.
mohammad272005
Posts: 5
Joined: Sun Apr 24, 2011 7:49 am
Location: Ca

CS1647 while using images

Post by mohammad272005 »

Hi again,
We tried to test the application in all of our servers. By experience, we finally figured out that, this error occurs ONLY in our x64 servers. OS doesn't matter. The same copies of application installed in some servers and the result indicated that, the servers with 64bit servers can see the problem. This may help you to find the problem.
Please check the problem out, and let us know the result.

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

CS1647 while using images

Post by Ivan »

Hello,

Can you please send us a sample report template with data or a simple test project, which reproduces the issue?

Thank you.
mohammad272005
Posts: 5
Joined: Sun Apr 24, 2011 7:49 am
Location: Ca

CS1647 while using images

Post by mohammad272005 »

Hi,
We created a sample application which has that error. This application has error in all of our systems even in x86 systems. We are using 2010 veriosn of Stimul report. Please download it from here
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

CS1647 while using images

Post by Andrew »

Hello,

We cannot download your file. It says that the requested file does not exist on the server.

Could you please either attach the file to this forum topic or send it to support@stimulsoft.com.

Thank you.
mohammad272005
Posts: 5
Joined: Sun Apr 24, 2011 7:49 am
Location: Ca

CS1647 while using images

Post by mohammad272005 »

Hello,
Sorry about that. You are right. I've uploaded the file to Microsoft's Skydrive. But it seems that the link is broken. Please try this link again: Stimulsoft.zip
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

CS1647 while using images

Post by Alex K. »

Hello,

Please check the last prerelease build and let us know about the result.

Thank you.
Post Reply