3

what I need to do is dynamically set column width: something like

ColumnBuilder builder = ColumnBuilder.getNew().setWidth(x); 

but I actually don't know what x is when report is build. This "report template" will be used on many different queries and I don't know what will be the length of fields.

If you use builder without setting width, all columns have same width, even if fields in one column have for instance 200 chars and other 1.(i don't want to have 50 newlines in one column)

I am trying to use some kind structure containing max length for each column but i don't like that solution and the code is a little bit nasty:)

Thanks for the help.

Rachel Gallen
  • 27,943
  • 21
  • 72
  • 81
NubAtar
  • 111
  • 1
  • 5
  • hi I was wondering how did you ended up resolving this, im in the same trouble at the moment :) – Julia Jan 12 '11 at 06:03

1 Answers1

-1

You should pass true to setUseFullPageWidth() of the FastReportBuilder class to use the entire page when dynamically setting the column width.

For example:

FastReportBuilder dr = new FastReportBuilder();
dr.setUseFullPageWidth(true);
Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Hemal
  • 1