Skip to Content

Crystal Reports Main Report Subreport store procedure refresh dynamically

Nov 26, 2016 at 03:43 AM


avatar image
Former Member

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.jpg (267.2 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Ian Waterman 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.


10 |10000 characters needed characters left characters exceeded
Don Williams
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.


10 |10000 characters needed characters left characters exceeded