JasperServer - how to stop horizontal line in report from stretching across screen - jasper-reports

I created this report in iReport Professional 4.5.1 and deployed it to JasperReports Server today. The total page width is 792 pixels. In my report I have some horizontal lines that are 752 pixels wide. When I run the report in JR Server the horizontal lines stretch all the way over to the right side of my monitor. This happens when I schedule the report and ask JR Server to save it as an HTML file, but when I schedule the report and save the output as a PDF the lines are the correct size.
How can I keep the horizontal lines from stretching? The stretch type for each line is set to "no stretch." My other report elements are managing to hold their position.
Thanks,
Lisa

Try using cell borders to draw those lines instead of a static "horizontal lines."

Thanks, Sam! Your answer helped me solve this. My report is a 6-column report and I have labels that I only print in the first column. Cell borders wouldn't work because there would be lots of gaps. However, I realized that my horizontal line did not need to be 752px wide; it only needs to be slightly wider than the width of the first column and the report will take care of copying it into the subsequent columns for me. I set the horizontal lines to 127px wide and now I have an unbroken horizontal line that runs through all of my columns. I can't believe that didn't occur to me when I was creating the report in iReport.

Related

Vertical & Horizontal data arrangement in same page of Crystal Reports

I am importing data from a single data set in my crystal reports. I have just a single column table in my report. I want to arrange some data vertically say 10 rows of the table (In two vertical lines) and some data horizontally say next 10 rows of the same table (In two horizontal lines). I have managed to do the first part that is arranged the vertical lines side by side (By using the option Format With Multiple Columns in the section expert. I am facing difficulty in arranging horizontal lines on the same page (side by side of vertical lines). Any hints how can I achieve this. Any help will be appreciated.
Note: I have tried the subreports method, but was unsuccessful. The subreports shows one row per page for horizontal data and vertical data also limits then one row per page when I use subreports.
Image also attached for reference
Make sure to choose the correct printing direction. Tick `Across then Down':
Go to Section Expert.
Select the section you want to make it multiple column under "Sections" (usually it's 'Details')
Make sure you have "Format with Multiple Columns" is checked under Common Tab
Now you should see Layout Tab on the top right corner, select that.
Set Width to 2" or whatever you want under Detail Size.
Then under "Printing Direction" set "Across then Down" option.
Click OK and you are all set :)

Vertically center report footer in remaining space on page

Is it possible to vertically center my report footer in the leftover space at the end of the page? The size of this leftover section depends on number of data rows.
There's no easy way to vertically center things in Crystal. Frustrating as it may be, there's no Vertical Alignment property on most things, and the Size/Position of things is static except when other objects push them around to make room for themselves.
However there is a ridiculously silly hack you can do to make this work.
Write a formula, let's call it SillySpaceFormula, that uses a loop to generate a certain number of return characters. Based on the number of records on this page, SillySpaceFormula will grow or shrink inversely. Set Silly's font size to be half the size of your details section. Then place this formula in a section above the orange-outlined box and set "Can Grow" to True.
If you do this just right, SillySpaceFormula will grow by one line when a record is removed and shrink by one line when a record is added. Because the formula field Can Grow, the orange box in your screenshots will be moved up and down automatically.

Vertical Align Crystal Report Text Filed

I have a scenario in which my reports fields doesn't look like centered Vertically,
Below is the screen Short of the output.
As it can bee seen from output that data with a bigger font is clearly seen centered vertically, but the data pointed with lines is left-top justified, i want that to be left-centered.
For vertical alignment I did this .
and code behind formula is:
if {NewReport;1.TireLevel} = 1
then
crCenteredHorizontally
else
crLeftAligned
The Editor Screen.
Sadly, Crystal Reports doesn't support vertical alignment in the same way it supports horizontal.
It's possible to use labels on the vertical ruler and enforce Snap to Grid, but that might not work within a table. Or you can add line breaks, blank rows, or plain white objects to push things into position. But there's no easy way to enforce a vertical center.
In your particular case, I would actually make two seperate fields: One for large text and one for small text. Layer them on top of each other and reuse your current formula to alternate their suppression. This way you can move the smaller text vertically down without undoing the vertical alignment on the large text field.

Jasper sub report border line not covering all tuple height

All Works fine but, rows margin do not cover all height. as shown in attached these two pictures.
How I am doing: I put rectangle in detail band, than sub report and other fields. on all fields, sub-report and rectangle i also apply stretchType="RelativeToTallestObject and isStretchWithOverflow="true" for warping up the text which works fine. I am facing this problem still unresolved.
As per my understanding: sub-Report fields are also stretchType="RelativeToTallestObject but didn't detect or get stretched of its main-report column. while if sub-report need extra space it will show properly. I have tried almost every thing available in iReport-Designer.
Drop figures. Use borders, preferably via report styles.

How to create vertical line in iReport?

I'm using iReport-3.7.4 ,
I want to make table in detail like this ,
but , the line in this table can't longwise until the end of the table,
I've placed this table in detail ..
In iReport, Right Click on a Field, and goto Padding and Borders and set Line width to 1. As shown below:
Put the repetitive things in sub-report and draw the vertical lines in appropriate margins. Load the sub-report in the main window with its width tallies with the parent width. Test & modify the report again an again till you get the lines in the correct places. Moreover make sure you have checked on Print Repeated Values property for the line.
I've attached some reports I've created for my project, hope they can explain you well.
The Parent Report
The Sub-Report
The Final Output
If you really want to draw a line then just drag line element from palette and drag the bottom middle point of that tile element to increase the size and then decrease the width by dragging left middle point.