kiranreddys.com
Kiran's personal website
Blog   Forums   Sitemap   Links   
 
 
 
Knowledgebase
 
Home
Knowledge base home, and site home.
Categories
List of all Knowledge base categories.
Glossary
An alphabetical list of technical terms.
Contact Me
Contact me for knowledge base questions
My Blog
My articles, white papers, ideas and thoughts.
 

 
 


Alternate row colors in Crystal Reports

'Code By Kiran Reddy
'Flexible way to give alternate Color to rows of a Crystal Reports

'Create a formula with following code called ColorDeclaration with VB Syntax and place it on report header.
WhilePrintingRecords;
numberVar colorNum:=0;
colorNum;

'Create a formula with following code called ColorFormula with VB Syntax and place it on row .
WhilePrintingRecords;
numberVar colorNum;
colorNum:=colorNum;
if colorNum = 0 then
colorNum := 1
else
colorNum := 0;
colorNum;

//Right click on the section and select Section expert and go to Color tab
//Click on formula button(X+2) and add following code (leave Crystal Syntax as it is)

if {@ColorFormula } = 1 then
white
else
rgb(229,229,229); //or you can also give a Color name

Category: Crystal Reports - General,

User Comments

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment







CAPTCHA Image
Security code




Home | About Me | Products | Support | Contact Me | Knowledge base | Forums | Blog | Site map | Site Search | Subscribe | Links | News

Travel | Guest Book | All Pages | History | Site Calendar | Recipes | Ex-Rates | UK Stuff | Downloads | Telugu Stuff | Tell a Friend | Feedback

www.kiranreddys.com
Terms of Use
Site contents Copyright © 2008-2009 Kiran Reddy. All rights reserved.