Page 1 of 1

Code in Designer deleted after saving

Posted: Thu Apr 17, 2008 8:58 am
by dade@sol-it.at
Hi,

I am using Stimulsoft Reports .Net V2008.1.217.

When I add a using-Clause in the Code-View of the Designer and save it, the first few lines of code are deleted and the Report doesn't compile anymore!?

Does anyone know a solution for this Problem?

Thanks

David

Code in Designer deleted after saving

Posted: Thu Apr 17, 2008 11:36 am
by Stéphane
Hi,

The code will be regenerated each time. You can't use it directly.

You can copy this code into a C# file in your Visual Studio project and modify it to add your using clause.

You can also set the ReferencedAssemblies property of your StiReport. It will not add an using clause, but you will be able to call your own classes and methods with the complete namespace.

You can look at this demo if it can help you : http://www.stimulsoft.com/livedemos/Rep ... ction.html

Code in Designer deleted after saving

Posted: Thu Apr 17, 2008 1:01 pm
by Brendan
Is this something new that's been added in the latest pre-releases?

I haven't used the latest prerelease builds but you used to be able to add your own using declarations as demonstrated in the video above and even your own functions within the report code. Is this no longer possible?

Code in Designer deleted after saving

Posted: Fri Apr 18, 2008 3:15 am
by Stéphane
I don't know, I never use the code tabpage because I thought that we can modify the code into the tabpage and see the result, but it can't be saved and will be regenerated.

A Stimulsoft Team member will clarify this point to us...

Code in Designer deleted after saving

Posted: Fri Apr 18, 2008 3:42 am
by dade@sol-it.at
In the previous Version it was possible to add using clauses and even add Method- or Variable Declarations in the first few lines after the class declaration.

Since the Update to V2008.1.217 the first few lines are deleted when I add using clauses or Method/Variable Declarations - even the class declaration

this seems to be a bug in the new version...

does anyone know something about this?


Code in Designer deleted after saving

Posted: Fri Apr 18, 2008 9:25 am
by Vital
Hello,

Some versions of Stimulsoft Reports.Net 2008.1 have bug with saving code of report. Please get patch in build from 16 April.

Thank you.

Code in Designer deleted after saving

Posted: Fri Apr 18, 2008 11:49 am
by Vital
Hello,

Please check build from 18 April.

Thank you.

Code in Designer deleted after saving

Posted: Tue Apr 22, 2008 4:35 am
by Stéphane
Ok, it works with the last build.

But, I have another question : can we add an using clause automatically with your own StimulReport class ? I added my assembly with the StiOptions.Engine.ReferencedAssemblies property but I didn't find how to add an using clause automatically. Is it possible ?

Cordially,
Kakone.

Code in Designer deleted after saving

Posted: Wed Apr 23, 2008 3:09 am
by Vital
Hello,

You can use following static property for new reports:

Code: Select all

StiOptions.Engine.Namespaces
You can't change existing report automatically.

Thank you.