Link to home
Start Free TrialLog in
Avatar of simisudevan
simisudevan

asked on

Crystal report Detail section line count

I have a detail section and i want to count the line number.i got this using the formula
whileprintingrecords.but my problem is my detail section a single record have multiple lines.It is not counting
Eg: Item        Description                 Count
       1             First Line                        1
                      Second Line
                       Third Line


It should show 3
Avatar of Mike McCracken
Mike McCracken

You can only count records unless you can parse the field and determine the number of lines.

mlmcc
Avatar of simisudevan

ASKER

I use this formula ,but it is not counting


whileprintingrecords;
stringvar sample := replace({SP_GET_PROPOSAL_PRINT_DETAILS;1.PRODUCT_DETAILS},chr(10),chr(13));
StringVar Array tmpArry := Split(sample,chr(13));
 UBound(tmpArry);
Are you sure there are chr(10) characters in the string?

mlmcc
No. I checked for \n and \r.
Is any other parse method to find the line count? My detail section content is just string.
Is the line wrap because the field is narrow or because there are characters causing a new line.

If the former there is no sure fire method of getting it since it is determined by the characters and the spacing.

mlmcc
If we know the number of characters per line ,can we find total lines? please give me a solution.
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks i