Crystal Reports run time parameter problem

290 pts.
Tags:
Crystal Reports XI
Hi, I'm using Crystal Reports XI with a connection to MS SQL Server. I've created a SQL query in the 'Add Command' section for the report to run off which seems to work fine.  I've then added a couple of dynamic parameters on the report which again works fine. The problem I encountered was because of the size of the database the report was taking way too long for the results to display. To get around this I have added a couple of run-time date parameters from within the Database Expert's Command window, and included these inside the query (e.g. 'WHERE DateCreated BETWEEN {?prmBeginDate} AND {?prmEndDate}'). Although this has shortened the time it takes for the report to run significantly, I have encountered a new problem; the date parameters are now prompting the user twice for the values. The first time it shows the date parameters only, then once the user has entered the values it shows asks for the date parameters again only this time it shows the other parameters as well. Can anyone tell me if I'm doing anything wrong? or if anyone knows of a way to only get asked for the date parameter once?  I think it is something to do with using both dynamic and static parameters together. Any help would be greatly appreciated!

Software/Hardware used:
Crystal Reports

Answer Wiki

Thanks. We'll let you know when a new response is added.

you do not need to use Between you can use = and in the properties of the reports parameter you can mention that it is a range parameter

Discuss This Question: 6  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Gent01
    Does your report have a sub report? Adding references to parameter in a sub report in a certain way can cause a double prompt.
    1,870 pointsBadges:
    report
  • Darraca
    No there's no subreport. What I've done is: Create a Blank Report > Create New Connection > OLE DB(ADO) Entered my SQL Server credentials through the Microsoft OLE DB Provider for SQL Server then clicked on Add Command and pasted in my query. At this point I have clicked on the Create button from the Parameter List section on the right hand side and created 2 date parameters with no default value. I've then inserted a WHERE clause in my query and inserted the parameters. This all works fine. But because I need to select from a username column dynamically when I have added the dynamic parameter in the design view of the report it asks for the dates twice. Can you think of anything that I'm doing wrong?
    290 pointsBadges:
    report
  • Darraca
    I think I've discovered a bug! :o/
    290 pointsBadges:
    report
  • Hema2
    Hi, Did you find a solution for this? I have the same problem. Thanks.
    10 pointsBadges:
    report
  • Darraca
    I'm afraid not, I've tried quite a few different ways but still had no joy! sorry :(
    290 pointsBadges:
    report
  • Darraca
    Hi Hema2, If you do find a solution could you post back please? I'd really like to know how to get around this. Feel like I've been banging my head against a wall. Thanks.
    290 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following