Menu

#44 Remove 'None' from parameter list

open
nobody
None
5
2006-11-28
2006-11-28
Vladiat0r
No

1. The first thing is when I have a parameter that is non-required, multi-select list, it's better to simply not select any item in the list box, instead of auto-inserting 'None' and selecting it.

2. I've modified my version to send '' instead of an empty string when 'None' is selected. Although in hindsight, I think it might be better to send null, so I can use the default value of the parameter in the report and set it to ''. The reason for this is because I use the parameter in the sql IN statement, like: VALUE IN ($P!{PARAMETER}) which breaks when PARAMETER is an empty string.

3. It would be nice to have an option for multi-select list parameters, to indicate if the default should be none selected or all selected. Right now I'm using a bit of a JS hack putting this in the parameter description: <script language=Javascript>setTimeout('var v=document.reportDetail.PRODUCT_CODES;if(v.selectedIndex == -1) {for(var i = (v.length-1); i >= 0; i--){v.options[i].selected = true;}}',500)</script>

Discussion


Log in to post a comment.