Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2005
    Posts
    1

    Unanswered: Record numbers in reports........

    need some help in crystal reports...i have a report with different group names used as heading and

    there records following it.......just like that..

    <group name1>.......... ComputerLab
    recordno code value
    1. asset001 2000
    2. asset001 3000

    <group name2>.......... Libaray
    recordno code value
    3. asset001 2000
    4. asset001 3000

    problem is that i want to restart rocord no from 1 after each group name..........how could
    this be done........please help......and new to crystal reports formuls plz tell or suggest different articles or online books

    thanks in advance.........................i want to display as..........currently using crystall defaould record no special field...for counter.

    <group name1>.......... ComputerLab
    recordno code value
    1. asset001 2000
    2. asset001 3000

    <group name2>.......... Libaray
    recordno code value
    1. asset001 2000
    2. asset001 3000

  2. #2
    Join Date
    Jan 2005
    Location
    Avon Lake, OH
    Posts
    112

    Lightbulb An inelegant solution ...

    This is not the most elegant solution I'm sure, but it should work...

    Create a formula named forRecordNumber:
    Global NumberVar RecordNum;
    RecordNum:= 0;
    Use the Format Editor on the group header field, and enter a formula for the Suppress option:

    // Reset the number of records for this group
    Global NumberVar RecordNum;
    RecordNum:= 0;
    // Do not suppress
    False;
    Drop the @forRecordNumber formula field into the details section (as a replacement for the RecordNumber special field you are using now). Edit this field's Display String as follows:

    Global NumberVar RecordNum;
    RecordNum:= RecordNum + 1;
    ToText(RecordNum, 0)

    That should give you a replacement record number that resets to 0 as soon as a new group is detected.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •