Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Every Other Line Shade Post Reply Post New Topic
Author Message
Threerick
Newbie
Newbie


Joined: 04 Apr 2013
Location: Canada
Online Status: Offline
Posts: 3
Quote Threerick Replybullet Topic: Every Other Line Shade
     Posted: 04 Apr 2013 at 10:44am
Hello I am looking to shade every other line with a colour.
I currently am using this formula

if RecordNumber mod 2 = 0 then Color (74,153,232) else crNoColor

This works when I have items for the line however this does not work for if I want empty lines. What I would like is in the detail level, let say I want a total of 10 lines regardless it is empty or not, to shade in a colour every other line. Is this possible? If so please help.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 04 Apr 2013 at 11:50am
how are you doing your 10 lines? Suppression on extra footer sections?
Is this per group?
IP IP Logged
Threerick
Newbie
Newbie


Joined: 04 Apr 2013
Location: Canada
Online Status: Offline
Posts: 3
Quote Threerick Replybullet Posted: 04 Apr 2013 at 12:11pm
This is for the detail group. I do not know how to do the "must have 10 lines" either. I'm hoping to get 2 birds knocked with 1 stone.

IP IP Logged
joeg1962
Newbie
Newbie


Joined: 01 Mar 2013
Location: United States
Online Status: Offline
Posts: 35
Quote joeg1962 Replybullet Posted: 12 Apr 2013 at 2:19am
Are you saying that you always want ten lines in a detail section, no matter how much detail there actually is?
So, if one detail line, you want it plus nine blank lines
two detail lines, 8 blanks
ten detail lines, no blank lines

what about 11 detail lines? could there ever be this many?

what about no detail lines? not sure if this is possible, but I suppose if a list of customers and all open orders then you would want to see company AAA and ten blank lines, and then company BBB with the five open orders.

As I write this, I am thinking the sub-report concept to handle the detail lines.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 12 Apr 2013 at 8:58am
you can alos consider making 10 group footers that are conditionally suppressed based on a group record count and include them as alternately shaded by adding a value of that group footer to that record count.
IP IP Logged
Threerick
Newbie
Newbie


Joined: 04 Apr 2013
Location: Canada
Online Status: Offline
Posts: 3
Quote Threerick Replybullet Posted: 16 Apr 2013 at 8:12am
Hello to answer your questions.

Joeg1962 you are correct. I would like always X lines, for now let us say 10 lines. If 1 detail lines, then I will need 9 empty lines. If 11 lines, move the 1 line to the next page which will also need 9 empty lines.

Each line in this section will need to have Colour shaded in every other line. So Line 1 white, Line 2 (empty) blue, Line 3 (empty) white, Line 4 (empty) Blue and so on until the 10th line and starting over on next page.

Thanks DBlank, I will look into trying that.
IP IP Logged
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