Simple Non-database Report from TForm
I would like to use RB to print a single page report that shows values from
some TEdit controls. What is the best way to approach this? There is no data
to navigate, just some values from the TForm that I want to arrange nicely
on the paper page. What report component should I use for these values
(TppLabel?), and what event are they populated in?
All too simple for me!
Dave
some TEdit controls. What is the best way to approach this? There is no data
to navigate, just some values from the TForm that I want to arrange nicely
on the paper page. What report component should I use for these values
(TppLabel?), and what event are they populated in?
All too simple for me!
Dave
This discussion has been closed.
Comments
If these values are in a list type structure, I would suggest using a
JITPipeline to connect the values to your report. The JITPipeline allows
you to traverse any kind of data in virtually any type of data container.
Take a look at demo 136 (dm0036.pas) located in the \RBuilder\Demos\1.
Reports\... directory for an example of connecting a JITPipeline to a
TStringList object filled with data and displaying that data on a report.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
As I said before, no list type structure just a few TEdit controls and
nothing to traverse. So I think this means that a JITPipeline is over
complex. What I am doing is *really* simple.
I think that using a few TppLabels and setting the caption to the TEdit
value before printing will do the job. But where before printing? In the
label GetText or OnPrint, or the band BeforePrint or BeforeGenerate, or
maybe in the function that calls report.print??
Come on guys, think simple. What is most efficient?
Dave
Sorry about that. I would suggest using the Band.BeforePrint event to sett
the caption of a TppLabel at runtime.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com