I've had this issue bothering me for quite some time now.
When I leave whitespace underneath a list, the list will push this downwards, instead of overwriting it.
Sometimes while doing so, pushing content onto the next page !
I've tried to illustrate the situation - see attached.
In the first image, the chart at the bottom left has position type "float", hence it's positioned underneath the whitespace.
When I change it to "relative to top", it's positioned at the correct place, but still the whitespace will be present underneath it (between the chart and the footer)
Can this be solved, and how?!
It's a real problem when trying to get a decent layout.
Thanks in advance.
That's just how JasperReports is. You designed the report with whitespace in it, so the report keeps it there.
In many cases (and I suspect that includes this case) you can get what you want by simply making the List component object bigger. In effect will set its minimum size to match the chart to its right. It can stretch further, but it won't force any whitespace to be added into the rendered report.
Related
Good morning, I would appreciate your help with this. I am making a report as requested, but I can not make a line cover the entire area of empty detail, in the image that I put only have two details, what I'm looking for is that line on the left extends throughout the space in white framed in red without all the details, is it possible? What should I configure in the line, thanks in advance.
Use I report 5.6.0
http://subirimagen.me/uploads/20190121164814.png
I would have put this in a comment but I don't have enough points. If the page height is immutable, and the line needs to stay the same throughout the page, you can just put that line in a background band.
This question is related (follows from) this question.
I am dynamically generating Word documents from data in a database. In the generation I need to have the First Page of a section have a different top margin than the other pages in the section. For reason that would take too long to explain properly, I can't just create a new section with a different top margin.
To get around my problem I thought I would create a shape (rectangle) with no border and no fill (invisible) that was the height I wanted my margin to be. I would then place it absolutely at (0,0). I would also make it wrapTopAndBottom so that it pushed the text in the body of the page down. This is working... except for one small problem.
As you can see there is a large, blank area immediately after my shape. There are actual blank lines there. You can see the lines better in this image where I've put text in those lines.
When I look at the header xml file in the Word archive, those lines don't exist. I'm not sure where they are coming from or how to get rid of them. I can manually remove them using Word but every time I regenerate the file they get put back in there. If someone knows why this is happening and / or how to get around it, I'd appreciate the help.
Thanks.
I finally figured this out.
Sorry I couldn't post code up here. First, I'm not using C#, I'm using PHP. Second, the amount of code I'd have to post to show how the header is getting created is prohibitive on a forum like this. Third, I'm not really allowed to post the company's code up here.
In any case, the problem was simple once I saw it. We are placing multiple absolutely positioned objects (shapes, text, images, whatnot) inside the header. In the class that creates these objects each one was being placed inside a <w:p> element. For example, if there were 3 such objects, the XML looked like this.
<hdr>
<p>Some Object</p>
<p>Some Object</p>
<p>Some Object</p>
</hdr>
The problem is that even though each of the objects inside the <p> are absolutely positioned, the <p> element itself creates a line and space for that line. So the header above would have 3 blank lines in it. This became an issue if the header had 6 or 7 objects because the blank lines would push the header's margin down and force the page's content down as well. This was undesired behavior.
The solution is simple. All the absolutely positioned objects can be placed in the same <p> element. This leaves only 1 blank line in the header no matter how many objects you have.
Im using RDLC for VS 2010 and exporting the graph to a word document gives one extra blank page (its not showing in PDF though). All of the dimensions in Report, Chart and Body are set 11x8.5 with no margins. I just wonder what could be causing the blank page in Word.
I was having the exact same problem and managed to solve it by adjusting the layout of my report.
Basically I moved all of my rectangles/tables etc to sit tightly next to each other, eliminating any white space where possible and also resized the report to be as small as possible, i.e. sit tightly against its contents.
It might also be worth enabling the report option to 'ConsumeContainerWhitespace'.
I suspect Word uses its own pagination logic, which is why you see a difference between pdf and doc. So it may just be the case that your report is over-running very slightly into the next page and saving a little space on the report may prevent this.
I realise this is not a precise answer, but I hope it helps nonetheless.
I have a bar chart with horizontal bars. I used this article to setup the dynamic height property:
http://blogs.msdn.com/b/robertbruckner/archive/2008/10/27/charts-with-dynamic-size-based-on-categories-or-data.aspx
Everything looks fine in the viewer, but as soon as you go to print layout, pdf, et.al there is about 50% more blank space below the chart.
I've created a sample report (using AdventureWorks DB) to show what is happening. I placed 3 charts with blue backgrounds, each inside its own rectangle with gray backgrounds. The first chart has an expression in the DynamicHeight property, the second chart has a hard coded value in the DynamicHeight property of 8.5in, and the third chart has a blank DynamicHeight and a 8.5in in the normal Height property. I have it return 15 items to place in the chart.
They all look fine in the viewer like I said before, but go to Print Layout and the first and second charts take up twice the space with half of it being blank below the report.
I tried to post the .rdl code, but its too much for the size limit.
I have an open ticket to Microsoft that has been escalated.
We've filed the necessary request to get collaboration from our development team so we should be getting a response regarding this functionality sometime in the next couple days. I'll let you know what they say.
Development has later confirmed it was definitely a bug, now are trying to decide if it is worth it to add to the next cumulative update or wait until SSRS 2010.
The work around until this is fixed, is to place the chart control into a table/tablix.
I added an empty table, deleted the details row and the two extra columns, and added my chart that was giving me problems. Everything appears to re-size correctly now.
try setting up the interactive size, margin and page size. im not sure if it will work but you can try. page size - margin = interactive size. do not exceed from your page size when giving value to your interactive size and margin, this also can cause white spaces in print layout.
hope it helps.
best regards,
cathy
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.