<< Click to Display Table of Contents >> Navigation: »No topics above this level« TOC : Script API > JavaScript > JavaScript API > ChartObject > ChartLabel > Method >SetLinkOption |
Set the value of the OZ viewer parameter for the report to be linked.
Prototype :
void SetLinkOption
(
string ViewerParameterName,
string ViewerParameterValue
)
Arguments :
ViewerParameterName |
Viewer Parameter Name |
ViewerParameterValue |
Viewer Parameter Value |
Reference :
Use SetLinkParam() to set the form parameter value.
Example :
//link sample.ozr and set ODI parameter values for report
var ChartRootUnit = This.GetChartRootUnit();
var ChartShapeCnt = ChartRootUnit.GetShapeCount();
for(i = 0; i < ChartShapeCnt; i++) {
var ChartShape = ChartRootUnit.GetShape(i);
var ChartPieceCnt = ChartShape.GetPieceCount();
for(j = 0; j < ChartPieceCnt; j++) {
var ChartPiece = ChartShape.GetPiece(j);
var ChartPieceLabel = ChartPiece.GetLabel();
if(ChartPieceLabel != null) {
ChartPieceLabel.SetLinkServer("127.0.0.1", 8003, "sample.ozr");
ChartPieceLabel.SetLinkOption("odi.odinames", "sample");
ChartPieceLabel.SetLinkOption("odi.sample.pcount", "2");
ChartPieceLabel.SetLinkOption("odi.sample.args1", "FromDate=2008-01-01");
ChartPieceLabel.SetLinkOption("odi.sample.args2", "ToDate=2008-01-31");
}
}
}
Available Events :
OnBind, OnInitialize, OnPostChartBuild, OnStartBind
See also :