I’m going to use main report and sub report for showing some details.
Main report has InvoiceHeader Part and sub report has invoice detail part.
Invoice Header and invoice detail has 2 SPs.
SP_InvoiceHeader (Use for main report)
ALTER PROCEDURE [dbo].[testSP1]
@invnoH as varchar(20)
AS
BEGIN
SELECT * FROM INV_HEADER WHERE INVNO=@invnoH
END
SP_InvoiceDetail (Use for sub Report)
ALTER PROCEDURE [dbo].[testSP2]
@invno as varchar(20)
AS
BEGIN
SELECT * FROM INV_DETAIL WHERE INVNO=@invno
END
I create the main report and using Insert --> subreport I just add a sub report.
Both reports are used above SPs seperatly.
I just can pass a parameter to sub report using main report. This is the auto genetrated paramenter in sub report. (Pm-?@invnoH). It is showing another parameter in the sub report named @invno which also an auto generated parameter field based on the SP. But I cannot assign @invno to passing parameter.
Simply this equation is not working.
@invno = Pm-?@invnoH
How to pass main report parameter to stored procedure of the sub report? (Up to now I can show passed parameter in the sub report)
I'm using Crystal report version is 8.5