GrapeCity.ActiveReports.Document.v8 Assembly > GrapeCity.ActiveReports.Document Namespace > SectionDocument Class : CacheToDisk Property |
'Declaration Public Property CacheToDisk As System.Boolean
public System.bool CacheToDisk {get; set;}
Temporary files are written when this property is set to True. If there is an unhandled exception during report execution, these temporary files may remain on the system. The location of these files is:
WinForms: C:\Documents and Settings\All Users\Application Data\IsolatedStorage
WebForms: C:\Documents and Settings\<machine name>\ASPNET\ Local Settings\Application Data\IsolatedStorage
CacheToDisk uses IsolatedStorage to store a page’s canvasItems to disk. To use CacheToDisk you must have permissions set for the IsolatedStorage folder.
Temporary files and folders created in IsolatedStorage are not deleted automatically.
Note: This property should only be set to True for reports that consume large amounts of memory, as it slows processing time. The property was created to be used with reports for which there is a danger of being unable to finish processing due to memory usage.
The PDF export will also detect this setting and export the cached report. Other exports will ignore this setting, so very large reports may cause them to run out of memory.
Note that the ClearCanvasItems method does not work correctly if this property is set to True.
private void arv_Load(object sender, System.EventArgs e) { rptDocument rpt = new rptDocument(); rpt.Document.CacheToDisk = true; rpt.Run(); arv.Document=rpt.Document; }
Private Sub arv_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles arv.Load Dim rpt As New rptDocument rpt.Document.CacheToDisk = True rpt.Run() arv.Document = rpt.Document End Sub