PC Review


Reply
Thread Tools Rate Thread

Charts on a Report

 
 
Summing multiple fields on a form
Guest
Posts: n/a
 
      3rd May 2010
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
 
Reply With Quote
 
 
 
 
Duane Hookom
Guest
Posts: n/a
 
      4th May 2010
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"
<(E-Mail Removed)> wrote in message
news:83BF9A2A-7040-4C6F-90AA-(E-Mail Removed)...
> 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


 
Reply With Quote
 
Summing multiple fields on a form
Guest
Posts: n/a
 
      4th May 2010
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"
> <(E-Mail Removed)> wrote in message
> news:83BF9A2A-7040-4C6F-90AA-(E-Mail Removed)...
> > 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

>

 
Reply With Quote
 
Duane Hookom
Guest
Posts: n/a
 
      4th May 2010
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"
> > <(E-Mail Removed)> wrote in message
> > news:83BF9A2A-7040-4C6F-90AA-(E-Mail Removed)...
> > > 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

> >

 
Reply With Quote
 
Summing multiple fields on a form
Guest
Posts: n/a
 
      6th May 2010
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"
> > > <(E-Mail Removed)> wrote in message
> > > news:83BF9A2A-7040-4C6F-90AA-(E-Mail Removed)...
> > > > 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
> > >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Charts in a Report =?Utf-8?B?RkM=?= Microsoft Access Reports 1 17th Nov 2006 08:16 PM
Charts on a report =?Utf-8?B?TWFyYw==?= Microsoft Access Reports 2 5th Sep 2006 07:19 PM
Charts in a report Dan Johnson Microsoft Access Reports 5 21st Apr 2005 09:48 PM
Charts in the Report =?Utf-8?B?TmVhbA==?= Microsoft Access Reports 0 13th Jan 2005 05:19 PM
Charts in a Report Frank Microsoft Access Reports 1 14th May 2004 05:06 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:05 AM.