Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report with vertical total 1

Status
Not open for further replies.

zapzip

Technical User
Jun 19, 2007
46
US
Hello-
I am trying to generate a BaNK dEPOSIT SLIP. I have set up a header with the deposit date, and the totals for currency and coins. The Detail section has 2 list boxes for List of checks and Amounts. I have scaned a form and embedded the gif file in Report object.

The problem is that there are two totals on the form. One is horizontal at the bottom of form and the other verticasl on the side. If I try using a footer for these totals, the vertical total extends into the List of checks and amounts forcing then to a second page.
 
Can you use DSum to get the totals, rather than putting them in the footer?
 
I may seem unorthodox but how about creating two reports, one with all the data and a horizontal total and another with the data invisible so it does not print and have the vertical total on this. but you have to make two print runs, one for each set of reports.


Ian Mayor (UK)
Program Error
Always make your words sweet and nice. Because you never know when you may have to eat them.
 
Thanks for your suggestions. The 2 print run solution is a plausible work around, but of course a more standard solution would be preferrred. I will check with users to see if it would work.

As to tthe Dsum suggestion- yes I am using that function. If I put it in the Detail section, it messes up the check lists and prints them on many pages.

Is there a way to use columns? One for the vertical total and the 2nd for the check list & amounts?

Your thoughts
 
You say DSum messes up the check lists? How could that be?

[tt]List List List
List List List
DSum DSum DSum[/tt]

Yes No?

How do you see the vertical column working, except with DSum?
 
Yes, I must use Dsum.

Current report Detail Section output looks like:

check# Amount
123 $10.00
456 $210.98
789 $800.00
0123 $500.00
2323 $400.00
4343 $850.00
etc

Footer:
$12,210.98 Horizontal total

If a add a vertical total in detail section it is printed but each check in Detail section is on separate page.

 
Ok. Try this. Create a new report based on the relevant table. Add the field that sorts the lodgement and the vertical sum. Add your existing report to it as a subreport.
 
Your suggestion works perfectly. One new glitch- the report prints duplicate pages (all the same) one page for each record in subreport.

Any ideas?
Thanks for your suggestions.
 
How much work have tou put into the subreport? It may be best to simply delete the subreport and build a new one using the wizard.
 

Your suggestion gave me an idea to 1st trying to I delete the Subreport altogether just to see if it was the source of the problem. I still get multiple pages, without the Subreport data of course. So the problem is in the main report. I get the same number of duplicate pages as the number of records returned.

I checked the page & report setup- Landscape, letter
Top margin: 0.25
Report Header: 2.375
Detail: 5.4
Bott Margin: 0.25
Total 8.275
The report width is 9.8861 with a Picture (gif scan of the deposit slip form). Its Embedded, Zoom.

The main report record source is a query (Q_ReportDeposit Slip). The same query is used by the Subreport.

Code:
Q_ReportDepositSlip]
SELECT DISTINCTROW M_FundPaid.FundPaidReceiptSlips_IDs, M_FundPaid.FundPaidAmount, M_FundPaid.FundPaidTypeFunds_IDs, M_FundPaid.FundPaidBanks_IDs, M_FundPaid.FundPaidDocumentNumber, M_FundPaid.FundPaidAccountNumber
FROM M_FundPaid
WHERE (((M_FundPaid.FundPaidRRs_IDs)=[Forms]![F_DepositSlip]![cboRentRollMonth]) AND ((M_FundPaid.FundPaidRRSub_IDs)=[Forms]![F_DepositSlip]![cboDepositNumber]))
WITH OWNERACCESS OPTION;

Your ideas?
 
It is a little difficult to tell from the above. What I visulaized was something similar to an Order / Order Detail set up, rather than the same query for the main form and subform.
 
I'am not sure what you ment by Order/ Order Detail set up. I did try deleting the query as Source of main report and everything works! So, the sub report creates a dynaset that can be used by the main report and does not need another query? Using 2 queries results in duplicated records? As I am learning by mistakes, it would be great if this expalined the problem. Thanks for your tips and pointing me in the needed directions.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top