You can create a formula field on the subreport which contains a shared variable. In the formula you'll set the shared variable to the value of the rowcount field in the subreport.
Then in your main report you will need to create a formula with a shared variable that has the same name as the subreport and then return the value of the shared variable.
answered Aug 12, 2009 at 21:30 4,697 3 3 gold badges 30 30 silver badges 35 35 bronze badgeshere you can retrive sub report count from code side
CrystalDecisions.CrystalReports.Engine.ReportDocument RepDoc = new CrystalDecisions.CrystalReports.Engine.ReportDocument(); RepDoc.Load(ReportName); int IntRepCount = RepDoc.Subreports.Count;
pass this count to your report