Help on subreport

  • Thread starter JACK GUNAWAN via AccessMonster.com
  • Start date
J

JACK GUNAWAN via AccessMonster.com

Sorry for the late reply. Thanks for the assistance. I will try.


Jack

JACK GUNAWAN - 02-13-2006 14:09
I can not figure out how to know the number of times the report has been
printed whenever somebody print the same report.
In addition, how do I get the subreport on a report to display the same
product list (both in the subreport and report) while the list extends to 5
pages. Whenever I get to second page, the subreport still displays the first
page product list. Thanks. Please Help.

Jack

Reply to this message
Al Camp - 02-13-2006 18:08
Jack,
Not sure about "elegance" but this works...
Let's say you have a report called rptTest.
Create a table called PrintCount with 2 fields, ReportName/Text/NopDupes
and PrintCount/Num/Integer
Populate the table with this data...
ReportName PrintCount
rptTest 0

Use the report Open event to run this code...

Private Sub Report_Open(Cancel As Integer)
DoCmd.SetWarnings False
DoCmd.RunSQL "UPDATE tblPrintCount SET tblPrintCount.PrintCount =
NZ([PrintCount])+1 " & _
"WHERE (((tblPrintCount.ReportName)='rptTest'));"
DoCmd.SetWarnings True
End Sub

Be aware, that PrintPreview also constitutes a "print" and increments
the counter. If you have the report "hardwired" to always print directly to
a printer (with no PrintPreview), then this should work pretty well.


Signature


hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


I can not figure out how to know the number of times the report has been
printed whenever somebody print the same report.
[quoted text clipped - 6 lines]
 
A

Al Camp

Let me know how you make out.
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

JACK GUNAWAN via AccessMonster.com said:
Sorry for the late reply. Thanks for the assistance. I will try.


Jack

JACK GUNAWAN - 02-13-2006 14:09
I can not figure out how to know the number of times the report has been
printed whenever somebody print the same report.
In addition, how do I get the subreport on a report to display the same
product list (both in the subreport and report) while the list extends to
5
pages. Whenever I get to second page, the subreport still displays the
first
page product list. Thanks. Please Help.

Jack

Reply to this message
Al Camp - 02-13-2006 18:08
Jack,
Not sure about "elegance" but this works...
Let's say you have a report called rptTest.
Create a table called PrintCount with 2 fields, ReportName/Text/NopDupes
and PrintCount/Num/Integer
Populate the table with this data...
ReportName PrintCount
rptTest 0

Use the report Open event to run this code...

Private Sub Report_Open(Cancel As Integer)
DoCmd.SetWarnings False
DoCmd.RunSQL "UPDATE tblPrintCount SET tblPrintCount.PrintCount =
NZ([PrintCount])+1 " & _
"WHERE (((tblPrintCount.ReportName)='rptTest'));"
DoCmd.SetWarnings True
End Sub

Be aware, that PrintPreview also constitutes a "print" and increments
the counter. If you have the report "hardwired" to always print directly
to
a printer (with no PrintPreview), then this should work pretty well.


Signature


hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


I can not figure out how to know the number of times the report has been
printed whenever somebody print the same report.
[quoted text clipped - 6 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top