Chat now with support
Chat with Support

Foglight 5.9.3 - Web Component Tutorial

Using the Web Component Tutorial Tutorial 1: Drag and Drop Tutorial 2: Creating a Dashboard Tutorial 3: Adding a Drilldown Page Tutorial 4: Adding Views Tutorial 5: Using a Grid Tutorial 6: Reports Tutorial 7: Creating a Form Tutorial 8: Renderers Tutorial 9: Adding Questions and Answers Tutorial 10: Sending Messages to Other Users

Adding a Footer

You learned how to add items to all three places in the header, and the footer component is simpler. To demonstrate how to use the PDF Layout’s pageNumber built-in context, you will place a page number at the bottom-center of the page.

On the General tab, set the Name to Footer: Page Number T5.
Set the Comments and Context Help to Footer for Hosts Summary Report T5.
1
Open the Context tab.
2
Under Inputs, click Add Input , and set the columns of the newly added row as follows:
Key: pageNumber
Name: unchanged
Usage: Required
List: False
Data Type: Common:Integer
1
Open the Configuration tab.
2
In the Center row, in the Value column, click Edit , and choose String Template from the list that appears.
3
In the Edit - Center dialog box that appears, in the Value box, type - {0} -.
The table at the bottom refreshes, showing a line for Parameter {0}. By using a parameterized entry for the page number you can add text decorations around it.
4
In the Parameter {0} line, in the Value column, click Edit , and choose Context from the list that appears.
5
In the Edit - Parameter {0} dialog box that appears, click the Input Key box, choose pageNumber(Integer) from the list that appears, and click Set to close the Edit - Parameter {0} dialog box.
6
In the Edit - Center dialog box, click Set to close it.
1
Open the Hosts Summary Report T5 view for editing, and open its Views tab.
2
Click Add icon.
3
In the Select a View to add to the Report dialog box that appears, in the Name column, choose My Views > Footer: Page Number T5, and click Save.
4
On the Views tab, in the newly added Footer: Page Number T5 row, click the Function column, and choose Footer from the list that appears.
5
Select the Header: Icon, Report Title, Time Range T5 row and click Move Up two times to move this view immediately below the Header: Icon, Report Title, Time Range T5 view.

Test the report by clicking the Test PDF () button on in the view editor when you display the Hosts Summary Report T5 view in the Definitions area. Your Web browser displays a page with a header, a footer, Hosts Table - for Given Hosts (assuming you left this page in the report), and a table of host statistics.

Adding an Iterator for a Multi-Page Report

The Iterator component can be used to address a need for creating similar views, such as a report containing detailed information for each host.

The Add View dialog box appears.
3
In the Add View dialog box, ensure that the Create a Blank View tab is selected.
4
On the Create a Blank View tab, choose Containers > Iterator.
5
6
1
Open the Context tab.
2
Under Inputs, click Add Input , and set the columns of the newly added row as follows:
Key: hosts
Name: unchanged
Usage: Required
List: True
Data Type: Monitoring:Host
1
Open the Configuration tab.
2
In the Key row, in the Value column, click Edit .
3
In the Edit - Key dialog box that appears, in the String value box, type host, and click Set to close the dialog box.
4
In the Objects row, in the Value column, click Edit , and choose Context from the list that appears.
5
In the Edit - Objects dialog box that appears, click the Input Key box, choose hosts (List of Hosts) from the list that appears, and click Set to close the dialog box.

Choosing the Iterated View

You can choose or construct any view whose inputs are host objects, since that is a context set in the Hosts Summary Report T5 view. For this tutorial, we choose [table] Memory hogs from the System module Hosts > Host. Any other view whose inputs are acceptable would do as well.

1
On the Configuration tab, expand the Iterated View node.
2
In the View row, in the Value column, click Edit .
3
In the Edit - View dialog box that appears, choose Hosts > Host > [table] Memory hogs, and click Set to close the dialog box.
1
Open the Hosts Summary Report T5 view for editing, and open its Views tab.
2
Click Add icon.
3
In the Select a View to add to the Report dialog box that appears, in the Name column, choose My Views > Host Iterator T5, and click Save.
No other changes are needed because the Body page is the default function for this view.

Summary

In this tutorial you learned how to prepare a report with a header and a footer. You also learned how to use an Iterator component to generate multiple views based on a list, thus creating a multi-page report. You viewed the result by manually choosing the View as PDF option, and you may be wondering about alternative methods for creating and viewing reports.

Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating