cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Server 2011/3 - Viewing report with optional parameter prompts repeatedly - .Net viewer

AndrewBaines
Participant
0 Kudos

My customer's application is using Crystal Server 2011, though I've tested this in 2013 and get the same problem. It's all .Net 4.0, latest SPs in both CS2011 & 2013. With both 64 & 32 bit SDKs installed on top of the initial installation.

This has now been tested on 3 servers, with the same result.

Their original viewer was quite complex for various reasons, but I've boiled it down to a very simplistic viewer.

This has been tested using both RAS and the Report Processing Server (Page Server) to process the report.


Simple application, loads a report from the Crystal Server (InfoObject), shows the report in CrystalReportViewer. Any parameters are prompted for using Crystal's own dialogue. Report stored in the session to be retrieved when there's a postback.

It really is that simple!

All works well for normal, compulsory parameters.

It works if the parameter is optional, and the parameter is given a value.

Problem occurs when the optional parameter isn't given a value. The report runs and you see the first page appear. It then looks as thought there's an additional postback and the parameter is prompted for again. You're then stuck in an infinite loop.

If you quickly click 'next page' before being prompted a second time, you see the 2nd page, but are then prompted again.

Is there a problem with the .Net SDK, or is there something else we should be doing?

Thanks for any help

Andrew

Accepted Solutions (0)

Answers (1)

Answers (1)

DellSC
Active Contributor
0 Kudos

1.  Have the optional parameters been given default values in the report?  If not, that might alleviate the issue.

2.  Is there a reason why you're using a viewer instead of using an OpenDocument call?  If you're not setting the parameters in code, then OpenDocument should give you the same functionality as the viewer.  OpenDocument is just a URL to your CRS system.  You can find OpenDocument documentation at http://help.sap.com/bobip - go to "Development Information" and it's the second document down.

-Dell

AndrewBaines
Participant
0 Kudos

Thanks for the rapid reply

1. Giving a default value just prepopulates the parameter prompt. It still prompts repeatedly if the default value is removed.

2. Can't use OpenDocument. In the original code, the report is manipulated using RAS to do some security stuff. I've removed that from my test code to confirm that's not what is causing the problem.

Does the .Net viewer work with optional parameters?

DellSC
Active Contributor
0 Kudos

Which version of the SDK are you using? What service pack of CRS 2011 are you using?  You need to have the BI 4.0 (NOT 4.1!)  with the same service pack as your CRS system.

-Dell

AndrewBaines
Participant
0 Kudos

On CS2011, I'm using 4.0 SP9

On CS2013, I'm using 4.1 SP4

Systems are running the same SPs.

DellSC
Active Contributor
0 Kudos

Try putting just a blank space in the default value - that way it looks like there is a value there but it's really blank.  Your reports would then have to account for the blank values in their processing.

Beyond that, I'd like to have and/or take a look at this question and determine whether there's an issue in the SDK itself.

-Dell

AndrewBaines
Participant
0 Kudos

Blank spaces aren't an option - these are optional parameters. Could be a date or number. We shouldn't have to do workarounds if the SDK is working correctly.

0 Kudos

Hi Andrew,

In the SDK there is no such thing as option parameters. They require a default value of some type. When Designing the report it is using/passing a value null or blank string etc.

Are they CR Parameters or Stored Procedure Parameters?

Do your Params support NULL's? If so try setting the default value to a Null.

Does the query run if you don't populate all values? Use any third party DB test tool and monitor the SQL being sent for both valid an no values and see what it is getting. Or if it fails you know why..

Don

AndrewBaines
Participant
0 Kudos

Optional, not option. It's the standard thing in parameter prompting in Crystal reports where you set the parameter prompt to be optional. In the report, you test with 'hasValue'.

I'm not passing the parameter to the query in test. I can see all the optional stuff in the report application server classes.

It works if viewing through opendocument, though I can't use opendocument as we're doing other stuff too.

I see the first page of the report correctly, it then pops up the prompt again. It all works, it's just the parameter being repeatedly prompted for. Looks like it may be a problem with the .Net SDK.

0 Kudos

Hi Andrew,

I assume this is a WEB app correct?

How about changing this property:

Or for Windows Viewer use this property:

Set it to True/False, if your code is setting the values at runtime.

Also, clarity on this statement:

"It's all .Net 4.0, latest SPs in both CS2011 & 2013. With both 64 & 32 bit SDKs installed on top of the initial installation."

Is your app pool running in 32 or 64 bit mode? Why did you install both if only running in one mode?

Are you setting the parameter values in the postback routine?

Try using Fiddler and see what values if any are being passed when you page, this sounds to me like the values are being reset on each page.

Don

AndrewBaines
Participant
0 Kudos

Running in 64 bit  mode, but needed the 32 bit as some of the assemblies seemed to be missing.

Not setting parameter values at all. Just allowing the viewer to prompt.

Not changing the page to get the new prompt, it just prompts as soon as the page loads.

AndrewBaines
Participant
0 Kudos

Would it help if I posted my test code and a sample report?

I'm just trying to confirm that the .Net Crystal Report Viewer Web control supports optional parameters.

AndrewBaines
Participant
0 Kudos

Don

Thanks for escalating to R&D. Just glad it isn't some daft mistake in my test code

0 Kudos

You are welcome,

Only issue in .NET Viewers, Java viewers do not have this problem.