Boolean parameter with values as "YES" or "NO" in reports

  • Hi,

    Can we have Boolean parameter with values as "YES" or "NO" in reports instead of the default values "True" or "False" in reports.

    Thanks in advance.

    SriLakshmi.

  • hi

    Nope , if you define a parameter as boolean , you cant have it 'Yes' or 'No'.

    Even i had faced the same problem few days before but till now i didnt got any solution

    Thanks

  • Is this parameter linked to a dataset?

    If not you can create a boolean parameter by changing the data type to Boolean. Under Available values, choose Non-Queried and in the label field type "Yes" and make the value True then on the next line make the label "No" and the value False. When you run the report, the options presented to the user will be "Yes" and "No" but the value of the parameter will be true or false.

    If you are trying to display this value later in the report, then use an IIf statement for the value of the textbox:

    IIf(Parameters!BooleanTest.Value = TRUE, "Yes", "No")

  • Nope , its not working , after doing the way as you said , its displaying True or false ,

    Can you please guide me ?

  • Like this:

    Click to see the image

  • Here's a screen shot:

  • Nope that doesn't work - still shows as True/False...

  • I know that on my computer (development) this works. However when you publish to the report server it only shows true / false.

  • srilakshmi.pappu (3/25/2008)


    Hi,

    Can we have Boolean parameter with values as "YES" or "NO" in reports instead of the default values "True" or "False" in reports.

    Thanks in advance.

    SriLakshmi.

    yes you can

    use the function if it is the case in sql

    or use the replace or iif if it is in case of VB, vb.net or C#, JAva

    kshitij kumar
    kshitij@krayknot.com
    www.krayknot.com

  • Checkai you are entirely correct.

    Can we just clarify for the likes of krayknot etc, that we know how to get the value showing as Yes/No on the actual report - we want it to display Yes/No on the screen at the top where the users enter the parameters.

    For one of those unknown reasons (theres a fair few in RS) it goes back to to True/False no matter what you specify as the labels for boolean parameters.

  • Hi kshitij kumar

    I'm using VB.NET . How can we change the boolean parameter label. Please tell me elaborately .

    Thanks,

    Arun

    -----------------------------------------------------------------------------------------------------------------------------------------------------------
    Please feel free to let me know if you are not clear or I’ve misunderstood anything.

    Thanks,
    Arunkumar S P

  • well it aint going to help me because the IT department won't use another reporting tool and have no plans to write a custom parameter front-end.

    So, any further solutions that don't involve 3rd party products?

    Cheers,

    Dave

  • Hi all,

    I am too facing the same problem. I have a report parameter(boolean) and i have made it multivalued to display Yes, No. It works fine in development ie a drop down with Yes, No is displayed but when the report is deployed, it gets back to True and False Radio Buttons.

    Is there a way to display boolean parameters in Dropdown style??

  • You can change the parameter to an integer and specify 1 for TRUE and 0 for FALSE. If desired, set a default value. Uncheck the boxes for 'Allow null value' and 'Allow blank value'. When writing expressions for the report, you can refer to FALSE or 0, but it seems to have a problem referring to 1 as TRUE.

    The parameter will show as a combo box when the report is uploaded to the server. Although it has a choice of 'Select a Value', if chosen, you will receive a warning telling you to select a value for the parameter when you try to view the report.

  • Just wanted to close this post with the answer in case anyone is searching for it.

    Change the parameter type from Boolean to Integer. Change the value that goes with your true label (e.g. "Yes") to 1 and your false to 0. Behaviour is as it should be rather than displaying true/false in Report Manager and Yes/No (or whatever you wanted) in design mode.

    Edit: Oh look. There was a page two with the answer already given 😉 Oops!

Viewing 15 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic. Login to reply