Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refresh method doesn't work on ReportDocument object...

Status
Not open for further replies.

bgravi

Programmer
Jul 28, 2002
15
0
0
US
The problem I noticed is with respect to the Refreshing. If I change any formula/text on the ReportDocument and call it's Refresh method, it doesn't work . The following code does not work.

ReportDocument rd = crystalReportViewer1.ReportSource as ReportDocument ;
FieldObject fo = rd.ReportDefinition.ReportObjects["titleObject"] as FieldObject;
if( fo != null )
{
fo.ApplyFont( myFont );
}

rd.Refresh(); //this fails, I cannot see the new changes

But calls on the CrystalReportViewer works...
crystalReportViewer1.RefreshReport(); //This works, I can see the new changes



Why does the Refresh function on ReportDocument object fail, whereas it succeeds on the Viewer?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top