Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

show chart on a report

Status
Not open for further replies.

GazzaG

Technical User
Mar 15, 2003
19
GB
Hi, I would like to know how to show a chart on a report by clicking a button on my reports form, at the moment my button opens the query table i then go to view chart which i have already made from the query, but i would like this in one operation from the button.

thank you.
 
I would accomplish this by placing an option box on the form next to the control that opens the report. When that control is checked, the chart would display on the report. And when that control is not checked, the chart would not display.

To make this happen, you would have to imbed the chart into a section of the report by itself (the report footer would work). You would then have to add code behind the report (using "On Format") that, when opened, checks to see if the control on the form is selected. If it is selected, the section of the report containing the chart could be made visible. If not selected, that section could be made not visible.
 
Thanks UPS, I will look into this, I'm not sure what the code is though or how to embed the chart onto the report.
 
Gazzag: In Form design mode, place code similar to the following in the Report's On-Format procedure. When I say embed the chart, I simply mean insert the chart into a section of the report (like the report footer).

Select Case me.FormControl
Case True
me.FormSection.Visible = True
Case False
me.FormSection.Visible = False
End Select

- Where "FormControl" is the name of the control on the form (like a check-box) the user checks when the chart is required.
- Where "FormSection" is the section of the report that contains the chart. This section will become visible when the "FormControl" is checked (True).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top