Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Alternate row color in blank line Post Reply Post New Topic
Author Message
aspfun
Newbie
Newbie


Joined: 17 Jun 2010
Online Status: Offline
Posts: 27
Quote aspfun Replybullet Topic: Alternate row color in blank line
    Posted: 28 Jul 2014 at 5:26am

I designed to print 20 lines in detail section.


If records are 53 lines the report will print 3 pages.


I code in CR detail section to make Alternate Row Color


if recordnumber mod 2 =0 then CrSilver else CrNocolor (this works fine)


How to make alternate row color working after line 53 until line 60? (this is no data)



Edited by aspfun - 28 Jul 2014 at 6:11am
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 29 Jul 2014 at 4:56am
you could include a number for each row that is printed (a small formula in the detail section like:
shared numbervar rowid;
rowid := rowid +1;
""

and reset the rowid in the page header...now change the color logic to reference rowid like:
shared numbervar rowid;
if rowid mod 2 = 0 then ...


since there is no data for the extra rows, there is no record number, so CR has nothing to work with. Creating a variable give CR something that it understands and can use regardless of dummy data or not.

HTH
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
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



This page was generated in 0.016 seconds.