by Scott.Pearce » Tue May 28, 2019 12:55 pm
Here is what I did. I *think* it's working OK but have not tested thoroughly.
1. Right-click on subreport and choose "Change subreport links..."
2. Remove all fields in the right hand pane.
3. Add the following fields to the right hand pane:
@sp_DateFirst
@sp_DateLast
@sp_ClassificationFirst
@sp_ClassificationLast
@sp_AccountNoFirst
@sp_AccountNoLast
NOTE: These are the crystal generated parameter fields, NOT the formulae you created that are prefixed with "PASS_"!
Now change the "Subreport parameter field to use:" value for each field to link to thus:
@sp_DateFirst - ?@sp_DateFirst
@sp_DateLast- ?@sp_DateLast
@sp_ClassificationFirst - ?@sp_ClassificationFirst
@sp_ClassificationLast - ?@sp_ClassificationLast
@sp_AccountNoFirst - ?@sp_AccountNoFirst
@sp_AccountNoLast - ?@sp_AccountNoLast
I've attached the modified report, and have also attached fixed sql scripts, as they were failing when there was no data being returned (The insert in the stored proc for when there is no data was erroring with "Column name or number of supplied values does not match table definition")
- Attachments
-
JohnValves - Average Invoice Value.rpt
- (48 KiB) Downloaded 1530 times
-
usp_JohnValves_InvoiceAverageSell.sql
- (12.92 KiB) Downloaded 1606 times
-
usp_JohnValves_CreditNotesAverageSell.sql
- (6.47 KiB) Downloaded 1537 times
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials