UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Report - Last Row Printed, Access 2016    
 
   
cfrankling
post Aug 21 2019, 12:23 PM
Post#1



Posts: 24
Joined: 27-May 11



Hello there,

Need some help here, I trying to find code in which will help me determine when the last row is printed on a report page.
This is what Im trying to accomplish: if a group data being printed ends up printed at the bottom of the first page and the rest on the next, I need this info so I can then change group heading to example: "Group Heading - Cont" beside it.

I hope it makes sense.

thanks in advance
This post has been edited by cfrankling: Aug 21 2019, 12:26 PM
Go to the top of the page
 
projecttoday
post Aug 21 2019, 01:32 PM
Post#2


UtterAccess VIP
Posts: 10,966
Joined: 10-February 04
From: South Charleston, WV


Maybe a different approach would be simpler. In the group header you have a label " - Cont", right? You want to turn that off (visible = no) when you start a new group (on format event of the group) and turn it on (visible = yes) the rest of the time. Maybe the detail section could work for that, not sure. You have to find a place to turn it on. The group footer wouldn't work because that would be too late.

--------------------
Robert Crouser
Go to the top of the page
 
cfrankling
post Aug 22 2019, 09:55 AM
Post#3



Posts: 24
Joined: 27-May 11



Attached File  JaneDoeReport.pdf ( 118.53K )Number of downloads: 8


Sure that could work but only if I can figure out where to put the code.

I've attached a sample (pdf) of the report that I'm working on. (report contains sample data)

If you take a look a the first page, second group "HEMATOLOGIA", right after it, first column there's the first sGroup (or subGroup) "1-[BIOMETRIA HEMATICA]" as yo can see the data for this sGroup starts in the bottom of the first page and continues on the next page. Now right in between "Exámenes and "ESINOFILOS" I need to figure out where to put the code that would hide/unhide an unbound field with the "1-[BIOMETRIA HEMATICA] -Cont".

Is there an event? or may be some kind of a counter? Ran out of ideas

The report is finished and works great as it should, but I think it just needs this final touch to make it perfect.

Any ideas would be appreciated.
This post has been edited by cfrankling: Aug 22 2019, 09:56 AM
Go to the top of the page
 
projecttoday
post Aug 22 2019, 10:26 AM
Post#4


UtterAccess VIP
Posts: 10,966
Joined: 10-February 04
From: South Charleston, WV


Well, first you have to get the group header to repeat, right? I think that is the Repeat Section property. Try that first.

--------------------
Robert Crouser
Go to the top of the page
 
projecttoday
post Aug 22 2019, 10:31 AM
Post#5


UtterAccess VIP
Posts: 10,966
Joined: 10-February 04
From: South Charleston, WV


I'm thinking first the "- Cont" is off in design view. It's turned on when you retreat from printing the header. Then it's turn off in the group footer. Make sense?

--------------------
Robert Crouser
Go to the top of the page
 
cfrankling
post Aug 22 2019, 11:25 AM
Post#6



Posts: 24
Joined: 27-May 11



Robert, thanks a lot man, Repeat set to Yes did it, did not realize this little gem existed.

Again, thank you, you just made my day. thumbup.gif
Go to the top of the page
 
projecttoday
post Aug 22 2019, 11:32 AM
Post#7


UtterAccess VIP
Posts: 10,966
Joined: 10-February 04
From: South Charleston, WV


You're welcome.

--------------------
Robert Crouser
Go to the top of the page
 
cfrankling
post Aug 22 2019, 02:03 PM
Post#8



Posts: 24
Joined: 27-May 11



Here's the final result Robert

With Repeat = Yes and a few lines of code:

Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
intNumTitulo = 1
intPrintCount = 1
End Sub

Private Sub GroupHeader1_Format(Cancel As Integer, FormatCount As Integer)
If intPrintCount = 1 Then
Me.tmpTitulo = intNumTitulo & " - [" & Me.TITULO & "]"
Else
Me.tmpTitulo = intNumTitulo & " - [" & Me.TITULO & "] - Cont."
intPrintCount = 1
End If
End Sub

Private Sub GroupHeader1_Print(Cancel As Integer, PrintCount As Integer)
intNumTitulo = intNumTitulo + 1
End Sub

Private Sub GroupHeader1_Retreat()
intPrintCount = intPrintCount + 1
End Sub

Attached is the final result, check it out so you can see what you helped accomplish.

cheers.gif
Attached File(s)
Attached File  JaneDoeReport.pdf ( 118.66K )Number of downloads: 6
 
Go to the top of the page
 
projecttoday
post Aug 22 2019, 05:59 PM
Post#9


UtterAccess VIP
Posts: 10,966
Joined: 10-February 04
From: South Charleston, WV


I'm glad that you are happy with it. thumbup.gif

--------------------
Robert Crouser
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    21st September 2019 - 06:13 AM