Third party controls
-
- Posts: 13
- Joined: Mon Aug 16, 2010 6:32 am
- Location: UK
Third party controls
I am in the process of evaluating Stimulsoft Reports Wpf for use with a Business Objects data source in C#, and am using version 2010.2.749.0 in VS2008 using .NET V3.5.
So far so good, I can display the text data required but I have a need to include in the report a custom wpf control. This control will use WPF drawing primitives to display a simple diagram that I will draw from the data.
In the notes of Changes in v2010.1 you state: "Now you can use the third party controls on forms of reports."
Can you explain how this is done. I have not found any documentation or sample showing this.
Thanks
Rick
So far so good, I can display the text data required but I have a need to include in the report a custom wpf control. This control will use WPF drawing primitives to display a simple diagram that I will draw from the data.
In the notes of Changes in v2010.1 you state: "Now you can use the third party controls on forms of reports."
Can you explain how this is done. I have not found any documentation or sample showing this.
Thanks
Rick
Third party controls
Hello Rick,
As i understand you need draw custom primitives on page of report? Please get latest prerelease build. After this you can use new ObjectToDraw property of Image component. You can assign this property from BeforePrintEvent of image component. For example:
Property can accept ImageSource object and DrawingVisual object.
Thank you.
As i understand you need draw custom primitives on page of report? Please get latest prerelease build. After this you can use new ObjectToDraw property of Image component. You can assign this property from BeforePrintEvent of image component. For example:
Code: Select all
Image1.ObjectToDraw = myDrawing;
Thank you.
-
- Posts: 13
- Joined: Mon Aug 16, 2010 6:32 am
- Location: UK
Third party controls
Thank you for your idea.
In my code I now have a class:
public class LevelsPageVisual
{
public DrawingVisual Drawing { get; set; }
public int ID { get; set; }
}
and a collection:
ObservableCollection levelsPageVisuals = new ObservableCollection();
I then register this collection:
stiReport.RegBusinessObject("Descriptor", "LevelDrawings", levelsPageVisuals);
So I have a number (say between 1 and 8) of DrawingVisual each of which I want rendered on a page in the report, each image is a full page.
I guess what I want is a DataBand set to LevelDrawings with an Image on the DataBand that somehow and somewhere we do Image.ObjectToDraw = Drawing;
First problem is although I see LevelDrawings in the Dictionary it only has the ID property, the Drawing property is missing.
Can you help.
If possible I would like the page(s) of drawing shown in both the Designer and the Viewer.
Thanks
In my code I now have a class:
public class LevelsPageVisual
{
public DrawingVisual Drawing { get; set; }
public int ID { get; set; }
}
and a collection:
ObservableCollection levelsPageVisuals = new ObservableCollection();
I then register this collection:
stiReport.RegBusinessObject("Descriptor", "LevelDrawings", levelsPageVisuals);
So I have a number (say between 1 and 8) of DrawingVisual each of which I want rendered on a page in the report, each image is a full page.
I guess what I want is a DataBand set to LevelDrawings with an Image on the DataBand that somehow and somewhere we do Image.ObjectToDraw = Drawing;
First problem is although I see LevelDrawings in the Dictionary it only has the ID property, the Drawing property is missing.
Can you help.
If possible I would like the page(s) of drawing shown in both the Designer and the Viewer.
Thanks
Third party controls
Hello,
Drawing property is complex object so it does not synchronize automatically in list of columns, but you can add it manually. Please check Sample1.png.
Thank you.
Drawing property is complex object so it does not synchronize automatically in list of columns, but you can add it manually. Please check Sample1.png.
Thank you.
- Attachments
-
- 562.Sample1.png (124.97 KiB) Viewed 3195 times
-
- Posts: 13
- Joined: Mon Aug 16, 2010 6:32 am
- Location: UK
Third party controls
I have this all working now.
Thanks for all your help and suggestions.
Rick
Thanks for all your help and suggestions.
Rick
Third party controls
Great! We are always glad to help you!