Solved

Crystal Report SubReports using Stored Procedures and Passing Same Parameters

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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Incremental load example 2 52
SQL Encryption question 2 50
T-SQL to Update Table Dynamically 2 41
Help with a Crystal Report Formula - remove time 5 31
Introduction This article will provide a solution for an error that might occur installing a new SQL 2005 64-bit cluster. This article will assume that you are fully prepared to complete the installation and describes the error as it occurred durin…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

920 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

16 Experts available now in Live!

Get 1:1 Help Now