Modifying TCR reports

Technote (FAQ)


Question

Can the TCR 2.1.1 default reports be modified?

Cause

Some of the default reports are limited in scope and modification is required for certain attributes while running the report.

Answer

Please note this is partly a customisation issue but it is possible from TCR version 2.1.1 onwards to be able to use Cognos to modify the reports and add addition fields as required.

Here is a typical example where the customer wants the report to be modified so that instead of asking for a date, it always runs using a date of "yesterday". The steps below demonstrate how this was done for the "ITCAM ScoreCard" report.

1) Open the Application Scorecard report in Report Studio. Save it as a
new report in a different folder (don't create a new report in the ITCAM
for Transactions (Query) package).

2) Visit the Prompt Page and delete the day prompt. This will leave a
dangling ?CurrentDate? parameter, which we account for in steps #3 to #7.
3) For each query that contains a pattern of the form "cast( cast(
_add_days(?CurrentDate?,-1) as char(10) ) || ' 00:00:00.000' as
TIMESTAMP)":
a) Add a new Data Item with name "CurrentDate-2_TS', expression
"cast(cast(_add_days(current_date,-2) as char(10)) || ' 00:00:00.000' as
TIMESTAMP)", Aggregate Function "None".
b) Use "[CurrentDate-2_TS]" in place of the original query pattern. Do
this for the Detail Filter in Query_Yesterday_date.

4) Repeat step #3, but with a day offset of "-7" becoming "-8" in an
appropriately named Data Item, eg "CurrentDate-8_TS". Do this for the
Detail Filter in Query_7days_ago_Date.

5) For each query that contains a pattern of the form "cast(
?CurrentDate? as char(10) )":
a) Add a new Data Item with name "CurrentDate-1_S', expression
"cast(_add_days(current_date,-1) as char(10))", Aggregate Function
"None".
b) Replace instance(s) of the original pattern in the query with
"[CurrentDate-1_S]". Do this for the Detail Filter in
p1_c1_today_query11, p1_c1_today_query22, p1_c1_today_query33,
p1_c2_query1, p2_c1_today_query11, p2_c234_query1, p3_c1_today_query1,
p3_c2_today_query1, p3_t1_query1, p4_c2_query1, p4_c3_query1,
p4_c1_query1, p5_c1_Query, p6_t1_query1, p6_c1_query1, p6_t2_query1,
p7_c1_query1, p8_c1_query, p9_c1_Query, p9_c2_Query.

6) For each query that contains a pattern of the form "cast(
_add_days(?CurrentDate?,-1) as char(10) )":
a) Add a new Data Item with name "CurrentDate-2_S', expression
"cast(_add_days(current_date,-2) as char(10))", Aggregate Function
"None".
b) Replace instance(s) of the original pattern in the query with
"[CurrentDate-2_S]". Do this for the Detail Filter in
p1_c1_yesterday_query11, p1_c1_yesterday_query22,
p1_c1_yesterday_query33, p1_c4_query1, p2_c1_yesterday_query11,
p3_c1_yesterday_query1, p3_c2_yesterday_query1

7) Repeat step #6, but with a day offset of "-7" becoming "-8" in an
appropriately named Data Item, eg "CurrentDate-8_S". Do this for the
Detail Filter in p1_c3_query1.

8) Save and test the report. (Saving and testing could be performed
after changing each query as well, instead of in "one big hit".)

As a result of the update in this example, p9_c2_Query no longer depends
on the input parameter ?CurrentDate?, and instead will always operate on
"yesterday".


Rate this page:

(0 users)Average rating

Document information


More support for:

Tivoli Monitoring
Tivoli Distributed Monitoring

Software version:

Version Independent

Operating system(s):

Windows

Reference #:

1573491

Modified date:

2013-04-03

Translate my page

Machine Translation

Content navigation