Avatar of nemesis7
nemesis7 asked on

Create multiple MS Graph Chart objects in Access Report by looping

In an Access 2007 application I am enhancing, I need to add a 2nd page to an already existing report (rptMain). This 2nd page will be having 12 different MS Graph.Chart.8 objects (Unbound). Can I simply create a separate report with the 12 objects & then add it as a SubReport to rptMain? If so, in which section....Report Footer? Basically, the current report prints fine on 1st page, I want to add the charts as a 2nd page on the same report.

Microsoft AccessProgramming

Avatar of undefined
Last Comment
Kelvin Sparks

8/22/2022 - Mon
Kelvin Sparks

I'd just add a page break at the end of your current report & then add your charts as subreports (or you could consider placing them as chart objects directly onto the report.
Hamed Nasr

Yes, "report footer", with new page before section.
ASKER
nemesis7

Each chart represents 13 month historical data for different parameter. The # of parameters may change in the future (i.e., client may want to track more parameters). Therefore, instead of creating 12 MS Graph objects on the report, i.e., hard coding them, can I just create 1 object, and instantiate the desired # (i.e. create more if needed) from taht 1 object, based on the # of parameters being tracked? I can get the # of parameter & their values from a recordset. What would be the code for that?
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Kelvin Sparks

Create a subreport bound to the parameter, then create a graph as a child subreports of it. You will then get as many graphs as there are parameters.
ASKER
nemesis7

How do I create a subreport bound to a parameter, although I consider myself pretty OK with Access & VBA development, not worked much with SubReports etc. Can you please elaborate or point to a site?
ASKER CERTIFIED SOLUTION
Kelvin Sparks

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Kelvin Sparks

You can actually do this part with forms - which can be a bit easier to work with, then use the top level form as the report's subreport.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.