cancel
Showing results for 
Search instead for 
Did you mean: 

Report with Parameter Reads Datasource Twice

Former Member
0 Kudos


Running CR 2008 SP07.

Report is based on an ADO.Net Dataset.  There are no sub-reports and the parameter is not one of the fields on the report.

There is one parameer passed into the method within the DLL.

Using fiddler I see that after the parameter is entered that the data is being accessed.

However, when the data is done being accesses I see that the datasource is being read a second time.  After this second read of the data the report then displays.

If I run the same report using a method in the DLL that does not take in a parameter the datasource is only read one time.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Lee,

Did you write the dll?

Does your report have any of the Verify options checked on?

Is the parameter part of the data filtering in the dll?

Does the dll Verify Database?

Does the dll call a Refresh of any kind?

Don

Former Member
0 Kudos

Did you write the dll? Yes... it is a custom DLL.

Does your report have any of the Verify options checked on? Yes... Verify on first refresh and Verify stored procedures on first refresh

Is the parameter part of the data filtering in the dll? No....the parameter is an id that is passed into the method for identification of the report.

Does the dll Verify Database?  Not that I am aware of...(i.e. same DLL only reads datasource once when no parameter passed)

Does the dll call a Refresh of any kind? Not that I am aware of...(i.e. same DLL only reads datasource once when no parameter passed)

0 Kudos

Hi Lee,

Moved your post to the .NET SDK forum.

Try checking off the Verify on first refresh, that should stop it from hitting the DB the second time.

Don

0 Kudos

Hi Lee,

I got an update from Bhushan that your could not access the post since I moved it. There is no permission setting by forum. Only reason you may not have access is you need to log on again, I get this all the time, everyday I need to log on, or refreshing the page will fix it or sometimes when the system is trying to log you on automatically and you click the Logon link you can get this also.

Anyways, just in case I moved it back to the Report Design forum.

Don


Former Member
0 Kudos

Thanks.... I contacted Bhushan since I could not find a direct contact to you as a Moderator and I could not get to the post following the move.

The main concern was I did not understand why it was moved in the 1st place as it was not related to the .Net DLL but was a behavioir of Crystal Reports itself - Thus I posted in the Crystal Reports Channel.

I saw this a.m. that it was moved back to they Crystal Channel and after much trying was finally able to get back in and reply to this post.

After unchecking both the Verify on First Refresh and Verify Stored Procedures on First Request Options (they both must be unchecked) the datasource is only being read once.  Thanks!

Why does this behavior occur when these options are checked and you are using a Parameter when the same behavior does not occur when you are not using a parameter?  Seems odd to me.

0 Kudos

Hi Lee,

I moved it because it may have been an issue in your provider, doesn't really matter where it is...

Still odd that you could not access it though, there is no security on these forums so likely an issue with the host PC that authenticates your log on.

Depending on the Verify option depends on what CR does. The Verify on first refresh will cause CR to do just that, does not matter if you have logged on already. And because you are using a Dataset and Provider those connections can be seen as Stored Procedures, ONLY as defined internally by our various database dll's.

So likely what is happening is your DLL is detecting the connection is to be made and queries the DB and then CR see you have the Verify checked on so it verifies also. It will not be aware what your DLL is doing...

Hope that's clear

Don

Former Member
0 Kudos

Yep.... that makes sense.  Thanks for your help!

I flagged my response as the correct answer and this and your previous post as helpful since the correct answer is that both the Verify on First Connect and Verify Stored Procedures options must be unchecked.

Answers (0)