Quick Report question

I have this in my database:

Name         Medecin        Doctor
Jim Wilm     Advil          Mike B
Jim Wilm     Bayer          Mike C
Jim Wilm     Tylenol        Caroline
Mike Holtz   Tylenol        Steve
Mike Holtz   Advil          Jamie

I want the quick report to show one page per patient. Example, for this example, page 1 must show this:
                           Patient name: Jim Wilm

                    Medecin               Doctor
                    Advil                 Mike B
                    Bayer                 Mike C
                    Tylenol               Caroline

page 2:
                           Patient name: Mike Holtz

                    Medecin               Doctor
                    Tylenol               Steve
                    Advil                 Jamie

Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

mocartsConnect With a Mentor Commented:
add to your report Group band (TQRGroup) set Expression property to Patient name, and ForceNewPage := True;
Place to Group band DBText and set DataSet and DataField properties.
that's all I think.
wbr, mo.
I will assume that you have only one Query holding all the data you want to report...

You should have some thing like this ...

TQuery(Query1); holding your data

TQuickRep(QuickRep1); the report...
    Expression = Query1.Name
    ForceNewPage = True
    BandType = rbDetail

The QRGroup1.Expression will make your report reprint that band when the name change and the property ForceNewPage will... Force a new page ... for the rest your detail stay the same ...

Don't forget to sort your query on the group fields, if not you will strange result...

You can have as many group as you want ... and look at the FooterBand property point it to a rbFooterBand type TQRBand and you'll have a nice footer printer just before you cange group, great for summarizing ...

Hope this will help

All Courses

From novice to tech pro — start learning today.