IBM Support

Create a JSP report

Question & Answer


Question

Is there a method to create a report in JSP format?

Answer


1. Create a simple report using two parameters: this example uses the Reporter_Status.Node and Rep_Severity_Types.Severity fields.

2. Save the report under an easily recognisable name - e.g., jsp_trial.par

3. cd $INFOHOME/ jsp/netcool/forms/Oracle

4. Copy Oracle_Quick_Check_by_Node.jsp to another file name, e.g., jsp_trial_jsp_list.jsp.

5. At this stage, a recommendation is to copy the example JSP form over to a Windows based machine and use a text editor to alter it.


    Important Note: Please make sure that the example is copied onto a host where you can connect to the Reporter Server as a client. This is essential for step (6) further on.
6. Edit jsp_trial_jsp_list.jsp as below in order to format the way the parameters are displayed:

7. Change...
    <TD ALIGN="RIGHT" WIDTH="50%">
    Elapsed Days
    </TD>

to...
    <TD ALIGN="RIGHT" WIDTH="50%">
    Affected Node
    </TD>

...or the name you’d like the Node parameter displayed under in the report.

8. Change...
    <TD ALIGN="LEFT">
    <vrtlReport:prepare fileOwner="netcool" fileName="Oracle_Quick_Check_by_Node.par">

to...
    <TD ALIGN="LEFT">
    <vrtlReport:prepare fileOwner="netcool" fileName="jsp_trial.par">

...where the owner of the report is 'netcool', and the name of the .par report is jsp_trial.par, from step (2) above.

9. Change...
      <vrtlReport:dropdown name="ELAPSED_PERIOD" passedThru="WIDTH=200 HEIGHT=25 SIZE=1">
      <vrtlReport:sqlData sql="select ELAPSED_PERIOD, PERIOD_NAME from REP_TIME_PERIODS" ds="reporter"/>

    </vrtlReport:dropdown>

to...
      <vrtlReport:dropdown name="NODE" passedThru="WIDTH=200 HEIGHT=25 SIZE=1">

      <vrtlReport:sqlData sql="select distinct NODE from REPORTER_STATUS" ds="reporter"/>
    </vrtlReport:dropdown>


Where ‘name’ is the parameter name, ‘sql’ is how you’d like to see the values selected from the database, and ‘ds’ is the data source name.

10. Next, change...
    <TD ALIGN="RIGHT" VALIGN="TOP">
    Node To Check
    </TD>

to...
    <TD ALIGN="RIGHT" VALIGN="TOP">
    Severity of Issue
    </TD>

...or the title you’d like to see the parameter displayed under.


11. Then change...
    <TD ALIGN="LEFT">
      <vrtlReport:dropdown name="NODE" passedThru="WIDTH=200 HEIGHT=25 SIZE=1">
      <vrtlReport:sqlData sql="select distinct NODE from REPORTER_STATUS where NODE is not null" ds="reporter"/>
    </vrtlReport:dropdown>

to...
    <vrtlReport:dropdown name="SEVERITY" passedThru="WIDTH=200 HEIGHT=25 SIZE=1">
    <vrtlReport:sqlData sql="select distinct REPORTER_STATUS.SEVERITY, REP_SEVERITY_TYPES.NAME from REPORTER_STATUS, REP_SEVERITY_TYPES where REPORTER_STATUS.SEVERITY = REP_SEVERITY_TYPES.SEVERITY order by REPORTER_STATUS.SEVERITY" ds="reporter"/>

This part configures the Severity column, and joins Reporter_Status to Rep_Severity_Types, so the Severity name is displayed rather than its numeric value.

12. Save the jsp_trial_jsp_list.jsp file, and connect to the Reporter Server and invoke the 'JSP Uploads' utility in 'Advanced Utilities', selecting any of the form-based report channels as the destination.

13. Your report will run when you select jsp_trial_jsp_list.jsp from the channel.
[{"Product":{"code":"SSSHXS","label":"Tivoli Netcool\/Reporter"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"2.2","Edition":"All Editions","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

More support for:
Tivoli Netcool/Reporter

Software version:
2.2

Operating system(s):
AIX, HP-UX, Linux, Solaris, Windows

Document number:
624339

Modified date:
17 June 2018

UID

swg21382041