How to add a UserControl inside Report Designer

Stimulsoft Reports.NET discussion
Post Reply
Saus86
Posts: 62
Joined: Fri Mar 23, 2012 10:57 am
Location: Italy

How to add a UserControl inside Report Designer

Post by Saus86 »

Hi.

I have seen this sample "Add a Custom Component to the Report Designer" ( https://www.stimulsoft.com/en/samples/w ... t-designer)
and I downloaded the project to try to customize it.
Instead of the custom component created in the sample (MyCustomComponent class that realizes a rectangle), I should add a more complex component like a UserControl (realized with WinForm's Control or StiReport controls). Then I want to add it in the toolbox showed in report Designer when i add a new form. So I can drag it inside the form. Is it possible?

If it's possible
1) Which other changes should I do in my class?
2) Do I have to implement other interfaces in addition to StiComponent, IStiBorder, IStiBrush?
3) How do I have to write the "Paint(StiPaintEventArgs e)" method? or I have to override another method?

Can you send me a new sample?

My idea is to create a winform userControl consisting of a groupBox with 2 Combobox controls and 2 buttons to do search operations.

Thanks.
Andrea
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Re: How to add a UserControl inside Report Designer

Post by Andrew »

Hello,
> Then I want to add it in the toolbox showed in report Designer when i add a new form. So I can drag it inside the form. Is it possible?
Unfortunately, we do not have the CustomComponent for forms. So there are no samples available. As a way, you may buy a license with source code and modify it the way you like.

Thank you.
Post Reply