Board index » delphi » how to use a Group band with subdetail bands

how to use a Group band with subdetail bands

QR 2.0j, D3, W95

I need to print data from 2 unrelated tables - just print all the
records on one, then all the records in the other.  From help I got in a
recent post, I can do this only by putting the data in subdetail banks,
not detail bands. So far so good.

But I want to have a group band for the info of one of the tables, with
a qrExpr - just like the example that comes with Delphi.  So records
with date, time, message, would look like this:

5/1/96
    8:00 am    message
    9:00 am    message
5/2/98
    8:45 am    message  

etc

But when I try to put a group band on, it goes above both subdetails - I
can't make it stay just above the 2nd subdetail - I can't just use a
band & change the type to subdetail ( I tried) - according to the
example, I must put the expression in both the Expr and the Group band.

Also, an unrelated question - in the above example, my times are coming
out full i.e. 8:00:00 am - how can I just get it to print 8:00 ?

Thanks,

Glenn

 

Re:how to use a Group band with subdetail bands


OK I figured it out #1 - I had to set the Group's Master property to the
SubDetail band.

Can someone help me with #2?  :

Quote
> Also, an unrelated question - in the above example, my times are coming
> out full i.e. 8:00:00 AM - how can I just get it to print 8:00 AM ?

I tried putting this in the QRDBText's OnPrint:

Value := FormatDateTime('hh:mm AM/PM',  
QRDBText6.DataSet.FieldByName('theTime').AsDateTime);

but then NOTHING prints from the table - not even the other field which
doesn't use the OnPrint event.  :(

 Thanks,
 Glenn

Other Threads