?
Solved

Call Stored Procedure Multiple Times

Posted on 2005-03-07
3
Medium Priority
?
274 Views
Last Modified: 2012-05-07
I have a Crystal Report that pulls data from a SQL Server stored procedure.

The report compares statitics from certain weeks from year to year.

An example of the report is as follows:

2005 Notifications     45            67          100
2004 Notifications     34            92          55
Total                      79             159        155

2005 Charges          3              9             5
2004 Charges          7              14           1
Total                      10             23           6

...etc...

There are a couple of rows of data, and then a total line.  The stored procedure only retreives data for one year at a time.

Is there a way to call a stored procedure multiple times for a report?

I have tried to just add the stored procedure to the document multiple times, but it only gives me one parameter field, and all the rows bring back the same data.

Thanks.
0
Comment
Question by:cswebdev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 26

Accepted Solution

by:
Kurt Reinhardt earned 2000 total points
ID: 13480508
The short answer is no - a stored procedure can only be executed once per report.  You could use subreports, but you don't really need to.  In this case, I'd recommend modifying the stored procedure so that it returns multiple years of data.  If you aren't able to, I'd suggest speaking with your DBA.

~Kurt
0
 
LVL 1

Expert Comment

by:spfeedback82
ID: 13481193
after modifying the stored procedure to retrieve all the years you need, then use groups to group the data together by each year.

spfeedback
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 13482707
Agree with both comments above.

mlmcc
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses
Course of the Month10 days, 20 hours left to enroll

770 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