Link to home
Start Free TrialLog in
Avatar of lanac222
lanac222

asked on

Set Crystal Report Line Number with suppress line

Hi,

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.

lanac
Avatar of PCIIain
PCIIain
Flag of United States of America image

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

@groupheader
whileprintingrecords
shared v_linenumber as number
v_linenumber = 0
formula=v_linenumber

@detailline
whileprintingrecords
shared v_linenumber as number
formula=v_linenumber
if( not ( formula for suppressing details records))then
  v_linenumber=v_linenumber+1

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....
Avatar of lanac222
lanac222

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of ravenblue
ravenblue

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mike McCracken
Detail section is always set to grow.  It can't be tured off.

mlmcc
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.
in the running total make sure you have 'count' selected and not 'distinct count'
I tried both and no difference.