Challenge XV

<< Click to Display Table of Contents >>

 

Challenge XV

Create a Command Button to export a Report to an Excel file

 

TIP

Use the Export method of the Report object.

 

1.Insert one more Command Button on Event_Screen, with the text "Export".

2.Select the Scripts tab of this object and create a script.

3.Use the AppBrowser to select Report's Export method. Notice that this method's parameters are explained on Elipse Power Reference and Scripts Manual, which is opened on the AppBrowser interface itself, on the right.

Export method

Export method

4.Paste and adapt this script, which must be configured according to the next code.

Sub CommandButton2_Click()
  Set Report = Application.LoadReport("AlarmReport")
  Report.Export "EXCEL", "C:\Elipse_Power_Tutorial\ReportExcel.xls"
End Sub

 

5.Execute the application and test this new functionality.

Was this page useful?