Print Page | Close Window

if than else formula

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=17175
Printed Date: 08 Apr 2025 at 5:47am


Topic: if than else formula
Posted By: MedanekTom
Subject: if than else formula
Date Posted: 01 Aug 2012 at 12:58am
Dear all,

IŽm working ond report, which is using connection to MS SQL srv.

Now, i need to make a formula

I made this, but it doesnŽt work. Could I ask for help to resolve this?

if ({CARRIER_GROUP_DETAIL.CARRIER_GROUP}="ONE")
then ({CARRIER.CARRIER}={CARRIER.CARRIER})
else ({CARRIER.CARRIER}="LOGISTICSCOMPANY")

Thank you for any help
Tom

-------------
IT admin, MOL Logistics (czech) s.r.o.



Replies:
Posted By: hilfy
Date Posted: 01 Aug 2012 at 5:10am
How doesn't it work?  What are you trying to do and where are you using the formula?  Which version of Crystal are you using?
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: MedanekTom
Date Posted: 01 Aug 2012 at 8:38pm
Hi,

I have CR 2008
IŽd like to check one table, where are lot of carriers and there are two tipes of carriers. Fo example england and german.

IŽd like to put into the report information from another table.

I tried to make a formula for it.

So it means.
----------------------
If in first table carrier is england, take from second table his name

If in first table carrier is german, take "one specified" carrier name.
-------------------
Excuse me, if it is not understandable. Let me know, if I can explain something more.

Tom

-------------
IT admin, MOL Logistics (czech) s.r.o.


Posted By: barkin
Date Posted: 02 Aug 2012 at 1:21am
Originally posted by MedanekTom



if ({CARRIER_GROUP_DETAIL.CARRIER_GROUP}="ONE")
then ({CARRIER.CARRIER}={CARRIER.CARRIER})
else ({CARRIER.CARRIER}="LOGISTICSCOMPANY")

Tom
 
Basic
 
if ({CARRIER_GROUP_DETAIL.CARRIER_GROUP}="ONE") then
{CARRIER.CARRIER}
else
"LOGISTICSCOMPANY"
 
Save and use in the report



Print Page | Close Window