TppDBRichText and stretching
(D5,MSsql2K,ADO,RBv7)
I have a report with a subreport that contains two TppDBText columns and one
TppDBRichText in the Detail band. I have set TppDBRichText.Stretch := true
but the rich text comes out scrunched together. I was expecting it to
expand/stretch to the required height for the richtext and even wrap over
pages if needed. Is there something else I need to set? (I'm relatively
new to RB)
tia
I have a report with a subreport that contains two TppDBText columns and one
TppDBRichText in the Detail band. I have set TppDBRichText.Stretch := true
but the rich text comes out scrunched together. I was expecting it to
expand/stretch to the required height for the richtext and even wrap over
pages if needed. Is there something else I need to set? (I'm relatively
new to RB)
tia
This discussion has been closed.
Comments
How can I control the style (font, line spacing, italics etc) in the
control?
Could the RTF text be overwriting the font setting?
If so, how can I specifiy that I want the font setting I have made on the
report?
Are you loading a richtext file into the TppRichText control? If so, the
font defined in the file will be ported over. If you are creating the
richtext text inside ReportBuilder, the font you initially set will be used.
If you want to change the font of a rich text file you will need to use the
built-in RichText properties and methods to alter the actual RTF code and
change the font manually. See the ReportBuilder help on TppRichText for
more information.
--
Thanks for supporting ReportBuilder! Please vote for ReportBuilder in the
Delphi Informant Readers Choice awards!
http://www.delphizine.com/ballot2004/
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks so much - working great and is just what I need.
Just a few questions I can't find answers to in manual. If you can point me
to the sections in the manual it would be appreciated.
1) How do you force each master record to page feed after each record?
2) Ditto for the detail records?
3) Where do you define Group Header/Footers and how do they work?
tia
The group component allows you to break your report into several sections,
based on the value of the field specified in the BreakName property. As the
report traverses the records of your data, it tracks the value of the field
or component upon which the group is based. Each time this value changes, a
group break occurs. I created a group and set it to break after each
traversal (meaning the breaking field was the master key) so I could utilize
the TppGroup.NewPage property. Setting this property to True essentially
made it so the report contained one detail band per page. You can create
groups using the Groups dialog by selecting Report | Groups from the main
designer menu. Once you create a group, ReportBuilder will create a group
header and group footer for you. There are other methods of creating page
breaks. See the article below for more options.
---------------------------------------------
Article: Forcing a Page Break
---------------------------------------------
Question:
How can I force a page break occur based upon
a condition calculated at run-time.
Solution:
Define a Group that starts on a new page when
it breaks. Then use the Group.OnGetBreakValue
event to control the timing of the break.
1. From the Report Designer, select Report | Groups
to access the Group dialog.
2. Define a group based upon a static component,
such as a Label or Variable. Click the
Start new page checkbox. Close the dialog.
3. Using the object inspector's drop down list,
find and select the TppGroup object.
4. Create an event-handler for the Group's
OnGetBreakValue event.
5. Add code to set the break value.
procedure Form1.Group1OnGetBreakValue(Sender: TObject; var aBreakValue:
String);
begin
if condition then
aBreakValue := 'Some Value';
end;
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com