Jump to content
Changes to the Jaspersoft community edition download ×

How to configure fields to show different records?


adrianzazugmail.com

Recommended Posts

Hello, good morning, I have a lot of experience in handling Ireport, what I need to do is a report where I use several fields, when making the query if there is more than one record in one field, register1 and in another record2 and so on. I will try to be more specific:
this would be the page of my report:

++++++++++++++++++++++++++++++++++++++++++++
+    register1                                           register3 register4 +
+    register2                                           register5 register6 +
+                                                                                                  +
+                                                                                                  +
+                                                                                                  +
+                                                                                                  +
+                                                                                                  +
+                                                                                                  +
+                                                                             register1     +
+                                                                             register2     +
++++++++++++++++++++++++++++++++++++++++++++

First of all, Thanks

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Thanks, I want to make a report with fields with the same name, only if the record has more than one record, write the first register in one field and the second in another.

Example:

The query SHOWS ME THE FOLLOWING LINES.

FIRST NAME:

1.- PETER

2.- JHON

3.- HOZAWA

4.- ADRIANZAZU

in my report I want this:

 

+++++++++++++++++++++++++++++++++++++++++++

PEATER                                               HOZAWA

JHON                                                  ADRIANZAZU

 

                                                          PEATER(sign)

                                                        JHON(sign)

+++++++++++++++++++++++++++++++++++++++++++

If is it possible?

First of all, Thanks

Link to comment
Share on other sites

  • 4 months later...

Use sub-select in your SQL. 

Sample:

select rownum,

(select name from table where rownum = 1) as field_1,

(select name from table where rownum = 2) as field_2,

(select name from table where rownum = 3) as field_3,

(select name from table where rownum = 4) as field_4

from table

where rownum = 1

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...