views:

314

answers:

2

Using ReportBuilder 7.X

Question

Is it possible to Control Print to File.

I need to change the Length of a field at print time

Example:

label2

In the setup - I set its length to 800 which is the max possible this field should ever be. However, in many cases the record is less than that and i need to set it to the calculated size before printing to file.

Is this possible?

Is it possible to control any portions of this Print to file...at print time (before Print, after print)? Are the objects avaiable?

We are registered users of the 10.x and above i believe, but have still not gotten around to recompiling are application in Delphi 2009 and the new ReportBuilder....so, that is not an option at this point.

Thanks

Shane

A: 

You can try to use the OnDataChange event of the tDataSource that you are using to link your data to your report. This event fires when the current record in the associated dataset changes. In that event, adjust your label to the size for the current record.

skamradt
A: 

i solved this! Each control has a saveLength property. I can just use a global variable that can change at any time (controlling length of entire record). Then just before i print he label, i can set its saveLength property

thanks to all who responded though

Shane