Skip to Content
author's profile photo Former Member
Former Member

sending date range parameter from crystal to sql stored procedure

is there a way(I think there is) to send date range parameter from crystal reports to a sql stored procedure? If so, how can I do it?

Any help will be appreciated.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Jul 17, 2014 at 01:33 PM

    Hi Otto,

    Assuming the Stored Proc takes in two Date prompts - Start Date and End Date, here's what you need to do:

    1) Create a Blank Main Report with a Date Range Prompt

    2) Insert the Original Report as a Subreport and place it on the Report Header

    3) Create a formula (@Start) on the Main Report with this code:

    Minimum({?Date_Range_Prompt})

    4) Create another formula (@End) on the Main Report with this code:

    Maximum({?Date_Range_Prompt})


    5) Right-click the Subreport > Select Change Subreport Links > Move the Start formula to the pane on the right > From the dropdown at the bottom left that reads 'Subreport parameter field to use', choose the 'Start Date' prompt


    6) Do the same for the End formula however link it to the End Date prompt.


    -Abhilash


    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 17, 2014 at 01:40 PM

    do I have to name the sql variable exactly the same that I did on crystal?

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 18, 2014 at 12:31 PM

    I did that but the time I am adding the stored procedure to the subreport it asked me for date range parameters and at this time I do not have the option to link them to my main report parameters, I only have the option to leave them null or enter some values manually. What should I do then?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.