Set Crystal Report Line Number with suppress line

Posted on 2009-12-17
Last Modified: 2012-05-08

I want to reset line number by Group and no gap of suppressed line.   Each group should start with 1, not 0. It should look like line sequence even with repeated lines..

Please help me with this.

Question by:lanac222
    LVL 13

    Expert Comment

    Okay, to reset a do this start with shared variables All formulas are in Basic Syntax

    shared v_linenumber as number
    v_linenumber = 0

    shared v_linenumber as number
    if( not ( formula for suppressing details records))then

    Put the groupheader formula in the group header, and suppress it
     Put the detailline formula where you want the line numbers.

    I don't know what 'repeated lines' means in this context. If you have details sections which grow, then you can't do what you want to....

    Author Comment

    Thank you, PCIlain.

    what I mean repeated lines is that some line in the detail look like same, like same item with all same key fields, just diff qty and extended price.

    What do mean detail section grow?
    LVL 4

    Accepted Solution

    you should be able to use a running total.

    in the running total dialog box;

    summarize one of the key fields
    set type of summary to count
    leave evaluate set to 'for each record'
    set reset to 'on change of group' and select the appropriate group.

    Once done, drop this running total into the report where you want to display it
    LVL 100

    Expert Comment

    Detail section is always set to grow.  It can't be tured off.


    Author Closing Comment

    I did running total and it starts from 0, not 1; if the key field duplicated it shows same line number.

    But anyway I processed from datasource and make it showing as I need.
    LVL 4

    Expert Comment

    in the running total make sure you have 'count' selected and not 'distinct count'

    Author Comment

    I tried both and no difference.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
    There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now