Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to display multiple values from a single SQL column

Former Member
0 Likes
861
  • SAP Managed Tags

I'm not sure how best to phrase this:

*I am using crystal reports 9.2*

We are looking to include multiple NOTE_IDs (column name) from a table TKT_NOTE.
There are two unique NOTE_IDs tied to a single ticket and I am trying to display both unique notes

I can pull a single NOTE_ID multiple times but I cannot display each unique NOTE_ID

For instance, the two notes I need are NOTE_ID: ROOM_NUM and CARD_MSG
The table structure I am look at is as follows
TKT_NO, NOTE_ID, NOTE_TXT
000001, ROOM_NUM, 123

000001, CARD_MSG, 'Get Well Soon!'

I can pull room 123 or get well soon via hard coding but I cannot get both records to display.
It is simple to do in SQL but I am not sure how to use a qualifier in Crystal to isolate each record.

I have tried making formula fields with the following syntax
if ({TKT_NOTE,NOTE_ID}='ROOM_NUM') then totext ({TKT_NOTE.NOTE_TXT})
if ({TKT_NOTE,NOTE_ID}='CARD_MSG') then totext ({TKT_NOTE.NOTE_TXT})

But both display 123

Does crystal have qualifiers so I can change the formula to something like:
if ({TKT_NOTE,NOTE_ID}='ROOM_NUM') then totext ({TKT_NOTE.NOTE_TXT} where {TKT_NOTE,NOTE_ID}='ROOM_NUM')

if ({TKT_NOTE,NOTE_ID}='CARD_MSG') then totext ({TKT_NOTE.NOTE_TXT} where {TKT_NOTE,NOTE_ID}='CARD_MSG')

Thank you

1 REPLY 1
Read only

pubudug
Explorer