Jump to content
Changes to the Jaspersoft community edition download ×

Report with columns


Recommended Posts

By: Gabriel - acharat

Report with columns

2002-11-08 04:33

Hi,

 

I have a report with 3 columns in the detail.

In some cases I have records only for two columns but I want that the lines between the fields and the header of the fields appear on the third column.

What can I do ?

 

Thank you,

Acharat

 

 

 

By: Teodor Danciu - teodord

RE: Report with columns

2002-11-08 13:51

 

Hi,

 

I don't think I got the whole picture.

Could you be more precise?

 

Thank you,

Teodor

 

 

 

By: Gabriel - acharat

RE: Report with columns

2002-11-11 03:32

Hi,

 

For example, this report has 3 columns.

 

In this first case all 3 columns are filled because I have 9 records (3 per column):

-----------------------------------------------------------------

| pageHeader |

-----------------------------------------------------------------

|Name | Age | Name | Age | Name | Age |

|Joao | 25 | Adilson | 42 | Bedele | 64 |

|Maria | 30 | Maguila | 21 | Rivaldo | 25 |

|Jose | 32 | Giovana | 26 | Ronaldo | 26 |

------------------------------------------------------------------

| pageFooter |

------------------------------------------------------------------

 

 

But if I have 4 record for example, I have this:

-----------------------------------------------------------------

| pageHeader |

-----------------------------------------------------------------

|Name | Age | Name | Age |

|Joao | 25 | Adilson | 42 |

|Maria | 30 |

|Jose | 32 |

------------------------------------------------------------------

| pageFooter |

------------------------------------------------------------------

 

 

But I want this:

-----------------------------------------------------------------

| pageHeader |

-----------------------------------------------------------------

|Name | Age | Name | Age | Name | Age |

|Joao | 25 | Adilson | | | |

|Maria | 30 | | | | |

|Jose | 32 | | | | |

------------------------------------------------------------------

| pageFooter |

------------------------------------------------------------------

 

In this last case the layout of the report is preserved.

 

Thank you again,

Acharat

 

 

 

 

 

By: Gabriel - acharat

RE: Report with columns

2002-11-11 03:34

I'm sorry.

I'm trying again:

 

 

In this first case all 3 columns are filled

because I have 9 records (3 per column).

 

------------------------------------------------

| pageHeader |

------------------------------------------------

|Name | Age | Name | Age | Name | Age |

|Joao | 25 | Adilson | 42 | Bedele | 64 |

|Maria | 30 | Maguila | 21 | Rivaldo | 25 |

|Jose | 32 | Giovana | 26 | Ronaldo | 26 |

------------------------------------------------

| pageFooter |

------------------------------------------------

 

 

 

But if I have 4 record for example, I have this:

 

------------------------------------------------

| pageHeader |

------------------------------------------------

|Name | Age | Name | Age |

|Joao | 25 | Adilson | 42 |

|Maria | 30 |

|Jose | 32 |

------------------------------------------------

| pageFooter |

------------------------------------------------

 

 

 

 

 

But I want this:

------------------------------------------------

| pageHeader |

------------------------------------------------

|Name | Age | Name | Age | Name | Age |

|Joao | 25 | Adilson | | | |

|Maria | 30 | | | | |

|Jose | 32 | | | | |

------------------------------------------------

| pageFooter |

------------------------------------------------

 

 

In this last case the layout of the report is preserved.

 

Acharat

 

 

 

 

 

By: Teodor Danciu - teodord

RE: Report with columns

2002-12-07 03:07

 

Hi,

 

Put the vertical lines on the page footer section

ant use a negative Y for them so that they start

at the top of the page and run to the bottom.

Ignore the compilation warning.

 

I hope this helps.

Teodor

 

 

 

By: Gabriel - acharat

RE: Report with columns

2002-11-11 03:44

Ops, it doesn't work, but perhaps you understand.

In the second case the header of the fields (Name and Age) and the lines (|) that separates the fields don't appear. In the third case they appear.

 

Thank you,

Acharat

 

 

 

By: Teodor Danciu - teodord

RE: Report with columns

2002-11-11 20:51

 

Hi,

 

You can achieve this effect if you place the column

header elements, the column footer elements and

the vertical lines between your columns on the

page footer section.

 

It might sound weird to you, but in fact this is a

great solution that just came through my mind

today after reading your post.

For example, in order to put column header

elements on the page footer, they have to have

a negative Y.

This would generate a warning when you compile

the report, but you should ignore it as in the future

we might soften this warning so that it would only

signal for elements that are placed beyond the

band bottom.

 

I anticipate that you will encounter a problem with

the first page of the report, which contains the title

section.

On this first page, you might have to put shorter

vertical lines with a different Y offset to fit for the

lower column headers.

This can be achieved with two sets of elements

and by switching between them using the

<printWhenExpression> based on the built-in

PAGE_NUMBER variable.

 

This thread is related to your problem:

 

https://sourceforge.net/forum/forum.php?thread_id=760292&forum_id=113530

 

I hope this helps.

Teodor

 

 

 

By: Gabriel - acharat

RE: Report with columns

2002-11-12 04:21

Hi,

 

In fact, this works very well.

 

Thank you,

Acharat

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...