Help: SubReport based on Stored procedure with an input parameter 
Author Message
 Help: SubReport based on Stored procedure with an input parameter

The report I'm creating lists all master records and for each master
produces a detail section (subReport). The subReport is based on a stored
procedure that accests a single input parameter (the master primary key
value) and returns a result set of detailed data.

So, I need to send the master primary key value FOR EACH master record to
the subreport in order to produce the correct detail data for each master
row.

I've created a CRW test report of my own to demonstrate my problem...

This uses the:

SQLServer Northwind database

Orders Table (Main Report)

CustOrderDetail stored procedure (SubReport)


Subreport. So when the master report is on OrderID = 10248, the subReport
gets populated by calling the CustOrderDetail sp using the CURRENT VALUE of
the master OrderID. And, as CRW displays each of the remaining Master order
records, it needs to repopulate the subReport using the appropriate OrderID
value.

UNDER NO CIRCUMSTANCES is the user to be prompted for an OrderID value!

Keep in mind, that I realize there are a number of ways to produce the
output for this example without using a parameterized SP as the data source
for the subReport. However, for my real report, while the interface to the
subreport is the same (i.e. takes a single input parameter), the SP itself
is quite complex and performs tasks that would otherwise be impossible to
produce using straight SQL.

Regards,

Michael




Mon, 29 Aug 2005 00:38:09 GMT  
 Help: SubReport based on Stored procedure with an input parameter


Fri, 19 Jun 1992 00:00:00 GMT  
 Help: SubReport based on Stored procedure with an input parameter
Follow-up: Crystal Technical support says this cannot be done...

1 - You should have a common field between the main report and the sub
report 2 - You cannot assign the value of a main report to the parameter of
the subreport as the parameter gets filled before reading the records even
in the main report.
Unfortunately this feature is not available in Crystal Reports. Kindly let
me know if I can close the incident.

Michael



Quote:
> The report I'm creating lists all master records and for each master
> produces a detail section (subReport). The subReport is based on a stored
> procedure that accests a single input parameter (the master primary key
> value) and returns a result set of detailed data.

> So, I need to send the master primary key value FOR EACH master record to
> the subreport in order to produce the correct detail data for each master
> row.

> I've created a CRW test report of my own to demonstrate my problem...

> This uses the:

> SQLServer Northwind database

> Orders Table (Main Report)

> CustOrderDetail stored procedure (SubReport)

> The CustOrderDetail stored procedure has a single input parameter

> Subreport. So when the master report is on OrderID = 10248, the subReport
> gets populated by calling the CustOrderDetail sp using the CURRENT VALUE
of
> the master OrderID. And, as CRW displays each of the remaining Master
order
> records, it needs to repopulate the subReport using the appropriate
OrderID
> value.

> UNDER NO CIRCUMSTANCES is the user to be prompted for an OrderID value!

> Keep in mind, that I realize there are a number of ways to produce the
> output for this example without using a parameterized SP as the data
source
> for the subReport. However, for my real report, while the interface to the
> subreport is the same (i.e. takes a single input parameter), the SP itself
> is quite complex and performs tasks that would otherwise be impossible to
> produce using straight SQL.

> Regards,

> Michael





Mon, 29 Aug 2005 03:00:20 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. ado recordsets from stored procedures, stored procedures have input parameters

2. How to make subreports based on stored procedure

3. Pass Parameter to SubReport Store Procedure

4. Active X control SubReports Stored Procedure Parameters

5. Subreport Stored Procedure Parameters

6. Dynamically Updating Stored Procedure Parameters in Subreport

7. Linked stored procedure parameters (subreports)

8. Setting Stored Procedure parameters in subreport

9. Passing stored procedure parameters to subreport

10. Crystal Report based on SQL Server Stored Procedure with Parameters

11. Passing Array as Input Parameter to Oracle Stored Procedure

12. Input Parameter for Stored Procedure

 

 
Powered by phpBB® Forum Software