We help IT Professionals succeed at work.

Crystal report Detail section line count

simisudevan
simisudevan asked
on
Medium Priority
1,305 Views
Last Modified: 2013-11-15
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
Comment
Watch Question

Mike McCrackenSenior Consultant
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2013

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

mlmcc

Author

Commented:
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);
Mike McCrackenSenior Consultant
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2013

Commented:
Are you sure there are chr(10) characters in the string?

mlmcc

Author

Commented:
No. I checked for \n and \r.

Author

Commented:
Is any other parse method to find the line count? My detail section content is just string.
Mike McCrackenSenior Consultant
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2013

Commented:
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

Author

Commented:
If we know the number of characters per line ,can we find total lines? please give me a solution.
Senior Consultant
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2013
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Thanks i
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.