Skip to Content
avatar image
Former Member

Crystal Reports Main Report Subreport store procedure refresh dynamically

hi good day , i have issue.
i am creating a report using vs2015 with sql server 2008, and calling Store Procedures. it is about banks.

The first SP is called usp_bankAct it fill the main report. it retrieve all necessary fields to show. When usp_bankAct complete the process,
Runs a SubReport, the subreport has to take parameters (from the main report ) and call a Stored Procedure called usp_total and then fill the sub report with the results from the SP.

Every time the main report change parameters, the subreport
must update according the parameters.

My Main report is working fine, data from the main report is getting passed on to the subreport as well.

But the stored procedure of SubReport does not get executed every time change the main report, and my sub report is empty


How can i do it?
Thank you for all yours advices.

Example:

example.jpg (267.2 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Nov 28, 2016 at 10:11 AM

    You should ensure that Subreport is linked by Parameters.

    In Change Subreport links dialog box. Drag paramters from main report into linking window.

    Then in lower left had side find corresponding subreport Paramter and link. They must be same datatype to link.

    Ian

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 29, 2016 at 02:08 PM

    You could try also enabling this feature in Report Options

    Also, are you calling Report.Refresh(), careful where you put this, it can discard the changes you may have applied in code.

    Don

    Add comment
    10|10000 characters needed characters exceeded