Board index » delphi » Print current record

Print current record

On Mon, 20 Oct 1997 09:10:17 -0500, Ed Davis <elda...@earthlink.net>
wrote:

Quote
>When I use a detail band with Quick Report 2.0G all of the records in
>the dataset print.  How can I print only the current selected record?
>Thanks Ed.

You do it by not binding the band to a table. Set up the QRDBTexts
attached to table fields and make sure the table cursor is on that
record. (In other words, you bind the labels, but not the band.)The
last 2 potential gotchas are to make sure you've set the PrintOnEmpty
property to true and in the OnNeedData event, return false in NeedData
to make sure a second band is not printed.

Steve F (Team B)

 

Re:Print current record


This will work, but it complicates your report in that it will not work
already for other applications (e.g. printing all the records)

Another approach might be to create a query on the Master Table With Master
Source set to the Master Table. In this way the query returns only one
record and the master detail relationships are preserved.

Hope this helps.

N.

Steve Fischkoff (TeamB) <fischk...@compuserve.com> wrote in article
<344c06c2.7880...@forums.borland.com>...

Quote
> On Mon, 20 Oct 1997 09:10:17 -0500, Ed Davis <elda...@earthlink.net>
> wrote:

> >When I use a detail band with Quick Report 2.0G all of the records in
> >the dataset print.  How can I print only the current selected record?
> >Thanks Ed.

> You do it by not binding the band to a table. Set up the QRDBTexts
> attached to table fields and make sure the table cursor is on that
> record. (In other words, you bind the labels, but not the band.)The
> last 2 potential gotchas are to make sure you've set the PrintOnEmpty
> property to true and in the OnNeedData event, return false in NeedData
> to make sure a second band is not printed.

> Steve F (Team B)

Re:Print current record


Easiest is to leave the QUickRep.DataSet property blank and set
PrintIfEmpty to True.

Regards
Allan

Quote
Ed Davis wrote:
> When I use a detail band with Quick Report 2.0G all of the records in
> the dataset print.  How can I print only the current selected record?
> Thanks Ed.

Other Threads