show report in stiViewerControl

Stimulsoft Reports.NET discussion
Post Reply
liomessi32
Posts: 16
Joined: Tue May 25, 2010 1:09 am

show report in stiViewerControl

Post by liomessi32 »

Hi!
sorry for my bad english...:sweat:
I'm developing a report generator...i have a form with some tab...in one tab user can select field.in another tab he can create filter...and so on
in one of tabs i place a stiDesignerControl. user can design report layout in this control...
every thing is OK!
I create sql command and fill dataset. then call RegData method of StiReport .
what i want is : show that report in stiViewerControl (that placed in another tab).therefore stiViewerControl1.Report = MyRpt;
but nothing show in stiViewerControl.
can any one help me?
thanks.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

show report in stiViewerControl

Post by Jan »

Hello,

It very hard to say whas going wrong in your case. Can you provide some additional information? Source code of your project regarding report generation?

Thank you.
liomessi32
Posts: 16
Joined: Tue May 25, 2010 1:09 am

show report in stiViewerControl

Post by liomessi32 »

Hello Jan,
It is very hard for me to separate my code.
assume, i have a StiReport named _Stirpt ,after i generate it when i call it's show method ,report shows successfully.but when i assign _Stirpt to stiViewerControl1.Report nothing happened...

if(this._Stirpt != null)
{
this. stiViewerControl1.Report = this._Stirpt;

}


note: when i click on Print button ,report was shown.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

show report in stiViewerControl

Post by Jan »

Hello,

Try to use following code:

Code: Select all

this._Stirpt.Render(false);
this. stiViewerControl1.Report = this._Stirpt;
this. stiViewerControl1.Refresh();
Thank you.
Post Reply