Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Set Crystal Report Line Number with suppress line

Posted on 2009-12-17
7
Medium Priority
?
552 Views
Last Modified: 2012-05-08
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
0
Comment
Question by:lanac222
7 Comments
 
LVL 13

Expert Comment

by:PCIIain
ID: 26073386
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....
0
 

Author Comment

by:lanac222
ID: 26074419
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?
0
 
LVL 4

Accepted Solution

by:
ravenblue earned 750 total points
ID: 26075751
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
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 101

Expert Comment

by:mlmcc
ID: 26075803
Detail section is always set to grow.  It can't be tured off.

mlmcc
0
 

Author Closing Comment

by:lanac222
ID: 31667389
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.
0
 
LVL 4

Expert Comment

by:ravenblue
ID: 26075920
in the running total make sure you have 'count' selected and not 'distinct count'
0
 

Author Comment

by:lanac222
ID: 26075951
I tried both and no difference.
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
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 …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

581 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