solved!! - question about "print repeated values"

0

Hi there,

i have following problem, but found no solution so far. so - here i am:

i have this datas:

 id,familyname,firstname,data_xy

1,Smith,John,Data1

1,Smith,John,Data2

1,Smith,John,Data3

2,Smith,Henry,Data2

3,Snoopy,Henry,Data3

3,Snoopy,Henry,Data7

 

and I want to print it this way:

1   Smith   John   Data1

                               Data2

                               Data3

2   Smith   Henry  Data2

3   Snoopy  Henry  Data3

                                  Data4

 

if I deactivate "print repeated values"

it looks like this

1 Smith John Data1

                         Data2

                         Data3

2             Henry Data2

3 Snoopy           Data3

                            Data4

grouping doesn't help either...

I appreciate any idea,

 

Yours Josef



Post Edited by temberjosef at 10/15/2009 20:07
temberjosef's picture
Joined: Oct 15 2009 - 10:59am
Last seen: 3 years 7 months ago

5 Answers:

0

Josef,

You could create a single text field that has this value:

$F{familyname} + "," + $F{firstname}

Then deactivating 'Print repeated values' should work as you need it to.

Regards,
Matt

mdahlman's picture
9870
Joined: Mar 13 2007 - 2:43am
Last seen: 4 years 10 months ago
0

Hi Matt

First: Thanks for your quick answer.

That's a possibility, but to be honest I have to put those databasefields into two separate textfields (due to design specifications)

And further it doesn't help me with to different persons both called "John Smith"

Is there no other solution?

Josef

temberjosef's picture
Joined: Oct 15 2009 - 10:59am
Last seen: 3 years 7 months ago
0

Hello,

Perhaps, try to create a Group on the id. In the group header put the two fields Familyname and firstname and in the detail band the data field(s).

You shoudn't have to deactivate " 'Print repeated values'"

It should fix the problem of identical names but different id's

Hope this helps

Gaby

Gaby38's picture
338
Joined: Mar 22 2008 - 1:49am
Last seen: 11 years 6 months ago
0

The grouping was a good idea

still had the problem that first data-value was not in line with the name,

so i put the data value as well in the group band

and put this expression into the detail band :

new Boolean(! ($V{starter_COUNT}.intValue()==1))

 

Thanks all together for your quick help,

yours Josef

temberjosef's picture
Joined: Oct 15 2009 - 10:59am
Last seen: 3 years 7 months ago
0

I see. Yes, grouping is the correct solution to your problem.

But I think you'll find that the report structure is easier to read if you have no group header and no group footer. Just leave the detail layout as it was already, but set the Print When expression on the first and last name to the opposite of what you wrote:

new Boolean($V{starter_COUNT}.intValue()==1)

Regards,
Matt

mdahlman's picture
9870
Joined: Mar 13 2007 - 2:43am
Last seen: 4 years 10 months ago
Feedback