Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

crystal report if statement

Posted on 2003-11-11
4
Medium Priority
?
348 Views
Last Modified: 2006-11-17
I've got the following statement, but nothing comes out:

Local stringvar sResult := "";

If Length({TB1.FLD1}) > 0 then
    sResult := {TB1.FLD1} & Chr(13);

If Length({TB1.FLD1}) > 0 then
    sResult := sResult & {TB1.FLD2} & Chr(13);

If Length({TB1.FLD3}) > 0 then
    sResult := sResult & {TB1.FLD3} & Chr(13);

sResult := sResult & {TB1.FLD4} & " " & {TB1.FLD5} & " "& {TB1.FLD6};
sResult
0
Comment
Question by:jessica00
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 13

Accepted Solution

by:
EwaldL earned 980 total points
ID: 9726995
could it be that one of the fields has a null value? if so, have a look at this
http://support.crystaldecisions.com/library/kbase/articles/c2000247.asp

Or try try setting "Convert null values to default" in the report options.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 9727370
Is the field on the report tall enough to handle the field?

Is CAN GROW set?

Format the field
Check CAN GROW

mlmcc
0
 

Author Comment

by:jessica00
ID: 9727426
IsNull works perfect, I won't use Length() in this case any more
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 9736311
For future reference a NULL doesn't have a length so the value is not defined.

mlmcc
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question