Page 1 of 2
CS1647 while using images
Posted: Sun Apr 24, 2011 8:19 am
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
CS1647 while using images
Posted: Mon Apr 25, 2011 2:06 am
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.
CS1647 while using images
Posted: Mon Apr 25, 2011 7:14 am
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
CS1647 while using images
Posted: Mon Apr 25, 2011 2:25 pm
by Ivan
Hello,
This property is static.
So please place this line of code in the begin part of your application.
Thank you.
CS1647 while using images
Posted: Tue Apr 26, 2011 9:52 am
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
CS1647 while using images
Posted: Wed Apr 27, 2011 3:59 am
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.
CS1647 while using images
Posted: Tue May 03, 2011 9:08 am
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
CS1647 while using images
Posted: Wed May 04, 2011 12:43 pm
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.
CS1647 while using images
Posted: Sun May 08, 2011 12:24 am
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
CS1647 while using images
Posted: Tue May 10, 2011 7:45 am
by Alex K.
Hello,
Please check the last prerelease build and let us know about the result.
Thank you.