ActiveReports 18 .NET Edition
Developers / Work with Reports using Code / Page/RDLX Report / Save Page/RDLX Report
In This Topic
    Save Page/RDLX Report
    In This Topic

    The topic describes saving a Page/RDLX report.

    Save a report as an RDLX file at design time

    1. From the Visual Studio Report menu, select Save Layout.
             
      Note: The Report menu in Visual Studio 2019 and above is available as submenu under Extensions. You should select the Design View of the report in the ActiveReports Designer first.
    2. In the Save As dialog that appears, set the file name and select the location where you want to save it. The file extension is *.rdlx.
    3. Click the Save button to save the report layout and close the dialog.

    Save a report as an RDLX file at run time

    Use the Save method to save your report layout at run time.

    1. Right-click the Windows Form and select View Code to see the code view for the Windows form.
    2. Add the following code to the Form class to save the report.

      The following example shows what the code for the method looks like to save a Page or an RDLX report.

      VB# code. Paste INSIDE the Form class
      Copy Code
      Private Sub SaveButton_Click(ByVal sender As Object, ByVal e As EventArgs)
          Dim saveFileDialog As SaveFileDialog = New SaveFileDialog()
          saveFileDialog.Title = "Save Report"
          saveFileDialog.Filter = "Page Report Files|*.rdlx"
          saveFileDialog.ShowDialog()
          If saveFileDialog.FileName <> "" Then
              pageReport.Save(New FileInfo(saveFileDialog.FileName))
          End If
      End Sub
      
             
      C# code. Paste INSIDE the Form class
      Copy Code
      private void SaveButton_Click(object sender, EventArgs e)
      {
                  
          SaveFileDialog saveFileDialog = new SaveFileDialog();
          saveFileDialog.Title = "Save Report";
          saveFileDialog.Filter = "Page Report Files|*.rdlx";
          saveFileDialog.ShowDialog();
          if (saveFileDialog.FileName != "")
              {
                  //Save Report File
                 pageReport.Save(new FileInfo(saveFileDialog.FileName));
              }
      }