on 05-20-2011 4:31 PM
Good morning, in the report that I created I have a string parameter and I need this parameter is not required because users do not always elect a data (customer group), made so by not selecting anything in the field should show all groups in the report.
Is this possible?
Thanks
Angel Uribe
Hi Angel,
Once a parameter is used in a Selection Formula a value is required. The best way to get around this is to have value your users can select to include all customer groups.
In your parameter, add a value like "All".
Now in your Selection Formula you can do something like:
If {?myParameter} NotEqual "All" Then
{table.CustomerGroup} = {?myParameter}
Else {table.CustomerGroup} NotEqual {?myParameter};
Replace NotEqual with the LessThan GreaterThan symbols.
So what happens here is the formula will check the value of the parameter and if it isn't "All" then it will grab the Customer Group they select. If it is "All" it will look for all Customer Groups.
Good luck,
Brian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, thanks for the help. I use the parameter called from a stored procedure and then use the sentence also sent me this way
if {?} @ Group <> 'All'then
(OCRG.CodeName) = {?} @ Group
Else (OCRG.CodeName) <> {?} @ group;
But when I save I get a message that says:
Error in the formula needed) to close the parenthesis
Not that bad, I can continue to help?
Thanks
Angel Uribe
Hi Angel,
The syntax in your formula is incorrect. If you are typing this formula yourself, get the fields from the Field Explorer instead of typing them in. You are using the wrong parenthesis for fields and the name of your parameter definitely is not correct.
Your logic looks correct though.
Brian
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.