Kasuni Abegunawardana

Kasuni Abegunawardana

  • NA
  • 211
  • 125.1k

How to display dynamic parameters

Jul 25 2018 3:49 AM
Hello all,
 
I have a dropdown its contains report names with values 
 
Report A =1
 
Report B=12
 
when I select A report its parameter list is Year /Month
 
When I select B report its parameters should be Year/Month and a checkbox with there labels how can i do that from javascript.
 
i am using an array  var _reports = [];
 
function setReports() {
_reports.push({
ReportID: 12,
Paramaters: [
{
Label: "Financial Year",
Type: "years1",
Control: "dropdown",
func: funYear
},
{
Label: "Financial Month",
Type: "months1",
Control: "dropdown"
},
{
Label: "Expand Excel Reports",
Type: "expand",
Control: "checkbox"
},
]
});
}
if(reportID== 1)
{
setReports() 
}
else if(reportID==12)
{
setReports() 
}
 
i need to show and hide dropdown or checkbox according to the  report name
 
Thank you! 

Answers (1)