Skip to Content
avatar image
Former Member

OpenDoc: Passing 'no_value' to Crystal Reports

Hello,

We are attempting to construct an OpenDocument link to Crystal Reports Enterprise that will allow us to pass 'no_value' as the selected member for any or all of three parameters. The thought is that passing 'no_value' as the selection will allow us to display "all" values in the report since no specific member is being selected/filtered.

Here is the syntax we are using currently:

http://<servername>:<port>/BOE/OpenDocument/opendoc/openDocument.jsp?sIDType=CUID&iDocID=ATSKZprtHCRCoG360A9cD_8&sRefresh=Y&lsMpmParameter=[no_value]&lsMpmParameter=[no_value]&lsMpmParameter=[no_value]

And this is what is being passed as a result, but with no accompanying data:

Please note that we have tried this syntax with AND without square brackets around no_value. We have also tried using lsSps in place of lsMpm.

Does anyone in the community have any experience successfully passing 'no_value' via OpenDoc to Crystal Reports?

Any sort of help/advice is greatly appreciated!

Thanks,

Conner King

yeipp.png (5.8 kB)
hyfw3.png (2.5 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Nov 29, 2016 at 11:23 PM

    I think:

    1. Parameters should be set to "Prompt Value Optional"

    2. Records selection formula should have "If HasValue(Parameter)..." logic

    then the opendoc should accept an empty value. But I did not test it myself in Crystal Reports for Enterprise

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Vitaly,

      Thank you for your advice. We have the parameters set to "Prompt Value Optional", but I don't believe we have tried your second suggestion yet. I'll certainly give it a try and let you know what the result is.

      Thank you again,

      Conner

  • Nov 30, 2016 at 03:45 PM

    Report should bring all records in CR designer if no parameters entered. Then only you start looking at OpenDoc.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Vitaly,

      I inserted some logic as you suggested and now have the CR returning all values on the refresh when no parameters are selected.

      This is the logic I used to do so:

      (If not (hasvalue(({Parameter1}))) thenTrue

      else if

      hasvalue({Parameter1}) then

      {UNX/Query\Parameter1} IN {Parameter1}

      AND

      (If not (hasvalue(({Parameter2}))) thenTrue

      else if

      hasvalue({Parameter2}) then

      {UNX/Query \Parameter2} IN {Parameter2}

      AND

      (If not (hasvalue(({Parameter3}))) thenTrue

      else if

      hasvalue({Parameter3}) then

      {UNX/Query \Parameter3} IN {Parameter3})))

      ------------------------------------------------------------------------------------------------------------------------------------------

      However, I am unsure how to format the opendoc from this point to pass a null or no_value to CR.

      Thanks,

      Conner

  • Nov 30, 2016 at 09:05 PM

    If you are not entering parameters then the following should work:

    http://<servername>:<port>/BOE/OpenDocument/opendoc/openDocument.jsp?sIDType=CUID&iDocID=ATSKZprtHCRCoG360A9cD_8&sRefresh=Y

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 01, 2016 at 02:36 PM

    So if the Design Studio url "build logic" leaves the parameters off the URL if no value is selected, then in effect Conner should get no values passed to the optional prompt?

    Add comment
    10|10000 characters needed characters exceeded