Jump to content
Changes to the Jaspersoft community edition download ×

detail band resizes to size of detail content


2004 IR Help

Recommended Posts

By: cosjav - cosjav

detail band resizes to size of detail content

2004-08-22 23:27

Hi,

 

I need to know how to allow the detail band to resize if the content of the detail band increases.

 

For example, I have a form where a user can enter the number of rows for the report to contain per page and this can range from 10 to 50 rows. If the user enters 10, I would like the detail band to resize to the exact size of the 10 rows so that the footer is positioned correctly. Also if they choose 50 rows, the detail band needs to increase in size to fit all the rows in a single page rather than breaking into the second page....

 

does anyone know how to achieve this?

 

thanks,

 

cosjav

 

 

 

 

By: Andrew McLaughlin - pik0

RE: detail band resizes to size of detail content

2004-08-23 11:23

Make the expandable portion a subreport. This segment will cause the detail line to stretch ad infinitum.

 

Piko

 

 

 

 

By: cosjav - cosjav

RE: detail band resizes to size of detail con

2004-08-23 22:05

how do I do that? (i want to try and avoid subreports since it would mean two files... and i'm not too familiar with making subreports...)

 

basically what I want is to have the "page height" of the report variable... so if the user wants only 10 rows the page height would be less, and if they want 50 rows the height would be more. Basically, whatever the user chooses, I dont want there to be any GAPS (that px image) before or after anything...

 

is this possible (please someone say yes....)?

 

 

 

 

 

 

By: Andrew McLaughlin - pik0

RE: detail band resizes to size of detail con

2004-08-23 22:44

I hear ya, but once you do one SubReport, you'll realize just how easy it is.

 

Think of it this way, a subreport is functionally equivalent to a master report. In fact, you can run a SubReport stand alone and even use the same subreport in more than one master report. Best of all, you can you one subreport from within another subreport from within yet another subreport and so on.

 

To that end, I really think your best solution would be to go the subreport route. Create a subreport that repeats that atomic repeated section.

 

One question of clarification, when you say that the user would want a different number of rows printed, are you saying just a bunch of lines? Where would this number (e.g. 10 or 50) be stored? Is it a column in the table?

 

Piko

 

 

 

 

By: cosjav - cosjav

RE: detail band resizes to size of detail con

2004-08-24 05:02

ok this is basically how it is...

 

* I have an html form which posts several search parameters which are set by the user (all of these parameters are used in the WHERE part of my query for the report)

 

* one of these parameters passed is the number of rows to be printed per page.

 

* basically the way I have implemented paging is using the "LIMIT {rowcount} OFFSET {offset}" conditions in my SQL query. so basically the number of rows set by the user will be the {rowcount} and the offset will be {rowcount}X{currentpage}.

 

* in other words I am creating a new report for each page (since in the case of large results, it loads faster this way, although there may be a better way to do this and if someone knows, please tell me)

 

* so basically all I need is to allow for a variable page height so the footer can adjust to the varying detail band size... using a subreport can really solve this problem? how is using a subreport going to allow for a variable page height?

 

I appreciate any suggestions and help....

 

cosjav

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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