Page 1 of 1

show report in stiViewerControl

Posted: Wed Aug 04, 2010 7:59 am
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.

show report in stiViewerControl

Posted: Wed Aug 04, 2010 11:07 am
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.

show report in stiViewerControl

Posted: Thu Aug 05, 2010 10:39 am
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.

show report in stiViewerControl

Posted: Fri Aug 06, 2010 7:31 am
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.