Easy. Just create a scripted data source, then attach a data set to it. Its fetch script would look like:
if (XRowNum == 3) {
row["KEY"] = '1';
row["VALUE"] = 'Agenti';
XRowNum--;
return true;
}
if (XRowNum == 2) {
row["KEY"] = '2';
row["VALUE"] = 'Týmy';
XRowNum--;
return true;
}
if (XRowNum == 1) {
row["KEY"] = '3';
row["VALUE"] = 'SkillGrupy';
XRowNum--;
return true;
}
return false;
Friday, December 31, 2010
Friday, December 3, 2010
Dynamic queries in BIRT - query text replacement
var selectedParams = params["calltypes"].value;
var selectedString = "";
for (var counter=0; counter < selectedParams.length; counter++) {
selectedString += selectedParams[counter] + ",";
}
selectedString = selectedString.substring(0,selectedString.length-1);
var before = this.queryText.toString();
var injection = "";
injection = selectedString;
this.queryText = before.replace('53279',injection);
var selectedString = "";
for (var counter=0; counter < selectedParams.length; counter++) {
selectedString += selectedParams[counter] + ",";
}
selectedString = selectedString.substring(0,selectedString.length-1);
var before = this.queryText.toString();
var injection = "";
injection = selectedString;
this.queryText = before.replace('53279',injection);
Subscribe to:
Posts (Atom)