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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Impromptu: Combine records to eliminate duplication 1

Status
Not open for further replies.

jefRPT

Programmer
Dec 17, 2001
29
0
0
US
I'm generating a report that lists a product number in one column and the history log of where it is in another column. My problem is, when a product has more than one entry in the history column, it generates a whole new line for it and the only new info would be the history column while all of the other columns repeat itself. I need to know how to combine all of the history records for each product number into one so there won't be a repetion of the other columns. Please help!

FOR EXAMPLE:
Right now its like:
ITEM #: CUST NAME: HISTORY LOG:
1A-3 Sam abc
1A-3 Sam def
2B-9 Bob ghi

I want it to be like:
ITEM #: CUST NAME: HISTORY LOG:
1A-3 Sam abc,def
2B-9 Bob ghi
 
This is a difficult problem because you are asking Impromptu to consolidate multiple rows of data on a single line.

If you must get this behaviour, I'd suggest creating a stored procedure that consolidates the records into a calculated field. Then use the Stored Procedure report template in Impromptu.

Good luck,

Justin
 
I was hoping someone could help me out a little more. I am extremely new to Cognos (had it for about a week), and don't even know where to start. If what Justin said is true, that the above is really complicated, I was wondering, would it be possible for me to hide/suppress the duplicates (Item #, Cust Name, etc.) ??
For Example:
ITEM #: CUST NAME: HISTORY LOG:
1A-3 Sam abc
def
2B-9 Bob ghi

The first way would be my goal, but if that is not possible, then I would attack the problem in this manner. All suggestions are welcome and needed :)
Thanks in advance!! X-)
 
The second format is much easier to get. Group ITEM# and CUST NAME in Report-->Query-->Group Tab. Leave HISTORY LOG ungrouped and unassociated.

This will basically hide the duplicate ITEM#s and CUST NAMES in the list frame.

Justin
 
If you visit the Cognos On-Line support page, you will be able to browse past issues of SupportLink, their techie publication. Your question was answered there, with an example.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top