Make JasperReports keep a text box on the same page as the item immediately after the text box - jasper-reports

I'm using iReport Designer 5.6.0.
I find that working with iReport and JasperReports is one of the skills that I learn and then quickly forget.
I have a subreport that shows three different "view" of the same piece of data.
Form View
Tabulated (Table) View
Plot (Image) View
Before each of the views I want to have a Title.
Here's a picture:
Jasper is sometimes putting page breaks between the title and its view.
Whats the best way to make JasperReports keep the title on the same page as the thing is titling?
The very fact that I'm calling my text boxes "titles" makes me think each view needs to be its own subreport.
Would that solve the problem?
Is there a "keep with next" box I need to check somewhere?

Here's what you should be doing.
Take a sub report for every view desired(this would simplify the design).
Put your title and the desired view with data in the same band (this would force title to stick to the view) in sub report.
Hope it helps.

Maybe you can put them in its own group and check the box "Keep Together"

Related

Subreport needs persistent legend text

I am using Crystal Reports XI and trying to create a text box that would be displayed on every page of my multi-paged subreport. The text box exists on either the left or right hand side of the resulting pages. Right now, I am only able to display the text box once and only because the text box is placed on the main report. I tried to place the text box on a possible "page" section of the subreport but was not able to find such section.
Appreciate whatever suggestions you have. Thank you all! Sincerely,
You can place a repeating text box in the page header or page footer section that will print on every page.
That is the most reliable way to guarantee it showing on each page. The real question is: What kind of information are you wanting to display? If it is dynamic information that changes with the data on each page, the solution is much more complicated. If you are showing a static item, like a disclaimer, then the solution provided should be sufficient.
If you need more specific help, please provide more information regarding type of content and what you have or haven't tried. This will keep people from wasting time on solutions you know don't work...
Hi Create a formula #Group like below and apply group on this.And place the textbox on group header.
whilereadingrecords;
""
Goto change group->Repeat group header on each page.

Crystal Reports (Visual Studio 2010) - please help with page template

We are trying to create Crystal Report but have a problem with page template creation.
Report looks like this:
It should be "stamp" in the right bottom corner of page. First page stamp looks little different from other pages stamp.
At the left part of page on the left margin two objects are placed. Both of them oriented vertically and should work as header and footer (should be shown on every page) but take more room than required for usual header and footer. In this case we can't use usual header and footer to place these objects.
Tables on pages should work as "background" because even 1 record on page should show 20-row table (with first row filled in this example)
It would be great if we have something like "left running title" but we can't see such feature in CR.
I attached couple images to show how the report should look (sorry, i can't post images here because have no enough reputation points):
First Page Second Page
Could you please say how such report template can be created? We have no skilled CR developer in our company and have no idea which way of report creation can be used :(
We also agree to use another report engine if it is free and can work with .NET applications
Thanks for help
Dmitry
You can use underlay property of the sections to get the desired result. You can use the page header and page footer for putting the details and for page-header, set the underlay property to TRUE and for the footer, set the property of the detail section (I presume, you have a single detail section in the report) to TRUE. This will make the details of the header and footer display beneath the detail section.

how to create watermark background in crystal report?

hello
i want to create watermark background in crystal report.
one way is:
1- On the Report menu, click Section Expert.
The Section Expert dialog box appears.
2- In the Sections list, click Page Header, then select the Underlay Following Sections check box.
3- Click OK to preview the report again.
but in this solution lines and boxes in report design page appear back of background image.
what is better solution?
the solution to this problem is make a subreport, the main report will only have the watermark on page header A, and the subreport on page header B
Your method is the best way to do it, as far as I know.
On your background don't forget to right-click->move->to back. That should put the background image in the back and all other report elements in the front.

How do I build a crystal report from the bottom of the page, up? (Whitespace before the data)

I would like to build a report that starts at the bottom of a page and grows upwards instead of a report that starts at the top of the page and grows downwards. How could I do this?
--Edit--
For clarification, below is an image depicting the way I need to construct the report.
Basically, I'm looking for a way to have the whitespace at the top of the page and the data at the bottom of the page, instead of the more traditional look of data at the top of the page and whitespace at the bottom of the page.
Without knowing much about what the request is, I don't believe there is a way for the report to run from the bottom up, but you could possibly do a couple things to fake the system out.
For example you can do something like in the following link to put your summaries in the header:
Crystal Reports: global variable running total not displaying in header
Then you can play with the sorting of the details if you need the rows to go in decending order.
Hope this helps.
[EDIT] I see you updated your question so I'll add an update to my answer.
One more thing you can try out is to play around with the Print at the Bottom of the Page and Keep Together properties of the sections. I haven't tried this, but one thing you may be able to do is put the section at the bottom of the page and perhaps find a way to have the section grow from there. You will have an issue if the page goes to another page and though it seems possible in my head that the section could grow while being placed at the bottom of the page I haven't tried it so it might not work. I am just throwing it out there for one more thing you can try. Hope this helps.
You could try:
Create an empty report with your headers and related text
Put a subreport displaying your data in the report footer and set the sort order for the subreport query to descending.
In the report footer properties, select Print at bottom of page
I tried it with some sample data and it works, but I'm not sure what will happen if your data goes to two pages.

Crystal Report - Last Page is blank

I have a crystal report which when generated has a last page that is blank except for the page footer (which indicates the current page, as well as the report title).
This only occurs when the data displayed on the second last page completely fills the page.
Would anyone have any ideas as to why this might be?
When you check the checkbox New Page After, you will see an icon just right to it. This icon represents Formula Workshop. Click this icon and type NOT OnLastRecord.
Save and close the window, you are good to test this and praise me for the rest of your lives :)
Instead of using the checkbox on the group footer, use a formula.
The one that I use is
not(OnLastRecord)
You have some (almost) empty group footer, which doesn't fit onto last (non-empty) page.
You have to set "New page after" option to some inner group footer section.
I know that this is an old question, but I just had a similar problem.
In my case the last page was printing the Page header and nothing else.
It turns out that the fix for me was to Right Click on the Report Footer (Which had no contents) and choose Hide.
So it was basically putting in a blank report footer and including the page header with it...
Hope this helps...
+1 to Arvo because what he said is probably the case. I'll expand on it a little.
More than likely you have a section that will not totally fit on the second to last page so it spills over to a new page.
Some options you may be able to use are in the section expert are "Keep Together" which keeps all the lines of the section together, either on the current page (if there is room) or on the next (if not), or the "Suppress Blank Section". You could also try to shrink the height of the section, but this will probably not work in all cases.
As Arvo also said, make sure that you do not have the "New Page After" flag set for any of the sections as this could cause it as well.
I was in the same situation and a good solution is to control the "New Page After" (in my case in the group footer) by a simple sentence, only doing it, when the current page is not the last.
With the option "New Page After" unchecked put a formula on it, clicking it's right formula button.
Code:
if(PageNumber = TotalPageCount) Then
True
else
False;
Saves a lot of troubles.
Greetings.
P.D. It's Crystal Syntax.
Evaluate if you need a report footer. If don't, be sure supress this section on report.
In addition, to checking what other have mentioned above, after creating a new Blank Report, under Page Setup, the paper size for me was A4 by default. When I changed it to Letter, I would get a second blank page in the Print Preview as well as when physically printing to letter paper. Presumably this is due to going over the page boundaries. I was able to reduce the magins, and make the report content fit on the page.
Or being on “Design” tab, under “Report Header” right click and select “Fit Section”
In my case, it was an image outside the paper design, i just align it and scaled it to fit my paper.
For some this might happen when there is an unused section like report footer. Suppress the section, it will be resolved.