From: Wayne on
I have several charts on a report and at the moment each chart has an
improvised "title" immediately above it that is in actual fact a
textbox that is populated from a hidden bound form. I've done this
because it is a requirement that the chart titles can be changed.

I have grouped the charts and their respective titles using the Format/
Group menu item. There is other text information above the charts on
the report that can vary in length and hence the depth that it
requires on the page.

The problem I am having is that sometimes the depth of the text at the
top of the page is such that it forces the chart at the bottom of the
page on to the next page but the chart's title (textbox) is left
orphaned at the bottom of the first page.

Firstly I don't understand how this can be happening when I have
specifically grouped the individual charts and titles. The "group"
function seems to be ignored. Can anyone offer a reason why this is
happening?

The only other solution that I can think of is if the chart's real
title can be nominated in code when the report opens it would then be
unnecessary to use my improvised "textbox" titles. Can this be done?
From: fredg on
On Mon, 1 Mar 2010 17:08:18 -0800 (PST), Wayne wrote:

> I have several charts on a report and at the moment each chart has an
> improvised "title" immediately above it that is in actual fact a
> textbox that is populated from a hidden bound form. I've done this
> because it is a requirement that the chart titles can be changed.
>
> I have grouped the charts and their respective titles using the Format/
> Group menu item. There is other text information above the charts on
> the report that can vary in length and hence the depth that it
> requires on the page.
>
> The problem I am having is that sometimes the depth of the text at the
> top of the page is such that it forces the chart at the bottom of the
> page on to the next page but the chart's title (textbox) is left
> orphaned at the bottom of the first page.
>
> Firstly I don't understand how this can be happening when I have
> specifically grouped the individual charts and titles. The "group"
> function seems to be ignored. Can anyone offer a reason why this is
> happening?
>
> The only other solution that I can think of is if the chart's real
> title can be nominated in code when the report opens it would then be
> unnecessary to use my improvised "textbox" titles. Can this be done?

This is what I have used.
Place the code in whichever report section the chart is in Format
event, i.e. Detail format event:

Me!OLEUnbound0.ChartTitle.Text = Forms!FormName!ControlName1 & " for
Year " & Forms!FormName!ControlName2
Me!OLEUnbound0.Requery

The above will read the City and the Year wanted from 2 different
controls and use it for the chart title, i.e.
"Arcadia for Year 2009"

Change the OLEUnbound name and the form and control names to whatever
your actual names are.
The Form must be open when the report is run.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
From: Wayne on
On Mar 2, 1:41 pm, fredg <fgutk...(a)example.invalid> wrote:
> On Mon, 1 Mar 2010 17:08:18 -0800 (PST), Wayne wrote:
> > I have several charts on a report and at the moment each chart has an
> > improvised "title" immediately above it that is in actual fact a
> > textbox that is populated from a hidden bound form.  I've done this
> > because it is a requirement that the chart titles can be changed.
>
> > I have grouped the charts and their respective titles using the Format/
> > Group menu item.  There is other text information above the charts on
> > the report that can vary in length and hence the depth that it
> > requires on the page.
>
> > The problem I am having is that sometimes the depth of the text at the
> > top of the page is such that it forces the chart at the bottom of the
> > page on to the next page but the chart's title (textbox) is left
> > orphaned at the bottom of the first page.
>
> > Firstly I don't understand how this can be happening when I have
> > specifically grouped the individual charts and titles.  The "group"
> > function seems to be ignored.  Can anyone offer a reason why this is
> > happening?
>
> > The only other solution that I can think of is if the chart's real
> > title can be nominated in code when the report opens it would then be
> > unnecessary to use my improvised "textbox" titles. Can this be done?
>
> This is what I have used.
> Place the code in whichever report section the chart is in Format
> event, i.e. Detail format event:
>
> Me!OLEUnbound0.ChartTitle.Text = Forms!FormName!ControlName1 & " for
> Year " & Forms!FormName!ControlName2
> Me!OLEUnbound0.Requery
>
> The above will read the City and the Year wanted from 2 different
> controls and use it for the chart title, i.e.
> "Arcadia for Year 2009"
>
> Change the OLEUnbound name and the form and control names to whatever
> your actual names are.
> The Form must be open when the report is run.
> --
> Fred
> Please respond only to this newsgroup.
> I do not reply to personal e-mail

Thanks Fred. Just before you posted I got this to work: Me!
[Chart1].Object.Application.Chart.ChartTitle.Text = "Test Title"

Your code expands on this even more.