ActiveReports for .NET 3 Online Help Request technical support
Saving and Loading RDF Files
See Also
User Guide > How-To Section > Saving and Loading RDF Files

Glossary Item Box

ActiveReports allows reports to be saved into their own standard format called an RDF file (Report Document Format). Once a report has been saved to an RDF file, it can be loaded into the viewer control and used to display reports in custom preview applications.  

To write the code to save a report as an RDF file in Visual Basic

To write the code to save a report as an RDF file in C#

'Visual Basic
Dim rpt As New ActiveReport1()
Private Sub saveRDF()
   rpt.Run()
   rpt.Document.Save(Application.StartupPath + "\\NewRDF.RDF")
End Sub

//C#
private void saveRDF()
{
    ActiveReport1 rpt = new ActiveReport1();
    rpt.Run();
    rpt.Document.Save(Application.StartupPath + "\\NewRDF.RDF");
}

To write the code to load the saved RDF into the ActiveReports viewer in Visual Basic or C#

'Visual Basic
Private Sub LoadRDF()
   rpt.Run()
   Viewer1.Document.Load(Application.StartupPath + "\\NewRDF.RDF")
End Sub

//C#
private void LoadRDF()
{
   ActiveReport1 rpt = new ActiveReport1();
   rpt.Run();
   viewer1.Document.Load(Application.StartupPath + "\\NewRDF.RDF");
}

See Also

©2009. All Rights Reserved.