Solved

Subreport based on parameterized sql stored procedure

Posted on 2004-10-15
6
264 Views
Last Modified: 2008-03-03
The subreport doesn't seem to get the variable (same as variable from stored proc of main report.).
Can the subreport run when based on a parameterized proc?
0
Comment
Question by:johndamato
[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
  • 2
6 Comments
 
LVL 10

Accepted Solution

by:
ebolek earned 500 total points
ID: 12321881
Yes it can. When you add a sub report to the main report, you can tell it to  depend on the main report or not .

if it Depends on a field form main report and this could be the parameter of the main rpeort do this
1. Add the subrpeort to the main report
2. right click on the main report
3. Select edit subreport links
4. Pick the field from the main rpeort that subreport is linked
5. Click the parameter of the subrpeort from the dropdown. Here is the trick. Dont pick the first one from the dropsown, scroll to the end pick the parametr with ?
6. Click OK.

Now when main rport runs, field value is passed to the sub reoprt
 b. subreport is independent of the main report
Create the subreport as an on demand sub report

Regards
Emre
0
 
LVL 42

Expert Comment

by:frodoman
ID: 12322311
Emre is basically correct - just a couple of clarifications may be in order:

2.  Rt-click on the SUB report in the main report designer
3.  Select "change subreport links"
4.  Select the main report parameter in the top section
5.  In the subreport dropdown you don't want the {?PM - Paramname} entry you want the one that's {?Paramname}.  In CR8.5 or earlier it's difficult to tell but you can scroll down in the dropdown.

All of this assumes that the parameter has already been created in the subreport.

HTH

frodoman
0
 
LVL 10

Expert Comment

by:ebolek
ID: 12555198
Recommend Accept
Comment from ebolek
Date: 10/15/2004 10:41AM PDT

It is the right answer

regards
Emre
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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 …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

756 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