Home
Crystal Reports Training
Crystal Reports XI
Crystal Reports .NET
Crystal Reports Forum
News
Tech Support
Active Topics
Memberlist
Search
Help
Register
Login
Report Design
Crystal Reports Forum
:
Crystal Reports 9 through 2022
:
Report Design
Topic: Row Count
Author
Message
coountsr
Newbie
Joined: 23 May 2013
Online Status: Offline
Posts: 20
Topic: Row Count
Posted: 28 May 2013 at 4:01am
I am needing to start a row count with 0 instead of 1. Is there a way to do this?
Thanks,
IP Logged
kevlray
Admin Group
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Posted: 28 May 2013 at 5:30am
I would think that you could do it two different ways. Create your own row counter using shared variables or use RowNumber -1.
IP Logged
coountsr
Newbie
Joined: 23 May 2013
Online Status: Offline
Posts: 20
Posted: 28 May 2013 at 6:02am
I am new to Crystal, how would I do either of these functions?
IP Logged
Sastry
Moderator
Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Posted: 29 May 2013 at 3:12am
Hi
Try this :
WhilePrintingRecords;
numbervar x;
if not onfirstrecord then
x:=x+1;
Thanks,
Sastry
IP Logged
kevlray
Admin Group
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Posted: 29 May 2013 at 5:32am
I think your second line would need to be Global Numbervar x; or Shared Numbervar x; Otherwise the variable will lose it value.
IP Logged
Sastry
Moderator
Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Posted: 29 May 2013 at 5:53am
No. In Crystal if you are not mentioning anything before declaration, it takes Global by default.
Shared will be used only when you pass values from sub report to main or main to sub
Thanks,
Sastry
IP Logged
kevlray
Admin Group
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Posted: 29 May 2013 at 10:03am
I remember that, Global never works properly for me. I end up making a lot of variables shared.
IP Logged
coountsr
Newbie
Joined: 23 May 2013
Online Status: Offline
Posts: 20
Posted: 30 May 2013 at 10:43am
That worked! Thank you so much for your help!
IP Logged
Printable version
Forum Jump
-- Select Forum --
Announcements
Talk with the Author
Self-Publishing
Job Postings
New feature request
Report Design
Data Connectivity
Technical Questions
Tips and Tricks
Crystal Xcelsius
Report Design
Data Connectivity
Writing Code
Tips and Tricks
Report Design
Data Connectivity
Writing Code
Tips and Tricks
You
cannot
post new topics in this forum
You
cannot
reply to topics in this forum
You
cannot
delete your posts in this forum
You
cannot
edit your posts in this forum
You
cannot
create polls in this forum
You
cannot
vote in polls in this forum
HOME
|
FREE EBOOK
|
PROGRAMMING GUIDE
|
PURCHASE
|
REVIEWS
|
CONTACT ME
|
FAQ
|
LINKS
|
PRIVACY
|
CLICK PLAYS
|
KONACAD
© 2004-2026 Brian Bischof. All Rights Reserved.