Solved

Crystal Report SubReports using Stored Procedures and Passing Same Parameters

Posted on 2009-06-30
1
783 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
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 …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

828 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