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?
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?