How to Enable nullable value check box in SSRS report loading by default
Hello All,
I am working with SSRS reports in current project. I am new to this. So please help me to achieve this.
in below screenshot
https://www.dropbox.com/s/5dcr90jymtq4f0v/1.PNG?dl=0
when i click on submit, without giving second text box value(not mandatory parameter)
it will redirecting to below url(screenshot)
https://www.dropbox.com/s/w58fl7esnwyxuco/3.PNG?dl=0
but by default not mandatory value check box should be checked here. It's not happening here.
this is my code block.
prepareURL: function (token) {debugger
jQuery('<input>').attr({
type: 'hidden',
id: 'rs:Auth-token',
class: 'ssrsReport',
name: 'rs:Auth-token',
value: token
}).appendTo('#report_params');
var finalVal = '';
var nullableValues='';
jQuery('#gen_report input.ssrsInput').each(function () {
finalVal = jQuery(this).val();
if (finalVal === "") {
alert('empty value'+jQuery(this));
nullableValues=nullableValues+'&'+jQuery(this).attr('id')+':isNull=True';
}
if (jQuery(this).attr('data-type') == 2) {
var pref_date = preferencesDateToDate(jQuery(this).val(), pref_date_format_num, pref_date_sep_num);
var the_final_date = pref_date.getFullYear() + '-' + (pref_date.getMonth() + 1) + '-' + pref_date.getDate();
finalVal = the_final_date;
}
// BOOLEAN - CHECKBOX //
if (jQuery(this).attr('data-type') == 7) {
debugger
finalVal = jQuery(this).prop("checked");
}
if (jQuery(this).attr('data-type') == 8) {
finalVal = numPref2Float(jQuery(this).val());
}
jQuery('<input>').attr({
type: 'hidden',
id: jQuery(this).attr('id'),
name: jQuery(this).attr('id'),
class: 'ssrsReport',
value: finalVal,
}).appendTo('#report_params');
});
jQuery('#loader').hide();
alert(jQuery('#report_params').html());
console.log(jQuery('#report_params').html());
jQuery('#gen_report').attr('action', jQuery("#report_url").val()+nullableValues).submit();
alert(jQuery("#report_url").val());
console.log(jQuery("#report_url").val());
jQuery("#report_params").find("input.ssrsReport[type='hidden']").remove();
here bydefault empty parameter value check box should be checked by default when report is loading. But it's not happening. please help me here to achieve this.
Thanks
Chandu