Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Printing Post Reply Post New Topic
Page  of 2 Next >>
Author Message
dweekley
Newbie
Newbie


Joined: 02 Nov 2010
Online Status: Offline
Posts: 13
Quote dweekley Replybullet Topic: Printing
     Posted: 12 Apr 2011 at 2:19am

I am looking to print a report to look like the old greenbar paper.  Not sure if this can be done, and if so how.  Any assistance would be great.

Thanks
David
IP IP Logged
CircleD
Senior Member
Senior Member
Avatar

Joined: 11 Mar 2011
Location: United States
Online Status: Offline
Posts: 251
Quote CircleD Replybullet Posted: 12 Apr 2011 at 5:02pm
You can open your Section Expert and under the color heading open the formula button and stick this at the bottom of the  formula field:

select RecordNumber mod2
case0: crWhite
case1: color(225,225,225)
default: crWhite //this line is optional

Then select green as your background color.This ill cause every other line to be green.If you need more lines to alternate you should be able to play with it and get what you want.It will also work using "GroupNumber" in place of "RecordNumber".



Edited by CircleD - 12 Apr 2011 at 5:03pm
IP IP Logged
dweekley
Newbie
Newbie


Joined: 02 Nov 2010
Online Status: Offline
Posts: 13
Quote dweekley Replybullet Posted: 13 Apr 2011 at 1:44am
Thanks for the assist.  I attempted your code, and I received an error alert when saving.
 
David
IP IP Logged
Keikoku
Senior Member
Senior Member


Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Quote Keikoku Replybullet Posted: 13 Apr 2011 at 2:36am
select RecordNumber mod 2


Probably syntax error.

Edited by Keikoku - 13 Apr 2011 at 2:36am
IP IP Logged
CircleD
Senior Member
Senior Member
Avatar

Joined: 11 Mar 2011
Location: United States
Online Status: Offline
Posts: 251
Quote CircleD Replybullet Posted: 13 Apr 2011 at 11:34am
// This conditional formatting formula must return one of the following Color Constants:
//
// Color (red, green, blue)
// crBlack
// crMaroon
// crGreen
// crOlive
// crNavy
// crPurple
// crTeal
// crSilver
// crRed
// crLime
// crYellow
// crBlue
// crFuchsia
// crAqua
// crWhite
// crNoColor
//

select RecordNumber mod 2
case 0: crWhite
case 1: color(225,225,225)
default: crWhite //this line is optional


 This is a copy and paste of what I already have in several reports and it works fine for me.The first part is already there and you add mine at the bottom.This is also in the Details section.
IP IP Logged
CircleD
Senior Member
Senior Member
Avatar

Joined: 11 Mar 2011
Location: United States
Online Status: Offline
Posts: 251
Quote CircleD Replybullet Posted: 23 Apr 2011 at 7:25pm
If you don't like coloring 1X1 you can use this to color 2X2 at a time:


If Remainder (RecordNumber, 4) In [1,2] Then crSilver Else NoColor



If you want a different color then replace the crSilver with the color you want.
IP IP Logged
CircleD
Senior Member
Senior Member
Avatar

Joined: 11 Mar 2011
Location: United States
Online Status: Offline
Posts: 251
Quote CircleD Replybullet Posted: 23 Apr 2011 at 7:27pm
Originally posted by Keikoku

select RecordNumber mod 2


Probably syntax error.



It was a syntax error.If he copied and pasted what I had typed.You have to put a space between the "case 0" and the "case 1" or it does give a error.
IP IP Logged
PCampbell
Newbie
Newbie


Joined: 27 Jul 2012
Online Status: Offline
Posts: 1
Quote PCampbell Replybullet Posted: 27 Jul 2012 at 3:10am

When I use this technique in a group header, the shading does not appear on every other line (I'm guessing because it is calculating on the number of lines that are grouped together, and not the grouping itself) Any ideas on how to make it work in a group header section?

Thanks!
IP IP Logged
PStaires
Newbie
Newbie
Avatar

Joined: 02 May 2013
Location: United States
Online Status: Offline
Posts: 8
Quote PStaires Replybullet Posted: 08 Jul 2014 at 3:43am
Change Recordnumber to GroupNumber ?
How do I get a light green instead? The olive and the green both shade the number too much decreasing readability.
Paul
IP IP Logged
Gurbs
Senior Member
Senior Member
Avatar

Joined: 16 Feb 2012
Location: Ireland
Online Status: Offline
Posts: 216
Quote Gurbs Replybullet Posted: 15 Jul 2014 at 3:04am
Change color(225,225,225) to color(184,235,191)
You can create your own color. Go to font color, and select the color that you want. Use those numbers in the formula.
IP IP Logged
Page  of 2 Next >>
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