473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

report help

I am creating some financial reports in Access 2000, and I am having
problem that I can't resolve.

The report sorts information first by vendor, then by budget line
number. It generates the information I need accurately, but I am
having problems with the layout.
-The budget line header contains information about the vendor--it looks
great.
-The budget line footer contains the sum, and I am not having any
problems there.
-The budget line detail is where I am having problems. Its size varies
from 1 line to several lines, based on the number of invoices that a
particular vendor has. Is there a way to lock the detail section so
that it always contains 15 lines and so the necessary details fall into
the appropriate fields?

I would appreciate any insights that you might have. I need to resolve
this issue because the reports have to look identical to the original
that is approved by the state.

Thanks for your help,

Steven

Nov 13 '05 #1
1 2635
steven wrote:
I am creating some financial reports in Access 2000, and I am having
problem that I can't resolve.

The report sorts information first by vendor, then by budget line
number. It generates the information I need accurately, but I am
having problems with the layout.
-The budget line header contains information about the vendor--it looks
great.
-The budget line footer contains the sum, and I am not having any
problems there.
-The budget line detail is where I am having problems. Its size varies
from 1 line to several lines, based on the number of invoices that a
particular vendor has. Is there a way to lock the detail section so
that it always contains 15 lines and so the necessary details fall into
the appropriate fields?

I would appreciate any insights that you might have. I need to resolve
this issue because the reports have to look identical to the original
that is approved by the state.

Thanks for your help,

Steven


Here's a response I gave last year.

If you are a programmer utilizing VBA, please look at
MoveLayout/MoveNext/PrintSecion in on-line help.

In my example code below, I was getting the number of lines that will be
printed in a memo field and the number of detail lines. I wanted to
start printing at a certain position on the page, about 1/2 way down,
depending on the memo and detail line count.

You might want to create a running sum variable that is reset on page
breaks or something like that. Increment the variable for each detail
line. Then run a loop (in the GroupHeader0 band). Ex:
Dim intLineCnt As Integer

Here is the example code. It will not do what you want but it should
provide most of the info to get you started. On the report, I
created/dropped a field called MoveCount and it is in the GroupHeader0 band.
Private Sub GroupHeader0_Format(Cancel As Integer, _
FormatCount As Integer)

'intCount is a global variable for the report
If Me.MoveCount < intLineCnt Then
'I want to move to the next line until
'I can start printing. This report prints
'from the middle of the page to the bottom
'so I need to calc when to start printing
'but not overflow to the next page.
Me.MoveLayout = True
Me.PrintSection = False
Me.NextRecord = False

'the printer has moved 1 more row. now inc the
'counter for this loop. No need to DoWhile/Loop
'here since this header code is the loop.
Me.MoveCount = Nz(Me.MoveCount, 0) + 1
Else
'it's found when to start printing. Let it rip
Me.MoveLayout = True
Me.PrintSection = True
Me.NextRecord = True
End If
End Sub

Private Sub PageHeader_Format(Cancel As Integer, FormatCount As Integer)
'reset MoveCount on the new page. PageHeader will be executed
'before the GroupHeader.
Me.MoveCount = 0
Dim rst As Recordset
Dim strSQL As String
Dim lngWidth As Long
Dim lngHeight As Long
Dim lngTotalLines As Long
Dim lngRet As Long

'calls a routine to get the number of detail records
'to print on this page
intRecCnt = GetRecCount()

'calls a routine to determine the number of lines in a memo field
If Me.Notes > "" Then
'get the number of lines it will take to
'print a memo field. This is a Stephan
'Lebans routine found at his web page. Find
'a message from him in this newsgroup for
'a link to his web site.
lngRet = fTextHeight(Me.Notes, , _
lngHeight, lngWidth, lngTotalLines)
End If

'used to calc where to start printing on a page....31 is 1/2 way
'way down the page in my example. lngTotalLines returned in
'the call to fTextHeight
intLineCnt = 31 - lngTotalLines - (intRecCnt + 1)

End Sub
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: MGFoster | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've converted an ACC97 .mdb file to an ACC2K2 .adp. A report that worked in ACC97 doesn't work in ACC2K2. Report setup: ACC97 ...
3
by: CSDunn | last post by:
Hello, I have a situation with MS Access 2000 in which I need to display report data in spreadsheet orientation (much like a datasheet view for a form). If you think of the report in terms of what...
3
by: Melissa | last post by:
What specifically causes the Format event of a report's section to fire? Thanks! Melissa
1
by: VBSponge | last post by:
Hi all. In A2K i have a report with a control bound to to calculate the page count for the report. I need to retrieve this page count from the report, and build it into a TOC containing this an...
12
by: Orchid | last post by:
Hello all, I have different version of reports which used for different months. For example, I am using report version 1 up to September, but we have some design changes on the report for October,...
3
by: DeanL | last post by:
Hi guys, I'm in need of a little help with a report I'm setting up on Access 2000. The report shows data depending on entries on a form that has 7 fields (Min and Max Cost, Fiscal Year, Min and...
6
by: Dave | last post by:
On my form I have combo boxes. These combo boxes, after updating them, populate respective listboxes that are located below the combo boxes on the same form. I am trying to use a "generate...
3
by: jambonjamasb | last post by:
Hi I have two tables: email_tbl Data_table Data table is is used to create a Form Data_form
12
by: Studiotyphoon | last post by:
Hi, I have report which I need to print 3 times, but would like to have the following headings Customer Copy - Print 1 Accounts Copy - Print 2 File Copy -Print 3 I created a macro to...
10
by: sara | last post by:
Hi - I have a report that is 14 columnar sub-reports (Line up: Position- holders in each of our 14 locations - Manager, Assistant Manager, Receiving, Office, etc). I output directly to PDF...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.