473,320 Members | 1,856 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,320 software developers and data experts.

How to print multiple lines in the report footer?

489 256MB
I have a report that I have two sets of data. I want to print the main data in the detail section of the report, when the main data is printed I want to print the last set of data in the report footer. I have set the reportfooter_Print to loop through the data and collect what I want to print. But with more than one line to print doing it this way I only get the last data line to print. Is there a way to force a line to print so after collecting the data to print I can make it print that line then go on to the next line.
Expand|Select|Wrap|Line Numbers
  1.  
  2.     Dim db As Database
  3.     Dim vrec As DAO.Recordset
  4.     Set db = CurrentDb()
  5.     strsql = "Select * from ReferalsCredits where textfield1 is not null"
  6.     Set vrec = db.OpenRecordset(strsql)
  7.     Do While Not vrec.EOF
  8.         VNonMbr = vrec("textfield1")
  9.         VtotCr = vrec("RefCount")
  10.         vrec.MoveNext
  11.     Loop
  12.  
  13.  
I hope this makes sense, if here is a better way let me know.
Thanks for any help.
Jan 24 '11 #1

✓ answered by TheSmileyCoder

Yes, there is a MUCH better way.

Create a report containing the data you need for the footer (I.e. same fields as you currently have, and set the new report Recordsource to the SQL string you allready have). Then you insert that report into your main report footer.

1 1773
TheSmileyCoder
2,322 Expert Mod 2GB
Yes, there is a MUCH better way.

Create a report containing the data you need for the footer (I.e. same fields as you currently have, and set the new report Recordsource to the SQL string you allready have). Then you insert that report into your main report footer.
Jan 25 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Wow | last post by:
Do I have to replace all new lines with \n and document.write one line? Is there something like perl's print lines print << 'body'; body in javascripts?
2
by: L Mehl | last post by:
Different users of the app will want or not want to see report footer ( appears as a separate page). I can make the section invisible with a DLookup of a Y or N value from a 'parameters' table ...
2
by: Galina | last post by:
Hello I have a report, which lists records. Each record has money paid field. Money paid can be 0 or not 0. I calculate and print summary of money for a group in the group footer, as well as...
6
by: Mike MacSween | last post by:
I have a report based on: PARAMETERS Forms!frmProductions!ProdID Long; SELECT Sum(qryRoleEvent.Fee) AS SumOfFee, First(qryMusician.LastName) AS LastName, First(qryMusician.FirstName) AS...
2
by: SJM | last post by:
I have a report that displays records of real estate properties. It is possible for each property to appear a number of times for various reasons. Each record however is unique. What I would like...
1
by: jean.ulrich | last post by:
Hi I have a table with 4 fields Customer, Product, Price and Ares As I want to create a report using sorting and grouping I put Customer and I included group header and group footer then i...
6
by: leemansiuk | last post by:
hi all, i am quite new to access and have come stuck on quite a simple problem (i think). i have created a report which list items from an orders table etc.. as the report could grow (listing...
13
by: Greg | last post by:
Most suggestions on this topic recommend to use a page footer and make it visible only on the last page. My problem is that the footer is half of the height of a page which means the detail would...
3
by: mutrus | last post by:
My data report print data in a different place than where it is supposed to. I have a sum function placed in the report footer section of the report however when the report is run the sum function is...
12
D Giles
by: D Giles | last post by:
Access 2003: A subreport control (sum total calculated textbox located in the subreport report footer) does not show total of all records when referenced as a total in the main report footer - only...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.