Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COUNTING # OF LINES IN SUBREPORT--->

Status
Not open for further replies.

ScorpioJones

Instructor
Jul 7, 2003
3
US
I have a subreport on a report that is a comments field from a database. One record in the database (ie.Customer) may have multiple comments(ie. Customer_Notes). Each comment appears on a separate line in the subreport. Is there anyway to count the number of comment lines for each record???
 
In Crystal 8.5, you could count the lines using a Grand Total or Running Total. This value could then be passed to the main report using a Shared Variable, if you wanted it there. Or just displayed from the subreport.

Madawc Williams
East Anglia, Great Britain
 
The Grand Total and/or Running Total would be done in the Subreport?
 
I don't think a running total will work if, as you say, each comment section with multiple comments is from one record--one field from one row. However, you mention that the comments are on separate lines in the subreport. Do you mean they are in separate detail sections? Or that you have hard-coded in a return? How did you accomplish this? That may give us a clue about how to approach the problem of counting.

Or by "record" do you actually mean a customer with multiple records? In which case the running total method probably will work...

-LB
 
A subreport can do most things that the main report can do. Exceptions include page headers/footers, which can be done using dummy groups. Also no subreports within subreports.

Madawc Williams
East Anglia, Great Britain
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top