Skip to Content
0

Crystal report replacing words with numbers

Mar 10, 2017 at 11:31 PM

40

avatar image
Former Member

I am entirely new to this to forgive me if terminology is not quite what it actually should be. I have a project dumped in my lap that I need to figure out but so far haven't been able to. I need to be able to say that is report sees a number say a word. so far when I run this I am only seeing the numbers and we need to be able to see who is enrolled with the labeled sStatus

StringVar sStatus;if({Command.enrollment_status})=0THEN sStatus:="Not Enrolled"elseIF({Command.enrollment_status}=1AND ISNULL({Command.enrollment_status(1)})= False AND{Command.enrollment_status}=1)THEN sStatus:="Completed Enrollments"ELSEif({Command.enrollment_status}=1)then sStatus:="Pending Enrollments"elseif({Command.enrollment_status}=2)then sStatus :="--­"

<br>

IF({Command.enrollment_status}=1AND ISNULL({Command.enrollment_status (1)})= False AND{Command.enrollment_status(1)}=3)THEN3ELSE({Command.enrollment_status})

I just need to know what I need to fix to get this to output the correct information. right now in place of the words I am only seeing the corresponding numbers so where not enrolled is 0 on the report. it should be the other way around when its displayed. I can see the persons name and then under the header enrollment status I get 0 instead of not enrolled

10 |10000 characters needed characters left characters exceeded

Hi Peter,

I'm a little confused as to what you are attempting to do. In your formula, you have something that looks like {Command.enrollment_status(1)}. Is enrollment_status an array? I'm not sure what the (1) is for.

Brian

0
Former Member

someone else wrote this report and it got passed on to me, I tried removing that (1) but then the whole thing gets bent out of shape and tells me it cannot be saved due to dependencies. but no where else in any of the formulas is there a (1)

I'm not a report writer I'm the one who works with the data after the report is created. trying to teach myself how this all works cause we don't have the $$ to bring someone on who actually knows it well enough

0
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Ian Waterman Mar 14, 2017 at 11:03 AM
0

As a test expand the section which is used to display the data you see.

Place the field {Command.enrollment_status} underneath the formula described above and see if that shows you what you want to see.

If it does simply replace formula with that field.

Ian

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

it tells me that the text is not a part of the formula.. can you explain this differently?

0
Brian Dong Mar 14, 2017 at 09:06 PM
0

Hi Peter,

The second half of your formula from the <br> down looks like it shouldn't be there. Remove it and see what happens.

I recommend Ian's advice which is to have the actual field {Command.enrollment_status} placed on the report either beside or below the formula. So when you run the report, you can see the result of the formula with the number the field is showing.

Good luck,

Brian

Share
10 |10000 characters needed characters left characters exceeded