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

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.

Related

Can we do auto adjust of column size on the basis of length of the data in GWT

Since the way in the MS excel when we click on the grid it auto adjust to the size of the data in the grid. Can we have same functionality here also in GWt.
You can program this by hand by getting the offsetWidth of all elements in the dataGrid or whatever you are using and keep track of the max.

How to apply color dynamically in a header text box on Tablix SSRS

I did a ssrs report using Tablix Matrix control. I am designing that matrix with one column and many rows. That once column will repeat based on the group that i had from SP at run time. It works fine. But now I want to change the background color dynamically for the header text box of the tablix. Is it possible?
I need to do dynamically. Since I dont know how many column will get at run time. It depends upon the data from Stored Procedure.
Can any one help me out this?
You can set the background color for the textbox to an expression, just like any other text box. For example, something like this:
=Iif(Fields!MyHeader.Value = "AlertColumn", "#FF0000", "#FFFFFF")
This is a bit old post. But I can say that yes we can achive alternate row/Column background color on Matrix control.
Please take a look into Matrix row/column background color thred.

Create a Crystal Report cross-tab 'header' label

I'd like to create a 'header' label that 1) is centered over the cross-tab and 2) grows with it. Unfortunately, CR 2008 (or earlier for that matter) doesn't have this feature.
In image (below), I've added a text field above the cross-tab, but I can't think of a way to get it to grow/shrink (horizontally) with it.
If you're able to calculate, say by a summary function, the number of columns you will have then you can do this:
In your crosstab, check to see the width of your columns. The columns should be set widths. Edit: The crosstab adds some padding, so you will have to figure out the column width by measuring in Crystal with another field and eyeballing until it's close enough to work
Right-click on your label, and hit "Size & Position".
Add a new formula for the "Width". The X,Y positions should stay the same.
Use the summary function (You could create a SQL Expression or formula that only shows the month/year of your date fields and then distinctCount() them) to find out how many columns you will have multiplied by the width of each column. This will take some trial and error for sure, but I don't see why it wouldn't work.

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.

JasperReports - stretch report band to fit all columns in one row

I am developing report which is not going to be put on paper - just export it into xlsx format.
I have ability to set width of band with data to high number, but i would like to have ability to make this band stretch horizontally to fit all cells from one results row in single line. How I can do that?
PS: I am using iReport to build jrxml file, but I am comfortable with directly editing the jrxml file.
Have you tried using Dynamic Jasper. I think the example here may solve your problem. It can create the you the jrxml file if you don't want to have the DJ code in your application.