jasper report height - jasper-reports

I am creating a jasper report. The default size of the report is A4. I want to change the report's height dynamically. I am using HTML Export.So it is creating a html for A4 size(Even though content size is half of the A4 size). If the report content size is small, I want the html page size also small.
Is it possible to achieve?

Try setting the contents Position type to Float in the elements properties.

Related

BIRT Report dynamically set width

I am having few rptDesign files in which width and height is set. When the report renders on browser this values (width and height ) shows with pt unit. I wanted to have this as % so that with the screen size it should enhance the generated report size. is this possible in BIRT ? if yes how?
#JAVA_CAT
If you want to set the height and width of a report then select Master Page from the tab menu, then click the properties tab directly beneath > Here you can see & set the height and width which can be changed to percentages.
Example

How do you auto size columns of a grid for PDF format in Birt reporting

I am working on a report in Birt reporting using Birt 4.5 in eclipse.
I have a grid that has 3 columns and inside each column is a label with some hard coded value to give you a test scenario,I also set the "Can shrink" property to true, and I did change the layout Preference to auto-Layout, see pic bellow.
Now when I run this example as a Html out of eclipse I get the following and it works exactly like I want it to. It auto sizes the columns so the first column size has increased and the last 2 decreased.
Html pic :
Now I actually want it as a PDF format but the columns doesn't auto resize.
PDF pic :
I want this functionality because my report is going to be dynamic.
Is it possible to get the same result in the pdf format as html? If it is what properties should I set or how do I accomplish this?
No, this is not possible.
Those columns with no width specified (in your example: all three) take the remaining width (after considering the columns with a specified width) to equal parts.

how to fit content of reports so that we can print it on A4 size

I have created a report in ssrs 2008 r2.It is larger then the normal A4 size .So when i export the report in word i see it clearly but when i see print preview of the report in to the word its contents get cut from the right end.I think it is due to report size. Is there any way so that we can fit the content at the time of export in to the ms word so that user can clearly take a print out in A4 size.
The only way to do this is to physically decrease the size of your report when building it as there is no auto size capability in report builder.
Right click and properties on the grey back ground. Then change the size and orientation as required.
Then click on the white body and ensure the properties bar is open. Expand the size properties option and set the size of your report to reflect the previous selection.
Also don't forget to set the margins as this will effect the amount of printable space on your report.
Lastly ensure you alter the size of you fonts and report parts to fit on the size required.
I'd love to see an automatic sizing feature in the report builder for exporting.
This is because your report content size is greater than the report size.
Report size for an A4 page is 8.5*11 inch,if your content is greater than the report size then it will move the columns to the next .
Adjust the Size of each Tablix which should be less than your report size.
Select Tablix to view properties.
expand the size option and adjust width and height accordingly.
Thanks
Just increase height and width of paper size in Report builder properties. Doesn't have any sense but it works for me.
In Report Builder in the Report Properties change the width of the report so that it exceeds the width of your data. Exporting to both Word and PDF will mean that it fits the page width. You can also adjust the height so that the report fills your desired paper size.

How to increase Height and Width of Crosstab Cell in Crystal report dynamically according to text size?

How to increase Height and Width of Crosstab Cells in Crystal report dynamically according to text size. I have already checked the "Can grow" property to true for individual cells but have no change.
I am new in crystal reports. Please help me.
Don't think you can. You only get to set the height and width of one crosstab cell at design time. You may have to consider a different approach that 'simulates' different column widths in the crosstab.

Jasper Reports image and text mix

I want to write a jasper reports application. It has to arrange an image and a text such that they will be appropriately placed. This is what I want.
I get images and texts from a web service, so I can fetch image size on runtime. If its width is bigger the text should be below, and vice versa. I tried setting width option by a parameter, but it did not work.
How can i do it?
Correct: You cannot set the image width using a parameter.
The quickest solution is probably like this:
Determine what your maximum width is. Then use a 'Print when expression' to display either the picture-next-to-text layout or the picture-above-text layout. Your report will have 2 image elements and 2 text elements, but you'll choose which one to display based on the image size.
An alternative would be to investigate something like Dynamic Jasper. That's a project designed to dynamically generate the .jrxml on the fly, so it has the ability to modify the width similar to what you're describing.