Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EIS Javscript to change Results Limit

Status
Not open for further replies.

iamthenewnumbertwo

Technical User
Jan 22, 2003
2
GB
I have tried many different ways to do this but with my lack of knowledge of Javascript I have only confussed myself.

I have an EIS with a Chart and Dropdown box, I need to use the DD box to pick up the unique year values available and limit a results set to a specific year thus updating the chart.

Has anybody got some script I can use as a template?

Please help or the PC gets it !
 
Try this on for size - -

----------------------------
A generic button script for Brio.

//MainPage def
var MainPage = "Siebel KB Report"

//Results page to show afterwards
Res = "R_KB"

//Queries to be run, limited ones first, in order of run if it matters
var NumQry = 1
var Qry = new Array(NumQry)
Qry[1] = "KB_Qry"

// last one to take user spec'ed limits
var LastLimitQry = 1

//Number of limits on the query to change, these should be the first limits
//if different queries in the set take different limits then I’ll have to modify this,
//it doesn’t handle that currently…
var NumLimits = 2

//Shapes we're going to get these limits from, organized by limit number
//i.e. the first limit on the query is start date, second end date and they get filled
//as specified by the shape below.
var Shp = new Array(NumLimits)
Shp[1] = "StartDate"
Shp[2] = "EndDate"


//You shouldn't have to change anything below here
//---------------------------------------------------------------------------

var SIndex = new Array(NumLimits)
var TmpVar = new Array(NumLimits)

for (j=1;j<=LastLimitQry;j++)
{
for (i=1;i<=NumLimits;i++)
{
ActiveDocument.Sections[Qry[j]].Limits.CustomValues.RemoveAll()
ActiveDocument.Sections[Qry[j]].Limits.SelectedValues.RemoveAll()
SIndex = ActiveDocument.Sections[MainPage].Shapes[Shp].SelectedIndex
TmpVar = ActiveDocument.Sections[MainPage].Shapes[Shp].Item(SIndex)
ActiveDocument.Sections[Qry[j]].Limits.CustomValues.Add(TmpVar)
ActiveDocument.Sections[Qry[j]].Limits.SelectedValues.Add(TmpVar)
}
}

for (i=1;i<=NumQry;i++)
{
ActiveDocument.Sections[Qry].Process()
}

ActiveDocument.Sections[Res].Activate()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top