Code in Designer deleted after saving

Stimulsoft Reports.NET discussion
Post Reply
dade@sol-it.at
Posts: 3
Joined: Thu Apr 17, 2008 8:52 am
Location: Austria

Code in Designer deleted after saving

Post 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
Stéphane
Posts: 74
Joined: Wed Dec 06, 2006 3:45 am
Location: Paris (France)

Code in Designer deleted after saving

Post 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
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Code in Designer deleted after saving

Post 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?
Stéphane
Posts: 74
Joined: Wed Dec 06, 2006 3:45 am
Location: Paris (France)

Code in Designer deleted after saving

Post 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...
dade@sol-it.at
Posts: 3
Joined: Thu Apr 17, 2008 8:52 am
Location: Austria

Code in Designer deleted after saving

Post 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?

Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Code in Designer deleted after saving

Post 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.
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Code in Designer deleted after saving

Post by Vital »

Hello,

Please check build from 18 April.

Thank you.
Stéphane
Posts: 74
Joined: Wed Dec 06, 2006 3:45 am
Location: Paris (France)

Code in Designer deleted after saving

Post 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.
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Code in Designer deleted after saving

Post 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.
Post Reply