Configure the report object – Rockwell Automation 9307 FactoryTalk EnergyMetrix User Manual

Page 221

Advertising
background image

9

ReportsPlus

221

Configure the Report Object

The Report object includes among its members several properties and methods that
control the overall appearance of a Multi-Purpose Report (MPR).

ShowLogo Property

This controls whether the logo graphic is displayed in the report header. The default is
True, and the default logo is the FactoryTalk EnergyMetrix logo:

Report.ShowLogo = False 'turns off the visibility of the logo
graphic

ShowPageHeader and ShowPageFooter Properties

These properties control the visibility of the report header and footer.

Add Method

This method is used to add MPR objects such as Grids and PieCharts to a report. See

Add

a Report Object to the MPR on page 222

.

AddLine Method

Use this method to add lines to the report page. The examples below show the usage of
this method.

Report.AddLine(0,0,7.5,0) ' adds a line with weight of 1 pixel
across the top of the report working area.

Report.AddLine(0,0,7.5,7.5,3) ' adds a line with weight of 3
pixels from the upper left-had corner to the lower right-hand
corner of the report working area.

AddLogo Method

Use the AddLogo method to substitute a custom logo in the report header. It is good
practice to run this method within an error trap. Otherwise, if the file is not found, a report
run-time error will result.

Try

Report.ShowLogo = False

Report.AddLogo(0,0,4,1, "C:\MyLogo.gif") 'places the specified
file in the header at the upper left-hand corner with a size of 1
inch high and 4 inches wide.

Catch

Report.ShowLogo = True 'shows the standard logo if the file is
not found

End Try

PageBreak Method

Use this method to add a page break at the current cursor position.

Report.PageBreak()

Adding a MPR object does not automatically move the CursorPos
to the bottom of the object.

Advertising