A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Counts in report header



 
 
Thread Tools Display Modes
  #1  
Old November 14th, 2005, 05:35 PM
Darhl Thomason
external usenet poster
 
Posts: n/a
Default Counts in report header

I have my report header list how many records of each type (i.e. Scheduled,
Standby, Pending, Completed, NoPOS) there are listed in the report. I have
an unbound text box for the first number that correctly counts the # of
Scheduled stores. =Abs(Sum([StatusName]="Scheduled")). But I cannot get
the rest of the counts to appear correctly. I know I could put additional
unbound text boxes and have it calculate the same way, but the header is
dynamic based on what criteria on my form are selected. The sub that
finishes creating the header is:

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)
strReporttitle = strReporttitle & "Scheduled"
If Forms!frmStoreData.chkStandby = True Then
strReporttitle = strReporttitle & " and Standby"
End If
strReporttitle = strReporttitle & " Stores"
txtReportTitle = strReporttitle
End Sub

I only have it looking for Standby stores at this point because I want to
get it working before I go too far forward with it.

Thanks!

Darhl


  #2  
Old November 14th, 2005, 07:32 PM
Pat Hartman\(MVP\)
external usenet poster
 
Posts: n/a
Default Counts in report header

If you add a grouping by type to the report, you should be able to use that
to create headers rather than having to code extensive If statements. You
can have the group start a new page and you can set it to repeat the header
on subsequent pages.

"Darhl Thomason" wrote in message
...
I have my report header list how many records of each type (i.e. Scheduled,
Standby, Pending, Completed, NoPOS) there are listed in the report. I have
an unbound text box for the first number that correctly counts the # of
Scheduled stores. =Abs(Sum([StatusName]="Scheduled")). But I cannot get
the rest of the counts to appear correctly. I know I could put additional
unbound text boxes and have it calculate the same way, but the header is
dynamic based on what criteria on my form are selected. The sub that
finishes creating the header is:

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)
strReporttitle = strReporttitle & "Scheduled"
If Forms!frmStoreData.chkStandby = True Then
strReporttitle = strReporttitle & " and Standby"
End If
strReporttitle = strReporttitle & " Stores"
txtReportTitle = strReporttitle
End Sub

I only have it looking for Standby stores at this point because I want to
get it working before I go too far forward with it.

Thanks!

Darhl



  #3  
Old November 17th, 2005, 04:26 AM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Counts in report header

Hmm, that's not a bad idea. I'll see if I can work that out.

Thanks,

Darhl


"Pat Hartman(MVP)" wrote in message
...
If you add a grouping by type to the report, you should be able to use
that to create headers rather than having to code extensive If statements.
You can have the group start a new page and you can set it to repeat the
header on subsequent pages.

"Darhl Thomason" wrote in message
...
I have my report header list how many records of each type (i.e.
Scheduled, Standby, Pending, Completed, NoPOS) there are listed in the
report. I have an unbound text box for the first number that correctly
counts the # of Scheduled stores. =Abs(Sum([StatusName]="Scheduled")).
But I cannot get the rest of the counts to appear correctly. I know I
could put additional unbound text boxes and have it calculate the same
way, but the header is dynamic based on what criteria on my form are
selected. The sub that finishes creating the header is:

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As
Integer)
strReporttitle = strReporttitle & "Scheduled"
If Forms!frmStoreData.chkStandby = True Then
strReporttitle = strReporttitle & " and Standby"
End If
strReporttitle = strReporttitle & " Stores"
txtReportTitle = strReporttitle
End Sub

I only have it looking for Standby stores at this point because I want to
get it working before I go too far forward with it.

Thanks!

Darhl





 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reporting subreport total on main report BobV Setting Up & Running Reports 22 November 1st, 2005 03:19 AM
Has anyone seen this behaviour? What might it be? tw General Discussion 4 June 30th, 2005 03:23 PM
Help!! I'm running around in circles! CathyA New Users 19 December 12th, 2004 07:50 PM
Save Report With CreateReport Coding Issue Jeff Conrad Setting Up & Running Reports 8 July 12th, 2004 08:39 AM
Report Header in Mailing Labels... Grim Reaper Setting Up & Running Reports 2 June 9th, 2004 04:25 AM


All times are GMT +1. The time now is 10:12 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.