Jump to content
Changes to the Jaspersoft community edition download ×

Multiple Pages


2005 IR Help

Recommended Posts

By: harvey - harveybernstein

Multiple Pages

2004-03-11 01:19

Hello

 

I'm new to Jasper and have now read the Ultimate Guide and looked at the samples.

 

I would like to print a report about nursing homes. The report will contain about 5 pages but I would like to control the position of the page breaks.

 

I belive I can do this with either sub-reports or by using the group feature. Would anybody be willing to share some sample code for me to look at?

 

Thanks in advance

Harvey

hb@bsemple.com

 

 

 

 

By: David Lim - aberrant80

RE: Multiple Pages

2004-03-11 01:22

I have no experience with page breaks, but you might want to do a search on that topic on this forum and the open discussion forum. I remember that others have asked about page breaks too.

 

 

 

 

By: harvey - harveybernstein

RE: Multiple Pages

2004-03-11 05:05

thanks for your help. I've had a look through the forums but i haven't been able to get to grips with how to set this up.

 

I've created one group and spilt the content of the report between the Group Header and the Detail section.

 

When i first ran the report the group header was printed once on a seperate page and then the content in the detail group was printed multiple times.

 

I then added $V{REPORT_COUNT} to the group and now both sections are printin on the same page.

 

I would like to print 5 seperate pages. If anybody has any code they wouldn't mind sharing I would very much appreicate it

 

Thanks in advance

 

 

Harvey

hb@bsemple.com

 

 

 

 

By: Carlos Costa e Silva - carloscs

RE: Multiple Pages

2004-03-11 10:32

What do you mean by adding $V{REPORT_COUNT} ?

 

 

Here is an example:

 

<group name="NewPageGroup" isStartNewPage="true" isResetPageNumber="true" isReprintHeaderOnEachPage="true">

<groupExpression>

[put here the expression that decides when the report should create a new page]

</groupExpression>

</group>

 

example expression:

 

-> break wheneve any of the fields change.

$F{field1} + $F{field2} + ... + $F{fieldn}

 

By the looks of it, this group should be the first one declared in your xml file.

 

 

 

 

 

By: harvey - harveybernstein

RE: Multiple Pages

2004-03-26 03:26

Hello All,

 

IÂ’m still struggling with the Page Break problem. Just to recap my problem is that I have a very large database table called Home which contains information about nursing homes as follows:-

 

SELECT HoID, HoActive, HoName, HoAdr1, HoAdr2, HoAdr3, HoAdr4, HoPostCode, HoTel, HoFax, HoEmail, HoPreferredContactFK, HoWeb, HoOwner, HoManagerTitleFK, HoManagerFname, HoManagerLname, HoManagerSalutation, HoMatronTitleFK, HoMatronFname, HoMatronLname, HoMatronSalutation, HoAdminTitleFK, HoAdminFname, HoAdminLname, HoAdminSalutation, HoNursing, HoResidential, HoLetterSignoffFK, HoMale, HoFemale, HoShort, HoLong, HoRespite, HoTerminalCare, HoDementia, HoMentalImpairment, HoDayCare, HoSingleRooms, HoSingleEnsuite, HoTwinRooms, HoTwinEnsuite, HoMultiRooms, HoMultiEnsuite, HoNHSContinuingBeds, HoOwnFurniture, HoGarden, HoChargeSingleNursing, HoChargeSingleEnsuiteNursing, HoChargeTwinNursing, HoChargeTwinEnsuiteNursing, HoChargeMultiNursing, HoChargeMultiEnsuiteNursing, HoChargeSingleResidential,

HoChargeSingleEnsuiteResidential, HoChargeTwinResidential, HoChargeTwinEnsuiteResidential, HoChargeMultiResidential, HoChargeMultiEnsuiteResidential, HoChargeReviewMonthFK,

HoLocalAuthorityFunded, HoChiropody, HoLaundry,

HoHairdressing, HoPhysiotherapy, HoNewspapers, HoMealsVistors, HoOvernightVistors, HoTripsDetails, HoComments, HoBrochure, HoLiftFK, HoOwnDoctor, HoTransport, HoWheelchairAccessFK, HoStairLiftFK, HoHomeLibrary, HoQuietRoom, HoSmokingArea, HoAlcoholPermitted, HoFlexibleMealTimes, HoTeaSnacks, HoSpecialDiets, HoResidentsCommittee, HoTVPoint, HoTVBedroom, HoTelephonePoint, HoTelephoneBedroom,

HoPetsPermitted, HoBirdSemple, HoCreateOn, HoUpdateOn, HoCreateByFK, HoUpdateByFK, HoLocalAuthorityFK, HoHealthAuthorityFK

FROM Home

 

 

As there is so much information I have had to create 4 xml files which would show all the information about one Nursing Home. I have tested the 4 files and they work perfectly showing the subset of information I would expect and I include links to two of the pages:-

 

http://www.bsemple.com/homePage1.xml

http://www.bsemple.com/homePage2.xml

 

I have been trying to combine all the pages to create my report. I seem to be going round in circles. Everything I try gives me strange results. I have read the developers guide, gone through the forums and I have read the tips and trick section on the website. No doubt this is really simple and I am not getting something.

 

Any help would be very welcome. If anybody has any code samples this would be appreciated.

 

Best wishes

Harvey

 

 

 

 

 

 

By: sunnf - sunnf

RE: Multiple Pages

2004-04-28 17:18

your problem is ok?I want know.

 

 

 

 

By: David Lim - aberrant80

RE: Multiple Pages

2004-03-11 05:17

By 5 separate pages, are you saying that your grouping would divide your data into 5 separate blocks? If so, and if you haven't, set the group attribute isStartNewPage to true for your group.

 

If you absolutely need to have 5 pages with not-so-logical breaks. Try looking at the tips & tricks section. IIRC, there's a bit about introducing dummy groups to help with breaks.

 

 

 

 

By: harvey - harveybernstein

RE: Multiple Pages

2004-03-12 08:29

Thanks aberrant80 and carloscs for your help. Sorry I was not making my self very clear. Each report will have 5 pages about a single Nursing Home. I will want to print perhaps 200 reports in total. Basically the report will be sent to the nursing home to ensure that the information in the database is up-to-date.

 

I added $V{REPORT_COUNT} because I thought I required this to tell Jasper that this was the expression I needed to move onto the next record in the dataset.

 

I will look at the tip and trick section and try to set up the dummy groups.

Thanks

Harvey

 

 

 

 

 

 

 

 

By: sunnf - sunnf

RE: Multiple Pages

2004-05-04 17:38

Ok?

Can you tell me how you do?

my email:sunnf@wan-bo.com

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