Skip to Content
0

OpenDoc: Passing 'no_value' to Crystal Reports

Nov 29, 2016 at 08:31 PM

86

avatar image

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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Vitaly Izmaylov
Nov 29, 2016 at 11:23 PM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

0
Vitaly Izmaylov
Nov 30, 2016 at 03:45 PM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

0
Vitaly Izmaylov
Nov 30, 2016 at 09:05 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Kevin Smolkowicz Dec 01, 2016 at 02:36 PM
0

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?

Share
10 |10000 characters needed characters left characters exceeded