I have some question about crystal report pass value from sub report to parent report.
Now I have a sub report group by userID.Now I want to Pass last row Data each UserID . forexample sub report like this:
UserID : Jack
id No Time Diff
1 1 08:10 0
1 2 08:20 10
1 3 08:35 15
Last Row: 1 4 09:10 35
UserID : Peter
id No Time Diff
2 1 08:10 0
2 2 08:40 30
2 3 08:45 5
2 4 08:55 10
Last row: 2 5 09:00 5
Parent report need like this:
UserID No Time Diff
Jack 4 09:10 35 (show last row for jack in sub report)
peter 5 09:00 5 (show last row for Peter in sub report)
How to pass last row for each user to parent ? How can I archive this function?
I realize this is an old question, but hopefully this will still be of use to you.
Since you are returning multiple values to the main report, and the number of total rows is undefined, it may be easier to do the following:
Next ({YourTable.id}) = {YourTable.id}Basically, the formula will suppress the detail record if the next record’s
idis the same as the currentid. This way, only the last record for eachidwill be shown.You can format the detail line in the second subreport to appear how you want.
The only downside to this is that the subreport will essentially run twice, so if it’s a slow report, your report just got slower.