Selecting multiple dates from a date hierarchy?
From: Michael Weiss (mhweiss_at_hotmail.com)
Date: 09/13/04
- Next message: Jesse: "Excel OWC saving back to server-side database"
- Previous message: Michael Weiss: "RE: Multiple Charts in chartspace OWC 10"
- In reply to: Hans Riis: "Selecting multiple dates from a date hierarchy?"
- Next in thread: Hans Riis: "Re: Selecting multiple dates from a date hierarchy?"
- Reply: Hans Riis: "Re: Selecting multiple dates from a date hierarchy?"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 13 Sep 2004 12:24:09 -0700
Hans,
Try building a string of comma delimited values in your
loop instead of adding them to an array. Then pass this
string like:
objPF.IncludedMembers = Split(mystringofdates, ",")
Hope this helps (actually I just hope it works!lol)
Michael
>-----Original Message-----
>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
>.
>
- Next message: Jesse: "Excel OWC saving back to server-side database"
- Previous message: Michael Weiss: "RE: Multiple Charts in chartspace OWC 10"
- In reply to: Hans Riis: "Selecting multiple dates from a date hierarchy?"
- Next in thread: Hans Riis: "Re: Selecting multiple dates from a date hierarchy?"
- Reply: Hans Riis: "Re: Selecting multiple dates from a date hierarchy?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|