BIRT Exchange Forum: How to put a multi-line string in report - BIRT Exchange Forum

Jump to content


 

No Latest Open Poll.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How to put a multi-line string in report Rate Topic: -----

#1 User is offline   kubalaml Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 10-May 11


Posted 10 May 2011 - 12:22 PM

I am using ClearQuest 7.1.2 and have created a Data Set of type ClearQuest Query Result which returns the records based on a CQ query. ClearQuest has a bug where it returns identical records if you have a multi-line text field in your display. So if I have a record with ID 1 and a Description field of:

Line 1
Line 2
Line 3

The query output in ClearQuest will be:

ID Description
1 Line 1
1 Line 2
1 Line 3

These identical rows get passed to the BIRT report so that I have the same record showing up three times. How does everyone else deal with this issue? I figure I can do either of two things, I just don't know how to do them:

1) Setup some filter on the BIRT side so that it ignores records with identical ID numbers.
2) Modify the ClearQuest query so that it doesn't have a multi-line text field on the Display fields then find some way to still show that field in the BIRT report. From what I have seen, the fields that show up in the Display fields in ClearQuest are the ones that show up in the Output Columns section. There is no way to add a new field to the Output Columns. Also another thing I ran into is that if the multi-line display field is removed from the display in ClearQuest, but was used as a filter criteria for the query, BIRT throws an error saying it can't find that field.
0

#2 User is offline   johnw Icon

  • Senior Member
  • View blog
  • Group: Members
  • Posts: 712
  • Joined: 08-May 08


Posted 10 May 2011 - 08:01 PM

1) Group on ID number, and use an String Aggregation component for your multi-line field so it will display as a single field.

2) dump the table straight into the report design, select the column with the ID, and select suppress duplicates

3) Pass your query result to a scripted data set and combine that way. Do something like have a hidden table in your report to get the original result set, populate a map or array, and use the scripted data set to output the filtered results.

Solution 1 and 2 are going to be your easiest ones, and depending on the requirements of your report, the most appropriate.
0

#3 User is offline   kubalaml Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 10-May 11


Posted 11 May 2011 - 10:03 AM

Thanks for the help! I started off trying solution 2 because that is the only one that made sense to me (I'm new to this stuff), but when I suppressed duplicates, it still showed all the other rows. It just removed the duplicate field. When I did a little research to see if I was doing this right, I came across this blog post:

http://birtworld.blo...icate-rows.html

I used an OnCreate script to create a global variable containing the ID of the previous row then for the row I used a Visibility expression that said if the current ID is equal to the previous ID, hide the row. This isn't the most efficient method but it seems to work.
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users