Hi,
i have a problem using StiViewerControl1 and a Panel. Let me explain in more detail:
On my form i have a panel, in this panel the control StiViewerControl1 is docked as filled.
I set all Properties "ShowSave" etc. to false. so only the pure Control is seen.
So i want my Report (which is a Chart) printed and filled in this area.
The Size of the report MUST fix the size of the panel. I dont want the user to scroll left down right etc.
If the User Maximize the form the panel expands size and the report should also. I dont want any spaces left, right, top, bottom.
How can i archive this ?.
My report is show in the control. but the user can still hold the left mouse button and move up down etc.
Thx for help
stephan
StiViewerControl and Windows Form / Panel
StiViewerControl and Windows Form / Panel
Hello,
You need call following method on each panel resizing:
Thank you.
You need call following method on each panel resizing:
Code: Select all
PreviewControl.SetZoomOnePage();
StiViewerControl and Windows Form / Panel
Thx Jan,Jan wrote:Hello,
You need call following method on each panel resizing:
Thank you.Code: Select all
PreviewControl.SetZoomOnePage();
i allready used this property but this doesnt fit our needs.
So maybe there is a different way to archive what i need.
Is there a way of getting an Image of a Chart ?. so i can then put this image in a Picturebox ?
Something like:
report.GetComponents("Chart").image as StiImage;
Stephan
Ok i found something like this:
Dim chrt As Stimulsoft.Report.Chart.StiChart
Dim zoom As Single = 1
chrt = m_StiReport.CompiledReport.GetComponentByName("Diagramm1")
Dim img As System.Drawing.Image
img = chrt.GetImage(zoom)
PictureBox1.Image = img
But the image i got of the Chart is not that what i see in my stiPreview control, its that one that defined in the Report layout.
StiPreview control shows correct chart with right data.
But the Image i got chrt = m_StiReport.CompiledReport.GetComponentByName("Diagramm1") is not that one.
What iam doing wrong ?
Stephan
I found the solution.
i changed
chrt = m_StiReport.CompiledReport.GetComponentByName("Diagramm1")
to
chrt = m_StiReport.RenderedPages(0).GetComponents("Diagramm1")
Anyway
Thx