I have this variable in my report:
How can I access the items list by JavaScript code?
Code: Select all
this.report.dictionary.variables.getByName("breedList").????
Code: Select all
this.report.dictionary.variables.getByName("breedList").????
Code: Select all
var newVariable = new Stimulsoft.Report.Dictionary.StiVariable();
newVariable.name = "Variable";
newVariable.alias = "Variable";
newVariable.type = Stimulsoft.System.StimulsoftStringList;
newVariable.requestFromUser = true;
var di = new Stimulsoft.Report.Dictionary.StiDialogInfo();
di.allowUserValues = false;
di.keys = ["1", "2", "3", "4"];
di.values = ["1", "2", "3", "4"];
newVariable.dialogInfo = di;
report.dictionary.variables.add(newVariable);
designer.onPreviewReport = function (args) {
args.report.setVariable("Variable", ["1", "4"]);}