How to put a multi-line string in report
Posted 10 May 2011 - 12:22 PM
The query output in ClearQuest will be:
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.
Posted 10 May 2011 - 08:01 PM
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.
Posted 11 May 2011 - 10:03 AM
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.