Print Page | Close Window

How to Chage Type in crystal report

Printed From: Crystal Reports Book
Category: General Information
Forum Name: Announcements
Forum Discription: Please check this section for the latest announcements from Crystal Reports Forum
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=19500
Printed Date: 20 Apr 2024 at 2:18am


Topic: How to Chage Type in crystal report
Posted By: refeesh
Subject: How to Chage Type in crystal report
Date Posted: 05 May 2013 at 3:27am
hi,

i write the below code and after i saved the formula the type is coming as 'Boolean' (True/False) actually i need the result if "Active" my Aquision cost should appear and "NonActive" the amount need to be zero. my output come as number not Boolean. how to change it. please advice
if cstr({view_FA_Depreciation_Yearly.Asset_Status})="Active" then
tonumber({view_FA_Depreciation_Yearly.Acquisition_Cost})=tonumber({view_FA_Depreciation_Yearly.Acquisition_Cost}) else
tonumber({view_FA_Depreciation_Yearly.Acquisition_Cost}) = 0




Replies:
Posted By: kevlray
Date Posted: 07 May 2013 at 6:14am
Remember to assign a value to a variable (you cannot assign a value to a data base field) you use the :=.



Print Page | Close Window