In this report (which works fine but would like to add a graph now) i have columns being inserted by jet.
I have a graph that selects the data in the range, but when i run the report the 'selected data' does not include the expanded rows.
I have included on blank column, but the graph still doesn't follow the report.
I have attached the report. On the data tab, take a look at the section of cells outlined in hilighted in green, this contains my totals and column totals. On the Chart tab, my graph selects the 'green' area as my data range, but the graph will not follow the expanded columns. Any ideas?
Excel 2007
Jet 7.1.2
NAV database 5.0 SP1 client with a 5.0 SP1 database.
2 comments
-
Jet Reports Historic Posts Official comment Hi,
I encountered the same problem. Excel splits the columns and everything between is not included. Relative references wont work.
The only thing I could think of is to use Macro's.
With this one after clicking on the chart the chart refreshes.
Sub UpdateChart()
'
' UpdateChart Macro
'
'
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.ChartArea.Select
ActiveChart.SetSourceData Source:=Range("MyRange")
End Sub
I added a sheet with this macro in it. try it out. I've also put the macro in your sheet but I wasnt able to run so you have to try.
Assign this macro to your chart and dont forget to select the green area and give the reference "MyRange".
By the way: ExcelCharts also doesnot accept these named or relative ranges in charts if that was the case I wouldnt need this macro.(something for Microsoft????)
In my example I hide the last row and column and in the properties of the chart I choose for not showing hidden data.
Has anyone else maybe a nonmacro solution?
Greetings,
Hans Dütting
New on the community -
Jet Reports Historic Posts Thanks for this Hans. My graph works now, much appreciated. Still can't seem to figure out why i can't get Jet to auto expand with the columns, but this macro will do, thank you.