Joined: 09 Nov 2010
Online Status: Offline
Posts: 36
Topic: Subreport border color Posted: 08 Aug 2013 at 9:57am
Sorry, i posted this in the wrong section. Hopefully, this time i get some answer....
Hello,
Would some please guide me in the right direction. Not sure if this capability exist, but i will ask the question.
i created report with different parts (Group1). i then created a subreport and place it in the "Details" section of crystal. This gave me exactly what i want. But there are some parts for which no details exist. i then get a blank with border as the subreport under that part.
I wanted to see if it was possible to highlight that border of the subreport in redcolor if no data exist for that part or any other method to easily identify the parts with no subreport. i know it gives me a blank if the main part does not contain any details in subreport, but i wanted to see if i could make it easier for me to detect among hundreds of different parts.
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Posted: 08 Aug 2013 at 10:57am
go to format subreport (right click) select the border tab. toward the middle there is the color and x-1 button. clicking on the x-1 button you can write a formula to change the color. a simple one that comes to mind is:
shared numbervar cnt;
if cnt = 0 then
crRed
else
crBlack
in the subreport, a formula like:
shared numbervar cnt:=0;
if not isnull( {table.field}) then
cnt:= count({table.field})
I think that this will work...as long as the subreport is run, but I could be off my rocker.
as long as you can determine if the subreport is displayed you should be good.
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