×
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

Record Counter- please help

Record Counter- please help

Record Counter- please help

(OP)
I have a crystal report and would like for it to do the following:

1. For each record, it counts incrementally (ex: first record displays "1", second record displays "2" and this will go up to record 17.

2. The counter resets after 17 so each page should have 1 thru 17 and starts over again the next page.

I've tried so many formulas, but it's not working. Sometimes, it would seem like it's counting 1 thru 17, but it's skipping random numbers. For example, it would have 1 thru 17 down the line, but it's missing number 9.... so it really only has 16 per page.

Any help would be greatly appreciated.

kg

RE: Record Counter- please help

It sounds like you have some form of detail suppression set up in your report.

-LB

RE: Record Counter- please help

(OP)
Hi LB.

I discovered that it's suppressing the records that are duplicates. I had the following in the details section "Suppress" no drill down:
previous ({table1.field1})=({table1.field1})

Question: how can I make the record counter NOT skip and still not list the duplicates?

Thanks.

kg

RE: Record Counter- please help

Change your counter formula to:

Whileprintingrecords;
Numbervar cnt;
If onfirstrecord or
{table1.field1} <> previous({table1.field1}) then
cnt := cnt + 1;

-LB

RE: Record Counter- please help

(OP)
I have the counter formula you provided in the details section and the following formula in the report footer. When I changed the formula in the counter formula to yours, the numbers from page to page did not reset to "1." What do I need to do to make it reset to "1" and for the records to count to "17" down the line for each page?

whileprintingrecords;
numbervar x:=0

Thanks for your help on this, btw.

Kg

RE: Record Counter- please help

Having the reset formula in the property footer is not doing anything.

What formulas are currently limiting the records to 17? Where is the reset for the 17 count? Are you resetting per some group? If the report was previously working other than skipping some values, just change my formula by replacing “cnt” with “x” which appears to be what you are using.

-LB

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