Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help on Table 2

Status
Not open for further replies.

Jsadas

Programmer
May 27, 2003
31
US
I had report in which I need to display the same column from a table in three different columns on the report.

When I am doing the same, I am getting three rows with each column displayed on a single row.

The fields in concern are Issue, Action and Resolution. All these are Comments field in the database, there is field CR Key which distinguishes between these columns.

CR Key = I (Issue), A (Action) and R (Resolution)

The report is coming out as
R1 Issue
R2 Action
R3 Resoulution

I need the report as below, all in single row.
R1 Issue Action Resolution

Any help would be appreciated.

Thanks & Regards
Jags
 
what is the logic of having only R1 from the row R1, R2, R3.
what will happen if one of them is absent. and is there only one comment column or three columns in the backend.


i am assumimg here that every time all the three values will be present.

select to make them appear in one row. u need one column which can group this three rows i am just giving an example
cust cr key Comment1 Comment2 Comments3
1 R1 Issue
1 R2 Action
1 R3 Resolution

now break on cust column and add footer for the break
in the footer in each column enter the following formula.
= max(if (<cr> = 'R1') then <cr> else '')

replace comment1 with comment2 and comment3 for subsequent columns.

= max(<comment1>)

or if there is only one column then replace with this formula
= max(if (<cr> = 'R1') then <comment> else '')

replace constant R1 with R2 and R3 for subsequent columns.

then go to format->break and select fold to display only the footer. This will display result in the way you want.
this can also be achieved at the backend using case statement.

but would require more information about the data to give you are more concrete solution
 
Hi Steve and Subhash,

Here are the inputs you are requesting.

Issue: DM_VW_CRI_DIM.LINE_TEXT
Where DM_VW_CRI_DIM.KEY(+)= 'CRI_DESC1'

Action: DM_VW_CRI_DIM.LINE_TEXT
Where DM_VW_CRI_DIM.KEY1 (+)='CRI_ACPLAN'

Resolution: DM_VW_CRI_DIM.LINE_TEXT
Where DM_VW_CRI_DIM.KEY1(+)='CRIRESOLUT'

For a particular project, I had one Issue on 6/30, there is an Action for that issue and also a Resolution.

In my report I need to print all the three fields in one row, like Project Name, Issue, Action and Resolution.

Subhash, I will try the logic you told. The assumption you did might not be true always, I can have an Issue for a project but not the other two and also I can have multiple issues in a project.

Thanks & Regards
Jags
 
Use a CASE Statment to differentiate between various CR Key values and have three objects for I, A & R and define those as Measure and pull Project Code and all these three objects. You are done.

Sri
 
Sri,

Thanks for the update! Its working, The mistake I did was they are defined as dimensions instead of measures.

Thanks & Regards
Jags
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top