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  

Charts on a Report



 
 
Thread Tools Display Modes
  #1  
Old May 3rd, 2010, 10:57 PM posted to microsoft.public.access.reports
Summing multiple fields on a form
external usenet poster
 
Posts: 38
Default Charts on a Report

I want to display a chart on a report. I created a query named qryJanGraph,
which contains 2 fields [SignInDte]& the other is a calculated field name
[TotalStudents]. The expression used in the query for the calc field
[TotalStudents] was sum([Current]+[New]). I placed the 2 fields on the report
in the Detail Section, along with a Rectangle Bar and added an Event
Procedure in OnFormat. It reads
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
rctBar.Width = ([TotalStudents] / 100) * (1440 * 4)
End Sub
Whn I run the report the Bars for all the numbers are the same...HELP
  #2  
Old May 4th, 2010, 03:54 AM posted to microsoft.public.access.reports
Duane Hookom[_4_]
external usenet poster
 
Posts: 316
Default Charts on a Report

What Access version and what view when you "run the report"?
What do you see if you print the value to the debug window?
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
debug.Print "Width: " & ([TotalStudents] / 100) * (1440 * 4)
rctBar.Width = ([TotalStudents] / 100) * (1440 * 4)
End Sub
Is TotalStudents a text box in the detail section?

--
Duane Hookom
MS Access MVP


"Summing multiple fields on a form"
t.com wrote in message
...
I want to display a chart on a report. I created a query named
qryJanGraph,
which contains 2 fields [SignInDte]& the other is a calculated field name
[TotalStudents]. The expression used in the query for the calc field
[TotalStudents] was sum([Current]+[New]). I placed the 2 fields on the
report
in the Detail Section, along with a Rectangle Bar and added an Event
Procedure in OnFormat. It reads
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
rctBar.Width = ([TotalStudents] / 100) * (1440 * 4)
End Sub
Whn I run the report the Bars for all the numbers are the same...HELP


  #3  
Old May 4th, 2010, 05:11 AM posted to microsoft.public.access.reports
Summing multiple fields on a form
external usenet poster
 
Posts: 38
Default Charts on a Report

I am using Windows 7, Access 2007 and Report View.
I used the Report Wizard to add [SignInDte] and [TotalStudents]
I used the rectangle control to add the rectangle bar to the Detail Section
of the Report.
I am sorry but I don't know how to get to the debug window?

"Duane Hookom" wrote:

What Access version and what view when you "run the report"?
What do you see if you print the value to the debug window?
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
debug.Print "Width: " & ([TotalStudents] / 100) * (1440 * 4)
rctBar.Width = ([TotalStudents] / 100) * (1440 * 4)
End Sub
Is TotalStudents a text box in the detail section?

--
Duane Hookom
MS Access MVP


"Summing multiple fields on a form"
t.com wrote in message
...
I want to display a chart on a report. I created a query named
qryJanGraph,
which contains 2 fields [SignInDte]& the other is a calculated field name
[TotalStudents]. The expression used in the query for the calc field
[TotalStudents] was sum([Current]+[New]). I placed the 2 fields on the
report
in the Detail Section, along with a Rectangle Bar and added an Event
Procedure in OnFormat. It reads
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
rctBar.Width = ([TotalStudents] / 100) * (1440 * 4)
End Sub
Whn I run the report the Bars for all the numbers are the same...HELP


  #4  
Old May 4th, 2010, 05:58 PM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Charts on a Report

To view the debug window, press Ctrl+G

--
Duane Hookom
Microsoft Access MVP


"Summing multiple fields on a form" wrote:

I am using Windows 7, Access 2007 and Report View.
I used the Report Wizard to add [SignInDte] and [TotalStudents]
I used the rectangle control to add the rectangle bar to the Detail Section
of the Report.
I am sorry but I don't know how to get to the debug window?

"Duane Hookom" wrote:

What Access version and what view when you "run the report"?
What do you see if you print the value to the debug window?
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
debug.Print "Width: " & ([TotalStudents] / 100) * (1440 * 4)
rctBar.Width = ([TotalStudents] / 100) * (1440 * 4)
End Sub
Is TotalStudents a text box in the detail section?

--
Duane Hookom
MS Access MVP


"Summing multiple fields on a form"
t.com wrote in message
...
I want to display a chart on a report. I created a query named
qryJanGraph,
which contains 2 fields [SignInDte]& the other is a calculated field name
[TotalStudents]. The expression used in the query for the calc field
[TotalStudents] was sum([Current]+[New]). I placed the 2 fields on the
report
in the Detail Section, along with a Rectangle Bar and added an Event
Procedure in OnFormat. It reads
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
rctBar.Width = ([TotalStudents] / 100) * (1440 * 4)
End Sub
Whn I run the report the Bars for all the numbers are the same...HELP


  #5  
Old May 6th, 2010, 04:27 AM posted to microsoft.public.access.reports
Summing multiple fields on a form
external usenet poster
 
Posts: 38
Default Charts on a Report

Thx Duane for your suggestions. I finally got chart to work on the report.
There were 2 problems.

1. I had the name recBar in the code and didnt change it in the property
sheet.

2. I needed to view it in the Print Preview Mode.

"Duane Hookom" wrote:

To view the debug window, press Ctrl+G

--
Duane Hookom
Microsoft Access MVP


"Summing multiple fields on a form" wrote:

I am using Windows 7, Access 2007 and Report View.
I used the Report Wizard to add [SignInDte] and [TotalStudents]
I used the rectangle control to add the rectangle bar to the Detail Section
of the Report.
I am sorry but I don't know how to get to the debug window?

"Duane Hookom" wrote:

What Access version and what view when you "run the report"?
What do you see if you print the value to the debug window?
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
debug.Print "Width: " & ([TotalStudents] / 100) * (1440 * 4)
rctBar.Width = ([TotalStudents] / 100) * (1440 * 4)
End Sub
Is TotalStudents a text box in the detail section?

--
Duane Hookom
MS Access MVP


"Summing multiple fields on a form"
t.com wrote in message
...
I want to display a chart on a report. I created a query named
qryJanGraph,
which contains 2 fields [SignInDte]& the other is a calculated field name
[TotalStudents]. The expression used in the query for the calc field
[TotalStudents] was sum([Current]+[New]). I placed the 2 fields on the
report
in the Detail Section, along with a Rectangle Bar and added an Event
Procedure in OnFormat. It reads
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
rctBar.Width = ([TotalStudents] / 100) * (1440 * 4)
End Sub
Whn I run the report the Bars for all the numbers are the same...HELP

 




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


All times are GMT +1. The time now is 02:14 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.