Solved

Crystal Report SubReports using Stored Procedures and Passing Same Parameters

Posted on 2009-06-30
1
780 Views
Last Modified: 2012-05-07
I have a Crystal Report which will be using 4 different data sets all retrieved from stored procedures.  Each procedure uses the same parameter value(@FromDate, @ToDate).  Yet, when I load the main report it asks for me to enter a parameter for all procedures.  Is there a way to make the report only ask 1 time for the parameter for each and every subreport?  See ScreenShots below...  Thanks in advance!  

P.S. - If there is a better or more effecient way to make this work I am open for suggestions.  Subreports were the only solution that I saw as being ideal for this client request.  
Report.JPG
Parameter-Dialogue.JPG
0
Comment
Question by:Kyle_BCBSLA
1 Comment
 
LVL 2

Accepted Solution

by:
Kyle_BCBSLA earned 0 total points
ID: 24745327
I figured it out.  Pretty straightforward, just overlooked association.  The way to do this is to have Parameters on the Main Report.  Right-Click on the Subreports and select to Change Links...  Select the Parameter from your Main Report move it to the right side of the dialog.  Then in the bottom left dropdownlist select the associated Parameter which exists in your Subreport.  Do this for each Subreport and you may have one request for all duplicate parameters.  The tricky part is when using a date.  My Stored Procedures parameters were "DateTime" because this is the only date format that SQL Server 2005 accepts.  Hence, when creating the parameters in your Main Report you must make sure that the datatype matches.  "Date" will not work.  You must use "DateTime".  

CASE CLOSED!  haha...  
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now