JasperReports: Show line between two enteries, but not after the last record - jasper-reports

I an using JasperReports to download some content in pdf format. I fetched some data from the database and add a textField in the Detail band to show the entries of a particular column.
This is what I am getting
and if I add a line than pdf changed to
but my requirement is to show line between two entries.
I want to remove last line and the pdf should looks like

Put the line at the top of the detail band instead of the bottom, then change the printWhenExpression to $V{REPORT_COUNT}.intValue() != 1.
The line will then be printed before each entry except for the first one, essentially putting a line between each entry.

Related

Crystal Report: Remove empty extra line detail section in excel

I am trying to export report in excel but detail section give extra line per record. i want report with only single line for single recordenter image description here
Make sure that the bottom of your section is touching the bottom of every field in the section. If any fields are slightly taller/shorter or there is a gap between the field and the section boundary this normally happens.
If you believe that not be the case, possibly share a screenshot of the report in design mode and it may help.

How to remove blank row in Jasper reports

This question is in continuation : How to hide textField in report generated in specified format?
depending on some conditions when all rows are blank how to remove those ?
in my case one column hiding because (print non repeated rows), and two columns are hidden becase of given condition (pdf.exclude) so now row is blank.
I want to remove this blank row. Can you suggest ?
I hope you must be using Textfield, and navigate to properties then select Textfiled tab and check blnk when null checkbox, If you want to remove the line itself from common tab tick remove line when blank.
that's about it

"can grow" proprity of a crystal report field doesn't push down lines correctly

In my CR report i wanted to draw a Table so i used : Lines & Boxes.
But some of my fields contains a lot of information, so i had to change the "Can Grow" propriety of certain field to True, now the fields can wrap to Multi lines, but they don't push down the lines.
IN THE IMAGE: The Highlighted (Green) line is the actual position of the line (you can see that it hasn't being pushed down), The red line shows the right position where it is suppose to be.
How can i make "Can Grow" propriety in crystal report pushes down the lines ?
i finally found the answer :
The Line needs to be placed in a different Detail Section.
You need to split the details section into two parts (Details Section a, and b), one that contains the Field and the other under contains the Line, this way doesn't matter how big is the upper one (The one containing the Text) the Section containing the line will always remain under.
Actually you can put the line on the same section instead of creating a different section just for the line.
What you need to do is the following
Right click > Format Line
Check "Move to Bottom of Section when Printing"
Then your line will always be pushed down to the bottom of the section if your field grows.

How to add multiple lines in tab strip of sap UI5?

I am trying to add new or second line in tab-strip.
Once the space is exhausted in first line ,I want another line to display tabs.
Can I get a sample code?
Note : Tabs are generated dynamically on click of button.
The sap.m.IconTabBar only supports a single row of IconTabBarFilters and uses horizontal scroll when there is not room to display them all in one line.
In order to achieve your goal you need to define several IconTabBars and determine the number of IconTabBarFilters you want in each row. Once a IconTabBar is "full", add the next IconTabFilter to the next row's IconTabBar (and make it visible).

How to draw a line above a picture?

How do you display a line above a picture in Crystal Reports? I'm currently using Crystal Reports 8.5.
I am using a jpeg image in the report, with an image header section set to “Underlay Following sections”.
I added another header above the image header section, drew the line, and then gave the option “underlay following sections”, but the line is not displaying above the picture.
How can I add a line that will display above the picture?
There's a developer-provided workaround here, using textboxes: http://scn.sap.com/thread/1916479
Insert a text object and enter nothing.
Change the size (the height matches the line width) and background (background color matches the line color).
Right click on the text object and select Move | To Front. And then the "line" will be on top of the picture.
Unforunately, using Crystal Reports 2008, this would only allow me to shrink the textbox to a certain height (0.042 inches), which was still too big for a 1-pixel line.
If I understand your question, you want to add a line to an image in Crystal Report. Unfortunately, you won't be able to do this with Crystal Reports. Your best option is simply to draw a line above the image. If there is an issue with placement of the line, add another section above the section that contains the image.
A little late response, but this CodeProject answer works. I had the same problem and this workaround did the trick. I quote the answer here.
Create 2 separate reports. The 1st report will be the main report and the 2nd will be a subreport.
Place all page headers and footers on the main report.
(Main Report)
Right click on the PageHeaderSection and insert section below.
On the new PageHeaderSection, insert the image(your watermark) and set the section to Underlay Following Sections.
(Subreport)
Go to your subreport and place your data and lines on it.
(Main Report)
Again, right click on the PageHeaderSection and insert section below.
On the new PageHeaderSection, right click, Insert->Subreport
Select Choose a Crystal Report in a project, then click the 2nd report you've created. Voila! The lines will be now on the top of the
image! Just be sure to remove the borders of your subreport.
an easy way I added a line is:
add a text box (length of the line you want)
right click -> format text
click on the tab border
select either top or bottom border, the line style etc etc
You can draw a line or a box to appear on top of images.
To do this:
1- Go to Report Options.
2- Check the option Draw Line And Box On Top, and click OK.
Now you can draw over the images.
I've never tried to do this before now, but it appears that the Z order functions (under the Move menu- to back, to front, etc...) are not available for lines or images and it appears that the image z order is always above the line even if you have multiple sections and use the "underlay following sections" option.
My answer is that this can not be done the way you are trying to do it, but what if you try another way.
EDIT:
I'm assuming that you are trying to create a strike through in the image in certain instances. Assuming that, you should be able to have 2 images (one normal and one with the line through it) that you should then be able to dynamically change based on you're criteria. You should be able to find many articles on dynamically changing the Crystal Report image. Hope this helps.
What worked for me was to create a subreport that essentially duplicates/replaces the Details. Then the usual process of putting the image in the page header and underlaying following sections. The subreport, including its lines, appear above the watermark for me, but please note I'm using Crystal XI.
If I understand your question correctly - In the header section, use the line tool to draw the line. It's in the CR Toolbox. Then drag your image after the line.