I just starting with crystal reports and need help on how to alternate background colors on 5 subreports all of them are on the same detail section(a).
I found out that adding this formula will do the job:
if Remainder(RecordNumber,2) <> 0 then silver else nocolor
And It does work for each record on the subreport but my problem is that each subreport grows differently. So I don’t have continuous background color “lines” going from start to end of each row.
Here is what I am getting
Subrep A Subrep B Subrep C Subrep D SubRep E
=ITEM X= =ITEM X= =ITEM A= =ITEM A= =ITEM X=
ITEM B ITEM A ITEM B
=ITEM A= =ITEM B=
ITEM M
=ITEM G=
This is what I am trying to get to display
Subrep A Subrep B Subrep C Subrep D SubRep E
=ITEM X===ITEM X===ITEM A===ITEM A===ITEM X=
ITEM B ITEM A ITEM B
=ITEM A============ITEM B=====================
ITEM M
=ITEM G=======================================
Also I am trying to add numbers to each line at the beginning and end of each row.
And here is what I found to solve it:
WhilePrintingRecords;
NumberVar Counter;
Counter:=Counter + 1
But then again I am having the same problem since on the first subreport I could have 50 records and on the last one could have only 10 or vice versa. So I will get 50 numbers on one side and 10 on the other one
This is what I am getting.
Subrep A Subrep B Subrep C Subrep D SubRep E
1=ITEM X= =ITEM X= =ITEM A= =ITEM A= =ITEM X=1
2 ITEM B ITEM A ITEM B
3=ITEM A= =ITEM B=
4 ITEM M
5=ITEM G=
This is what I am trying to get to display
Subrep A Subrep B Subrep C Subrep D SubRep E
1=ITEM X===ITEM X===ITEM A===ITEM A===ITEM X=1
2 ITEM B ITEM A ITEM 2
3=ITEM A============ITEM B===================3
4 ITEM M 4
5=ITEM G=====================================5
Any help is greatly appreciated!!!!
Thanks!
I found out that adding this formula will do the job:
if Remainder(RecordNumber,2) <> 0 then silver else nocolor
And It does work for each record on the subreport but my problem is that each subreport grows differently. So I don’t have continuous background color “lines” going from start to end of each row.
Here is what I am getting
Subrep A Subrep B Subrep C Subrep D SubRep E
=ITEM X= =ITEM X= =ITEM A= =ITEM A= =ITEM X=
ITEM B ITEM A ITEM B
=ITEM A= =ITEM B=
ITEM M
=ITEM G=
This is what I am trying to get to display
Subrep A Subrep B Subrep C Subrep D SubRep E
=ITEM X===ITEM X===ITEM A===ITEM A===ITEM X=
ITEM B ITEM A ITEM B
=ITEM A============ITEM B=====================
ITEM M
=ITEM G=======================================
Also I am trying to add numbers to each line at the beginning and end of each row.
And here is what I found to solve it:
WhilePrintingRecords;
NumberVar Counter;
Counter:=Counter + 1
But then again I am having the same problem since on the first subreport I could have 50 records and on the last one could have only 10 or vice versa. So I will get 50 numbers on one side and 10 on the other one
This is what I am getting.
Subrep A Subrep B Subrep C Subrep D SubRep E
1=ITEM X= =ITEM X= =ITEM A= =ITEM A= =ITEM X=1
2 ITEM B ITEM A ITEM B
3=ITEM A= =ITEM B=
4 ITEM M
5=ITEM G=
This is what I am trying to get to display
Subrep A Subrep B Subrep C Subrep D SubRep E
1=ITEM X===ITEM X===ITEM A===ITEM A===ITEM X=1
2 ITEM B ITEM A ITEM 2
3=ITEM A============ITEM B===================3
4 ITEM M 4
5=ITEM G=====================================5
Any help is greatly appreciated!!!!
Thanks!