Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dissapearing Data!

Status
Not open for further replies.

KidFix

Programmer
Feb 7, 2002
60
US
Hi

I'm concatenating two fields with a line break in a short formula field. Both fields are strings, and my formula field looks like this:

{INV_PrintInvoice.Description} + chr(10) + {INV_PrintInvoice.DetailTitlw};

The problem is that when i put my formula field on the report it displays nothing, but if I have the two seperate fields on my report they display the data so for some reason my formula field isn't behaving itself

Any ideas why?

Thanks in advance
 
Oh and just so you know I don't have a white font on a white background and the field isn't surpressed.

I've also tried just {INV_PrintInvoice.Description} in the formula field which worked
 
And if that doesn't work, try it without any CHR and see what happens. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Thanks for your reply, but that hasn't solved the problem.

I've found that my original formula does in fact work... sometimes...

for a lot of records, the first field in my formula ({INV_PrintInvoice.Description}) is empty and this seems to be causing the formula to fall over as when both fields contain data this is when the formula does what it should. It seems I need an if statement in there to deal with different senarios, but what would I put in my if? How can I detect when a field is empty?

Thanks in advance
 
That is a different issue - Null Values.
You can use File-Report Options to fill in all nulls, or you can check for nulls by using

if IsNull ( {Field} ) then "" else {field} + Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Actually you would need parens around each section:

( if IsNull ( {FieldA} ) then "" else {fieldA} ) +
( if IsNull ( {FieldB} ) then "" else {fieldB} ) Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top