0
votes

I am working with iReport 4.7.1. It is a report with a lot information (402 parameters).(Not fields, but parameters).
I’m using a page header’s band 1284 and a summary’s band 1409. The page format is 8,264 x 20,125. The report, don´t print properly. The detail band, works OK, but the summary part is a mess. The summary band’s code is:

<summary>
    <band height="600" splitType="Stretch">

And the detail code is:

<detail>
    <band height="1409" splitType="Inmediate">

When I use other detail band (detail2) printing is a mess The code is:

<detail2>
    <band height="1409" splitType="Stretch">

I have tried to change the page format. By default is 8,264 x 20,125 inches, When I change to A4. The size is the same and don’t get better size. The default page is very narrow. Would be reasonable for two reports instead one? Can I change the size of the bands and have room for all my items?.

2

2 Answers

1
votes

First you said 8,264 x 20,125 inches which I assume is not correct. I think Jasper Reports uses pixels not inches. Second there is a conversion when exporting to PDF from the size specified and inches. As an example, for a regular 8.5" x 11" letter, the corresponding size in Jasper Reports should be 612 X 792.

So what does that mean?

Well that means every real world inch is equal to 72 in the Jasper Reports world. So your 8,264 x 20,125 size in Jasper Reports would be 114.8" x 279.5" in size, which to give some more perspective would be roughly 9.5 feet by a little over 23 feet. That is pretty damn big!

So what do you do?

Well A4 in Jasper Reports is 542 x 842. So you need to scale down the actual size of your report by using smaller fonts, wrapping of text, but in this case I do not think that will be enough.

Designing reports can be seen as a an art (keep hanging I have a point a promise). It has specific goals that must be met or it is a failure:

  • Needs to contain the necessary information to be useful. This can be tricky, if you do not have enough data in the report, it will not be useful. Have to much, and nobody can make any sense of it. It is a balance that must be met.
  • Needs to be ecstatically pleasing to the eye. This doesn't mean pretty pictures. It means it needs to have a natural flow. If things are misaligned, or not grouped accordingly, readers will not be able process the report.
  • The delivery format needs to be considered in the layout. There is a huge difference between a report that will be delivered as a PDF vs a report delivered as a spreadsheet. With a spreadsheet you can fit alot more information since the user can pair down what columns they want easily by hiding them.
  • Is the report to be printed? If it is going to be printed, you really need to stick to standard page sizes, or at least know what page sizes it will be printed on. This will limit you, as you can not make the font so small that you need a magnifying glass to read it.

I am sure there are others, but this are ones I personally keep in mind when making a report.

In your case, with so much data I think you have two choices:

  1. Only allow export to Excel and let the users decide what they want. The downside is if they are printing it, it will not look as nice printed from Excel.
  2. Break the report apart into different reports that meet the specific needs for each task the report is used for. The downside to this is it is more work. It requires you to first figure what this report is actually used for and how. And then what information is actually required for the users to use it make decisions.

Personally I would go with option 2. A report with to much data almost useless. How are the users expected to draw any conclusions from the report with so much data? Keep it simple, clean, and to the point as possible and it will be a more effective report.

0
votes

Thank you. I split the report in two small report. I try created other detail band. I put detail 1185 pixels and detail 2 600 pixels. And both with Spilt Type Inmediate. The report is better but some parameters are in disorder Could be some properties bad? Is reasoneable put the information in fields instead parameter? The pararmeters are hash map. Java code

 parameter.put("i_4_motivo_vol",     arrayTodosIndicadores[327]);

jrxml code

<parameter name="i_4_motivo_vol" class="java.lang.String"/>
<textField>
<reportElement uuid="5e27ddd1-747f-474c-82af-ac3cfcf8eee6" mode="Transparent" x="450"  y="116" width="41" height="20">
                <printWhenExpression><![CDATA[Boolean.valueOf($P{tamMuestral_4}.intValue() >= $P{muestra2}.intValue())]]></printWhenExpression>
            </reportElement>
            <textElement/>
            <textFieldExpression><![CDATA[$P{i_4_motivo_vol}]]></textFieldExpression>
        </textField>