vertical autosize ?
Hi,
I would like my simple report printed just like a HTML document : the width
of the column is fixed and the height of the TABLE cell is auto-adjusted to
the content of the field...
I have put a DBText in a Region, which has Stretch property to True. But
what am I supposed to do now ?
If I set the Height property of the DBText to a large value, I can see the
content of very long fields with 3 lines... but it takes 3 lines too for
fields containing only one word...
Thanks for any help !
I would like my simple report printed just like a HTML document : the width
of the column is fixed and the height of the TABLE cell is auto-adjusted to
the content of the field...
I have put a DBText in a Region, which has Stretch property to True. But
what am I supposed to do now ?
If I set the Height property of the DBText to a large value, I can see the
content of very long fields with 3 lines... but it takes 3 lines too for
fields containing only one word...
Thanks for any help !
This discussion has been closed.
Comments
The DBText component does not descend from TppStretchable therefore the
Stretch property is not available. Try using a DBMemo instead. This
component is stretchable and will dynamically shrink or grow based on the
size of your text field.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
it seems taht the preview of a report using this component does not look
like the report itself : on the preview, the size of the font is adjusted to
allow a maximum of text on a line, but not on the report.
Is there a way to avoid this ? (chosing adjust or not, but having the same
feature on preview and report...)
I'm a bit unclear about what you mean by the Preview looking different than
the "report". Do you mean the report when you print it to paper or when you
are in the designer?
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
you
sorry for my english is so poor !
here are images you can watch :
the preview : http://kebzeweb.free.fr/report.jpg
the report itself : http://kebzeweb.free.fr/Report.pdf
You can see that the preview "cuts" the line as the report will do (that was
the object of my first message, thanks for your help !), but also minimize
the font size !
This is not really a problem, but just a feature that make the preview not
so pretty than the report and our customers are first "afraid" to print such
a strange aligned report.
Hope this helps,
Christophe
Thanks for the explaination.
You have two options.
1. Change the Report.PreviewFormSettings.WindwoState to wsMaximized. This
will open your preview window in a maximized state instead of the smaller
window you currently see.
2. Adjust the width and height of the preview form manually inside the
Report.OnPrevewFormCreate event. Something like the following...
procedure TForm1.ppReport1PreviewFormCreate(Sender: TObject);
begin
ppReport1.PreviewForm.Width := 800;
ppReport1.PreviewForm.Height := 600;
end;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com