cancel
Showing results for 
Search instead for 
Did you mean: 

Default messages in subreports

Former Member
0 Kudos

I have a report that will display benefit information in subreports. If the employee does not have insurance with the company the values are left blank within the text. I would like to put in a default message stating "you do not have insurance" if any of the database fields are blank. I can't figure out how to do this...

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

Which field are you linking with the subreport?

You need to use the field that would be blank in case the person does not have insurancen in the formula like the below:

- In subreport right click on the field for which you want to display the required string.

- Right click on thfield -> Format field.

->Under Common Tab click on X-2 for Display string. This would open the formula editor.

- Put the below foruma:

if IsNull(fieldname) = "" then "you do not have insurance"
else ""& currentfieldvalue;

Click on save and close.

Hope this helps!!!

Regards

Sourashree

Former Member
0 Kudos

Hi Sourashee,

Thank you for the help. I am a very new crystal user... When I enter in the formula I get an error stating A number, currency amount, boolean, date, time, date-time, or string is expected here. CR highlights the If the following is what I entered:

formula = If IsNull({hbene.b_benecode}) =""then

"you do not have insurance"else

""& currentfieldvalue;

Former Member
0 Kudos

Hi,

Try to create conditional formula for database field.

Regards,

Shweta

Former Member
0 Kudos

Hello,

I've tried conditional formulas with no luck. What is happening is that if a person does not have insurance there is not a record in the database. If they do have insurance the formulas work. I have the report to the point where it will not show the paragraph with the insurance info if the person does not have insurance, but cannot get the "you do not have insurance" note to display. I'm working with Crystal 10 in a subreport.