C# Express Edition, Visual Studio Integration, Custom Tool

Stimulsoft Reports.NET discussion
Post Reply
_Alex_74_
Posts: 25
Joined: Mon Dec 22, 2008 6:00 am

C# Express Edition, Visual Studio Integration, Custom Tool

Post by _Alex_74_ »

Hi,

it's possible to add MRT-Files as items to VS/C# EE solution, register "custom tool" and (automatically) produce code-behind?

Thanks in advice!
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

C# Express Edition, Visual Studio Integration, Custom Tool

Post by Edward »

Hi Alex,

It is possible just to save a mrt file from Designer as a cs file and to connect it to VS solution as a class.

Auto producing of the code behind of this class is not available.

Also you can add a StiReport component as a visual component to your solution and to design it in VS by selecting 'Design' context menu item. Mrt file will be serialized into string and stored with your application.

Thank you.
_Alex_74_
Posts: 25
Joined: Mon Dec 22, 2008 6:00 am

C# Express Edition, Visual Studio Integration, Custom Tool

Post by _Alex_74_ »

Hi Edward,

I've already saw example how to produce the CS-Files and got it runnig this way, but it was the idea of producing the code-behind by register the custom tool for MRT-Files. May be in the next release?

Other way I think about is to "link" the report as managed ressource to the application and load from the ressource by name at runtime. I've not seen if the supported by engine directly, but for a long time ago I've done something with stream and reports and got edited report back from a stream to the engine - by this way it's probably possible to "extract" the report from managed stream and put this to the engine.

Anyway, code benig would be a very nice and elegant solution and producing of code from report is already supported :)

Many thanks!
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

C# Express Edition, Visual Studio Integration, Custom Tool

Post by Edward »

Hi Alex,
_Alex_74_ wrote:but it was the idea of producing the code-behind by register the custom tool for MRT-Files. May be in the next release?
Yes, we will add this feature in one of our future versions, thank you for suggestion.
Other way I think about is to "link" the report as managed ressource to the application and load from the ressource by name at runtime. I've not seen if the supported by engine directly, but for a long time ago I've done something with stream and reports and got edited report back from a stream to the engine - by this way it's probably possible to "extract" the report from managed stream and put this to the engine.
You also can save a report template as string and then read it from string. It is the easiest way to save and load reports e.g. in database.

report.SaveToString();
report.LoadFromString(string reportStr);
Anyway, code benig would be a very nice and elegant solution and producing of code from report is already supported :)
Yes, we will certainly add this useful function :)

Thank you.
Post Reply