Print Page | Close Window

passing a a value from main report to stored proc

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=4432
Printed Date: 05 May 2024 at 9:57am


Topic: passing a a value from main report to stored proc
Posted By: r0k3t
Subject: passing a a value from main report to stored proc
Date Posted: 02 Oct 2008 at 7:03am
Hi there,

I have been trying to pass a value that is collected in the main report to a sub report as a parameter to a stored procedure used to fill the sub report but have been having no luck.

These are the steps I am taking, maybe someone can point out where I am going wrong...

1. After I have added the subreport and set the stored proc using the database expert I go back to the main report and click the "change subreport links" option.
2. Then I select the field from "available fields"  - In this case it is DataTable1.CustomerId
3. It then fills in all the data below and looks like it is going to do exactly what I want. The "Subreport parameter field to use" ends up being set to ?pm-DataTable1.CustomerId and the box that says "Select Data in subreport based on field:" is checked and the drop down below it is set to CustomerID which is the variable the stored procedure uses.

All that seems like it is totally going to do what I want but when I run the report I get box that pops up asking me for the CustomerId.

*Shrug* I have researched this and it seems like this is they way to do it but I must be missing something somewhere.

OK - Thanks...



Replies:
Posted By: r0k3t
Date Posted: 02 Oct 2008 at 11:04am
Is this question just so stupid no one wants to answer it? Am I missing something? 



Print Page | Close Window