cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying Borders and Background colour for fields when no data present

Former Member
0 Kudos

Hi!

I have fields within a report that have their border line styles set to single in order to make the field look like a text box with white background. The issue is that when there is no data present in the fields, the borders and background do not appear at all. How can I make them appear when no data is present.

Regards

Vik

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Go to this link: http://www.sdn.sap.com/irj/boc and download the trial version of CR 2008 and test again.

Direct link to the Trial version: http://www.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx

Former Member
0 Kudos

Hi Vikas

Do the following

1.In the design tab of the report, right click on the required field ->click on Format field ->Border.

2. Now apply the below formula for all the border lines (left, right, top, bottom)

if currentfieldvalue = 0 then crSingleLine;

3. You can change the line type as doubleline, dottetline, dashedline as per the requirement.

4. You can change the colour also.

Hope this helps!!!

Regards

Sourashree

Former Member
0 Kudos

Hi! Guys,

Thanks for all your feedback. The issue with this formula is that some of these fields are date fields and therefore I am getting errors creating the formula, since the if value expects a datetime field. What can be done for date fields?

Regards

Vik

Former Member
0 Kudos

Hello,

I tried that but it decided to not show any lines even if there was data. Any suggestions.

Thanks,

Rob

Former Member
0 Kudos

The only way I got it to work was to add a text box, change the color of the box and then overlay the data on top of the box. It does require a bit of work, but works well everytime.

Former Member
0 Kudos

Did anyone actually get this to work via the formula editor in Crystal XI - none of the suggestions from this post worked. Making boxes and getting them to line up and size correctly is annoying!

Thanks,

Rob

Former Member
0 Kudos

Hi Vikas,

Create a formula named as u201CColoru201D. For instance,

If isnull({Field.Name}) Then " " Else {Field.Name}

Then put this formula "Color" in the report and format it with the borders and background.

Regards,

Alpana