Joined: 27 Jun 2009
Online Status: Offline
Posts: 2
Topic: If Else Formula Posted: 20 May 2010 at 6:26pm
Hi all,
I have a crystal report from vb.net 2005.
I want to edit one of the "Record Selection" formula I have in my report. (Selection Formulas >> Record Selection)
In my report it has only one If ... Else ...
However, I want to add more than one If Else.
this is the original formula
if {?sLocation} <> "" then
{tblCategory.loc_id} = {?sLocation}
else
{tblCategory.wh_id} = {?sWareHouse}
And here is my changes
if {?sLocation} <> "" then
{tblCategory.loc_id} = {?sLocation}
if {?sWareHouse} <> "" then
{tblCategory.wh_id} = {?sWareHouse}
if {?sUserid} <> "" then
{tblCategory.user_id} = {?sUserid}
When I click on "Check" to check my formula, it gave me following error msg.
The remaining text does not appear to be part of the formula.
Did my formula is not correct???
Anybody can guide me on this??
Joined: 27 Jun 2009
Online Status: Offline
Posts: 2
Posted: 21 Jun 2010 at 4:12pm
Hi Emir_W, lockwelle ,
Thanks for ur support.
Sorry, I'm on a long vacation :)
I tried your way (Emir_W) and its working so i didn't try lockwelle way :) sorry!
What I did was i used below method and its working! :)
({?sloc}="" or {tbl.fieldloc}={?sloc})
and
({?whouse}="" or {tbl.fieldwh}={?whouse})
and
({?usrid}="" or {tbl.fieldusr}={?usrid})
Thanks u all, this issue has been troubled me for a long time because I'm not that expert in crystal formula. but now its solved!!
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum