Greetings:

In use VB6, Access2000, DataReport, No DataEnvironment


This is a 2 part problem

Part 1
I'm trying to create a report, thats grouped by customer no.
The report comes out bundled as a whole batch.
I need to have the report separated by Customer No, in other words
how do I go about implementing a page break when the customer no
changes. The recorset is grouped as shown in the select for part 2.

There is a forcedPageBreak option is the Datareport but I have no
clue as to how to use it.


Part 2
For the same report I'm trying to sum the currency fields by column.
The column totals only show the value from the first record in the
recordset.

As follows the select in use:


RsSelect = " SELECT Vouchers.CustAcctNo, VoucherNo, " & _
" VoucherUsedOnDate, VoucherUsedAtTime& "" "" &VoucherUsedAtTimeFlag as thetime, " & _
" VoucherPassengerLastName & "", "" & VoucherPassengerFirstName as thename, " & _
" VoucherPickupLocation, VoucherDropOffLocation, " & _
" Format(VoucherFare, ""#,##0.00"") as VoucherFare, " & _
" Format(Sum(VoucherStops), ""#,##0.00"") as VoucherStops, " & _
" Format(Sum(VoucherWaitTime), ""#,##0.00"") as VoucherWaitTIme, " & _
" Format(Sum(VoucherTolls), ""#,##0.00"") as VoucherTolls, " & _
" Format(Sum(VoucherParking), ""#,##0.00"") as VoucherParking, " & _
" Format(Sum(VoucherMeetGreet), ""#,##0.00"") as VoucherMeetGreet, " & _
" Format(Sum(VoucherGratuity), ""#,##0.00"") as VoucherGratuity, " & _
" Format(Sum(VoucherMiscellaneous), ""#,##0.00"") as VoucherMiscellaneous, " & _
" VoucherService, " & _
" Customers.CustCompanyName, Customers.CustDepartment, " & _
" Customers.CustAddress1, Customers.CustAddress2, " & _
" Customers.CustCity, Customers.CustState, Customers.CustZipcode, " & _
" Customers.CustAuthorizedFirstName, Customers.CustAuthorizedLastName " & _
" from Vouchers, Customers " & _
" where VoucherStatus = 'Pending' " & _
" and Vouchers.CustAcctNo = Customers.CustAcctNo " & _
" group By Vouchers.CustAcctNo, VoucherNo, " & _
" VoucherUsedOnDate, VoucherUsedAtTime, VoucherUsedAtTimeFlag, " & _
" VoucherPassengerLastName, VoucherPassengerFirstName, " & _
" VoucherPickupLocation, VoucherDropOffLocation, VoucherFare, VoucherService," & _
" Customers.CustCompanyName, Customers.CustDepartment, Customers.CustAddress1, Customers.CustAddress2, Customers.CustCity, Customers.CustState, Customers.CustZipcode, Customers.CustAuthorizedFirstName, Customers.CustAuthorizedLastName "


I know that I can use the report sum function, which returns the proper
Totals, but what happens is that I need to format the currency in terms
of dollars and cents which is why I use the format statement in this scenario.

If I don't use the format, what happens is that the values are printed
as: 7.7 if the amount is 7.70, which prints ok (7.70 using the format stmt).

Can someone tell me what's wrong with the select?


Thanks for your responses

Donald