Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Select Expert - Saved Data- Post Reply Post New Topic
<< Prev Page  of 2
Author Message
bowja
Newbie
Newbie
Avatar

Joined: 07 Dec 2009
Location: Australia
Online Status: Offline
Posts: 31
Quote bowja Replybullet Posted: 20 Jan 2010 at 1:32pm
This is the formula:

StringVar OrderTaken;
if PreviousIsNull({JobOrder.JobOrderNo}) or {JobOrder.JobOrderNo} <> Previous({JobOrder.JobOrderNo}) then
OrderTaken := 'No';
if InStr(UpperCase({JobComments.Description}), 'ORDER TAKEN') > 0 then
OrderTaken := 'Yes';
OrderTaken

I created this in Formula Fields in Field Explorer and then dragged the Field into the Group Footer #1 with the other data.


Below is a cross section of some of the data that the report produces

OwnerStaffID     JobOrderNo          OfficeCode     OfficeCode     JobStatus     OrdJobType     OrderTaken     
DEBBIE          200,035,658          200          200          Closed          Firm Order          
AARON          200,035,953          200          200          Closed          Extended          
KATH          200,035,990          100          100          Filled          Extended          
PEOPLE          200,036,025          200          300          Filled          Firm Order          
JAMESM          200,036,085          100          100          Closed          Extended          
CHRISTI          200,036,132          200          200          F-Competitor     Firm Order          
ELIZA          200,036,294          100          100          Cancelled     Firm Order          No
JAMESM          200,036,321          100          100          Closed          Extended          No
CHRISTI          200,036,358          200          200          Filled          Firm Order          No
CHRISTI          200,036,376          200          200          F-Competitor     Firm Order          No
KYML          200,036,560          200          200          Closed          Firm Order          No
JAMESM          200,037,774          100          100          Filled          Payrolled          Yes
JAMESM          200,037,775          100          100          Filled          Payrolled          Yes
JAMESM          200,037,776          100          100          Filled          Payrolled          Yes
JAMESM          200,037,777          100          100          Filled          Payrolled          Yes
SALLY          200,037,779          200          300          Submitted     Firm Order          Yes
JAMESM          200,037,780          100          100          Closed          Contingent          No
If you think you can or think you can't you are right - Paraphrased quote Henry Ford
IP IP Logged
bowja
Newbie
Newbie
Avatar

Joined: 07 Dec 2009
Location: Australia
Online Status: Offline
Posts: 31
Quote bowja Replybullet Posted: 01 Feb 2010 at 6:18pm

Hi again,

Thank you very much for all of your help however as the report was throwing up some very odd results using one formula field I tried a new technique which worked.

I put the description comment in the details section, then put a custom field in with the formula: if description = "order taken" then 1 else 0.

Then I created a summary field in the group footer to sum up the custom field, resetting for each new group. I also put the Job No. in the group footer

By suppressing the details I am left with the Job No. and a "0" if no Order taken comment of > 0 if there is an order taken comment.

If you think you can or think you can't you are right - Paraphrased quote Henry Ford
IP IP Logged
<< Prev Page  of 2
Post Reply Post New Topic
Printable version Printable version

Forum Jump
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



This page was generated in 0.031 seconds.