cancel
Showing results for 
Search instead for 
Did you mean: 

.Net Crystal Reports - Parameters Current Values being wiped?

0 Kudos

I am using VS2010 and Crystal Reports Version 11R2 SP8

I have noticed a weird feature in crystal reports and was wondering if anyone has noticed. (has a work around for)

When you refresh a report it brings up the parameter prompt at first with the default values but after that it will use the last used parameters so if you just wanted to do a quick refresh of data you can.

This works as expected on reports that are not saved.

HOWEVER

on reports that have saved data the first time you refresh the values that are shown are not the currently used parameters they are in fact the defaults or blank if no default is set.

After this first initial time it works as expected until you close and open the report again.

I have also noticed this in a test application with only code to log into the report.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Are you using .NET or the RDC?

Discard Saved Data for the RDC, in the .NET viewer click on the Viewers property page and select the appropriate Parameter Prompt refresh setting.

Don

0 Kudos

Hello Don,

I am using the .Net Component.

Like i said the refresh works as expected apart from for the first the report is refresh with saved data.

also should mention i am using this through Winforms.

0 Kudos

HI Luke,

Go into the Viewer properties and make sure this property is set to false:

Don

0 Kudos

Hey Don,

It is set to false.

0 Kudos

Hi Luke,

Can't explain it with the info I have then... If not all parameter values are filled in and valid that would clear the list... maybe...

See if this post helps: View the full discussion

Don

0 Kudos

Hey Don,

I just had a look however i don't think that thread is relevant.

I am going to attempt to demonstrate the issue i am having with pictures. if it works.

OK so i load a report that has saved data into the viewer and connect to the database in this example the reports parameters is 2 date fields.

The dates used are printed at the top of the report so you can easily see.

So as you can see the date range is 01/01/2015 - 31/01/2015

When i click Refresh for the first time this is the parameter screen i see:

As you can see the previously used parameters are not present.

so i enter new parameters and click OK

as you can see this time the date range  is 06/11/2014 - 09/12/2014

When i click refresh this time the parameters fields are populated with the current values.

I hope this makes it clearer.

0 Kudos

Hi Luke,

Odd... I got the notification you replied but I don't see it in here...

Can you attach your report?

Rename the rpt file to *.txt and then use advanced editor to attach it.

Save the report with data or export to RPT format first.

Don

0 Kudos

Hey Don,

Can you still not see my reply.

I am going to attempt to re-create the issue in another report as it should be easy enough as all our reports have this issue.

0 Kudos

Hey Don,

I have been able to replicate the issue in the report attached.

In my last Post (the one you couldn't see) i took 4 print screens showing the issues.

If you want me to split these up to separate posts to see if its the pictures that are the problem?

0 Kudos

Hi Luke,

The reason is you don't have nor are you setting the default values:

Try adding them from the last selection you made in code, then when you hit refresh it they should be there.

I don't have any sample code right now to set them at runtime but once you do this is what you would see:

Don

0 Kudos

Hey Don,

Its not the default value that isn't appearing, in fact the default value appearing is part of the issue in some regards.

When we are loading a saved report that has parameters already entered, when pressing the refresh button we are either shown nothing or the default value.

Are you saying on open of the report to overwrite the default values? isn't this a bit backwards? as the parameter screen should (as it does in any other circumstance)  pick up the current values.

0 Kudos

were you able to see the post i left yesterday with pictures?

0 Kudos

Hi Luke,

I've been testing this all day trying to find how to get that value....

In debug mode you can get it but the property is not exposed.

Here's one of the collections:

Bottom line is I don't think we can get to the saved value and/or this is by design.

I have to ping DEV and ask them if they know of a supported way to not clear the value.

Don

0 Kudos

Hey Don,

Thanks for your help.

Look forward to hear what the Dev team says

Luke

0 Kudos

Yes I can see it now, must have been a replication delay.

R&D confirmed this has not worked since CR 2008 days so they are investigating.

Ideally we want to use the Viewer Parameter Collection to get the values so we don't have to use the Engine - ClientDocument or RAS - ReportClientDocument to get it.

I'll create a case and get them to officially drill into the issue.

Incident 94205 / 2015 / Saved data not display Param Value on refresh

KBA - 2126392 - A saved data Crystal Report viewed in WEB or Windows
application does not display the save...

Thanks again

Don

0 Kudos

Hello Don,

Thank you for your help.

I just clicked on your link however it doesn't seem to be working?

Luke

0 Kudos

Try searching for the number, link is likely attached to my account so it won't work for you.

0 Kudos

Hey Don,

How do I search for the number sorry just don't know how to?

0 Kudos

Top right corner where it says "search the community"

0 Kudos

Well don't i look silly...

Thanks Don.

However after searching for the following i can't see if.

Incident 94205 / 2015

94205

94205 / 2015

KBA - 2126392

2126392


All it does is links back to this discussion.

Answers (0)