H
Hans Riis
I have a chart with a date hierarchy on the x-axis. I wrote some
JavaScript code that can select certain dates, i.e. only check the
selected date values in the date measure.
Now I need more functionality that only VBScript seems to provide so
I'm trying to convert my JavaScript to VBScript. There's just one
problem: the "concat" function in JavaScript doesn't exist in VBScript
and I can't concatenate two datearrays with & or +. My code is shown
below:
Set objPFS = ChartSpace1.InternalPivotTable.ActiveView.FieldSets("Date")
Set objPC = ChartSpace1.InternalPivotTable.Constants
objPFS.AllIncludeExclude = objPC.plAllInclude
objPFS.AllIncludeExclude = objPC.plAllExclude
Set objPF = objPFS.Fields("Day")
For i = 0 To 13
date = date() - i
year = cstr(year(dato))
month= monthname(month(dato), False)
day = day(dato)
datearray(i) = Array(objPFS.Member.ChildMembers(year).ChildMembers(month).ChildMembers(day-1))
Next
objPF.IncludedMembers = datearray ' DOESN'T WORK
objPF.IncludedMembers = datearray(0) ' WORKS but only shows one
date
How can I get my datearray with 14 entries into one single array?
Thanks in advance, Hans Riis
JavaScript code that can select certain dates, i.e. only check the
selected date values in the date measure.
Now I need more functionality that only VBScript seems to provide so
I'm trying to convert my JavaScript to VBScript. There's just one
problem: the "concat" function in JavaScript doesn't exist in VBScript
and I can't concatenate two datearrays with & or +. My code is shown
below:
Set objPFS = ChartSpace1.InternalPivotTable.ActiveView.FieldSets("Date")
Set objPC = ChartSpace1.InternalPivotTable.Constants
objPFS.AllIncludeExclude = objPC.plAllInclude
objPFS.AllIncludeExclude = objPC.plAllExclude
Set objPF = objPFS.Fields("Day")
For i = 0 To 13
date = date() - i
year = cstr(year(dato))
month= monthname(month(dato), False)
day = day(dato)
datearray(i) = Array(objPFS.Member.ChildMembers(year).ChildMembers(month).ChildMembers(day-1))
Next
objPF.IncludedMembers = datearray ' DOESN'T WORK
objPF.IncludedMembers = datearray(0) ' WORKS but only shows one
date
How can I get my datearray with 14 entries into one single array?
Thanks in advance, Hans Riis