Using our own user controls in a report

Stimulsoft Reports.WPF discussion
Post Reply
bgorter
Posts: 5
Joined: Wed Nov 13, 2013 4:26 pm

Using our own user controls in a report

Post by bgorter »

Is it possible to use our own user controls in a report? I'd like to be able to add our user controls to the toolbox so they can be selected and added to a report in the designer. Is this possible? If so, any samples?

Thanks.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Using our own user controls in a report

Post by Alex K. »

Hello,

Please check the sample in the attachment.

Thank you.
Attachments
CustomComponent.Wpf.zip
(24.98 KiB) Downloaded 264 times
bgorter
Posts: 5
Joined: Wed Nov 13, 2013 4:26 pm

Re: Using our own user controls in a report

Post by bgorter »

I downloaded the sample but when I run it, I get the following error: Could not load file or assembly 'Stimulsoft.Report.Wpf.Office2013Theme, Culture=neutral' or one of its dependencies. The system cannot find the file specified.

I get this error when attempting to run any of the sample projects. I am running 64 bit Windows 7.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Using our own user controls in a report

Post by HighAley »

Hello.

Please, add Stimulsoft.Report.Wpf.Office2013Theme assembly to this project.

Thank you.
bgorter
Posts: 5
Joined: Wed Nov 13, 2013 4:26 pm

Re: Using our own user controls in a report

Post by bgorter »

I added this assembly but now get another error:

Cannot locate resource 'images/office2013/toolbox/mycustomcomponent.png'.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Using our own user controls in a report

Post by Alex K. »

Hello,

The issue is fixed. Fix will be available in the next prerelease build which will be available in this week.

Sorry for any inconvenience this may cause.
Thank you.
bgorter
Posts: 5
Joined: Wed Nov 13, 2013 4:26 pm

Re: Using our own user controls in a report

Post by bgorter »

Ok, I got the sample running. The custom component in there doesn't do anything or have anything in it. Do you have a sample that actually uses a custom user control within the designer? Any more documentation at all?

For example, how about showing how you can take a simple UserControl and make that available in a report?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Using our own user controls in a report

Post by HighAley »

Hello.

Unfortunately, there is no such sample project. Maybe we don't exactly understand you. What kind of control do you want to add? Please, describe it more detailed.

Thank you.
bgorter
Posts: 5
Joined: Wed Nov 13, 2013 4:26 pm

Re: Using our own user controls in a report

Post by bgorter »

I have lots of user controls within my application. I want to be able to use these within a report. I would like my users to be able to drop one of my user controls onto a report. My user control would populate itself based on a parameter passed into the report.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Using our own user controls in a report

Post by HighAley »

Hello.

Our report engine which renders report should know behaviour of all components to do it right.
We sent you the sample project where you could see how to create custom components.
It's impossible to use external controls in the report. All components of the report should be inherited from StiComponent
As a way you could handle drop event in Designer and replace your controls with right components of the report.

Thank you.
Post Reply