Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Subreport border color Post Reply Post New Topic
Author Message
althomas
Newbie
Newbie


Joined: 09 Nov 2010
Online Status: Offline
Posts: 36
Quote althomas Replybullet 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.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet 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.

HTH
IP IP Logged
althomas
Newbie
Newbie


Joined: 09 Nov 2010
Online Status: Offline
Posts: 36
Quote althomas Replybullet Posted: 09 Aug 2013 at 8:01am
Thank you so much pointing me in the right direction. i was able to get it done using your method..
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.016 seconds.