×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Avoid counting Line.Text with RecordNumber line numbers

Avoid counting Line.Text with RecordNumber line numbers

Avoid counting Line.Text with RecordNumber line numbers

(OP)
Hello everyone, I have a Crystal Report document that is an Order and below the product lines sometimes a simple line of text is added below that is linked to the one above, I wanted to know if it is possible that the RecordNumber field that count the lines avoid counting when there is a line of text and only count the products.

this is how it comes out right now
1 CODE DESCRIPTION PRICE
2 TEXT.LINE
3 CODE DESCRIPTION PRICE
4 CODE DESCRIPTION PRICE
5 CODE DESCRIPTION PRICE
6 TEXT.LINE
7 CODE DESCRIPTION PRICE

this is how i want it to appear
1 CODE DESCRIPTION PRICE
TEXT.LINE
2 CODE DESCRIPTION PRICE
3 CODE DESCRIPTION PRICE
4 CODE DESCRIPTION PRICE
TEXT.LINE
5 CODE DESCRIPTION PRICE

I do not know if it is possible with a formula, I have the RecordNumber field in the 2 lines, both in the products and in the Line.Text
If I put it only in the row of products it counts me then Odd



Thanks!

RE: Avoid counting Line.Text with RecordNumber line numbers

Rather than use RecordNumber, I'd suggest you use a Running Total. Set it up to Count any of the report fields and Evaluate on formula.

As for the formula, it is a little difficult to be specific based on the screen shot provided, and will depend whether the second report column (I've called it {Table.2ndColumnField} in the formula below) is Null or an empty string, but it would look something like this:

CODE --> {@RecordCount}

Not IsNull({Table.2ndColumnField}) or
Trim({Table.2ndColumnField} <> '') 


Hope this helps.

Cheers, Pete

RE: Avoid counting Line.Text with RecordNumber line numbers

(OP)
Hi, Thanks for your answer, what I don't understand is using 'Running Total', how you can use this option. On the other hand, I am attaching a capture of the rpt so that you can see how I have it configured. I have the RecordNumber in each row Detail a and d, and what I want is not to count the one in TXT.LineText, this document is printed in SAP B1 9.3, the version I use of Crystal Reports is 2016 14.2

RE: Avoid counting Line.Text with RecordNumber line numbers

When you set up the running total, I think you can just do a distinctcount of item number, evaluate on change of item number (no formula necessary), and place the running total only in the details_a section. If you want the count to reset within a certain group, then in the running total, add a reset on change of that group.

-LB

RE: Avoid counting Line.Text with RecordNumber line numbers

(OP)
Very thanks lbass, I have already managed to make the line counter group the 2, in the end I have used "Group Header" to put the 2 lines in the same group.

Greetings from Barcelona

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close