Print Page | Close Window

Background Color for suppressed rows

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=17936
Printed Date: 03 May 2024 at 10:58am


Topic: Background Color for suppressed rows
Posted By: Alb2tead
Subject: Background Color for suppressed rows
Date Posted: 06 Nov 2012 at 6:13am
I am trying to shade each entry.  I have a report with 7 columns and all of the columns are suppressed but the last one.  I want to shade the whole thing to include all of the unsupressed column before moving on to the next entry.  Some of the unsuppressed columns have more than entry but I want them to all of the background to be highlighted.  It looks something like this.
 
A       B        C          D          E            F           G
 
1       2        3          4          5            6           7
                                                                      8
                                                                      9
                                                                      10
 
I want the the background of the whole thing shade before the next entry in A.
 
Please help?Smile



Replies:
Posted By: comatt1
Date Posted: 06 Nov 2012 at 7:31am
so is the report 7 columns/7 fields, or are you looking to span the same field over 7 columns?

What is your data you are working with, what is your goal? show more than one iteration, may be easier to help.


Posted By: Alb2tead
Date Posted: 07 Nov 2012 at 3:52am
A       B        C          D          E            F           G
 
1       2        3          4          5            6           7
                                                                      8
                                                                      9
                                                                      10
 
2       3        4          5          6            7           8
                                                                      9
                                                                      10
                                                                      11
 
The way that it is set up is a clients name is the first column, second is order date, third is order type, fourth is city, fifth is state, 6th is zip code and seventh is products ordered.  I am wanting to highlight everything for each client, then the next client be blank, the next be highlighted, etc...most of the time there will be several lines for column seven.  Each column is an individual field.


Posted By: DBlank
Date Posted: 07 Nov 2012 at 4:10am
I assume you have a grouping but this will work even if you do not
Createa Running Total
name=BGcolor
Field to summarize=clientID (or name if you must but you ant a unique value here)
type=DistinctCount
evalaute=for each record
reset=never
 
if you place this on the detail section you will see it only increment on the change of a client. YOu can now use this to conditinally format the background color of the detail section using this formula (alter it to your preferred color)

If ({#BGcolor} Mod 2 = 0) Then Color (236,242,242) Else crNocolor



Posted By: Alb2tead
Date Posted: 07 Nov 2012 at 4:33am
Thanks!!!!!  Worked perfectlyBig%20smile


Posted By: Alb2tead
Date Posted: 07 Nov 2012 at 5:02am
In the same vane, how do I get the Client information on one page in the details.  I have figured out how to get the groups to do it, but I have a run on from one page to another and would like if a set is going to run over a page break, that it would show up on the next page.


Posted By: DBlank
Date Posted: 07 Nov 2012 at 5:08am
do you mean repeat the group header on each page?
go into the group expert
select the group in the group by
select options button
select options tab
check the 'Repeat group header on each page' check box
 
You can alter the display name
here is one trick...
right click on the group field name
select format field
common tab
display string formual field
currentfieldvalue + if inrepeatedgroupheader then ' (cont.)'
 
 


Posted By: Alb2tead
Date Posted: 07 Nov 2012 at 5:29am
I have it grouped by department and it breaks it down, but within the group, the detail will sometimes continue on to the next page and I want all of each indiviual record to show up on one page.  So if it starts on one page and continues onto the next page, it will start on the next page.


Posted By: DBlank
Date Posted: 07 Nov 2012 at 7:45am
inside the group expert
select the group
options button
options tab
'Keep group together' as True
 
this will try to bump groups to fit onto one page.
 
 



Print Page | Close Window