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#
The following example shows what the code for the method looks like.
' 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
To write the code to load the saved RDF into the ActiveReports viewer in C#
The following example shows what the code for the method looks like.
' 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 |
Getting Started | Loading an Existing Report Layout
Copyright © 2004-2005 Data Dynamics, Ltd. All rights reserved.