Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a formula 2

Status
Not open for further replies.

Snakedog12

Technical User
Jun 29, 2006
12
US
Hey everyone,
I'm trying to create a formula for a report at work and its not turning out right.

What I want it to do is

if jobsequence=19 then show data, if not then leave it blank. But, everytime I do it, it will show the jobs with sequence 19 but it will also duplicate it and leave the field blank.


any help? Kind of hard to understand when its not in front of you.

thanks!
 
Dear Snakedog12,

Can you post the formula that is not working and indicate the version of Crystal you are using?

regards,

ro

Rosemary Lieberman
rosemary-at-microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.

You will get answers more quickly if you read this before posting: faq149-3762
 
Its Crystal V. 11

And the formula is
if {job.sequence}=19 then {job.free.fields} else ""

and its doing it correctly except it will return:
Job# Sequence19(formula)

job 601254
job 601257 1-005-005
job 601257
job 602548

I Don't want it to duplicate as its doing on Job 601257.
Whats happening is if the job has a sequence 19 field its showing the information and duplicating it with no information. Is there anyway to get rid of this?


THANKS FOR YOUR HELP!!!
 
You could either use a record selection formula of:

{table.jobsequence} = 19

Or, if you need other records in the report, then group on job number and insert a maximum on your conditional formula at the group level, and then suppress the detail sections and drag the group name into the group footer.

-LB
 
Dear Snakedog,

So you have multiple records with the same job # and different job sequences, some of which are 19, is that correct?

If you run your report and place the job # and job sequence fields in the detail section, it repeats job 601257 ... correct?

regards,
ro

Rosemary Lieberman
rosemary-at-microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.

You will get answers more quickly if you read this before posting: faq149-3762
 
Rosemary,

multiple records are showing up when I insert the formula into the field. There are a total of 19 sequences within a job but we only want sequence 19 to show up. we have tons of jobs and we want all of the open ones to show and if it has a sequence 19, we want it to show but if it has no sequence 19 then we just want that field to be left blank. They are both in the details section. I hope I am explaining this right. :)
 
Dear Snakedog,

Just inserting that formula into the detail section will not make multiple details show up. This indicates that you have multiple job # records. Thats fine.

Did you try LBass's excellent solution? That should work.

regards,

ro

Rosemary Lieberman
rosemary-at-microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.

You will get answers more quickly if you read this before posting: faq149-3762
 
Then if you insert a group on job and insert a maximum on your formula, you will see the sequence 19 result if it is present for that job, or a blank if not, in the group footer (or you could place it in the group header).

-LB
 
Hey Everyone,
lbass that didnt seem to help my problem. I made some print screens to better help you all underdstand.

<img src="Here is all our data. What we want to do is add another field in called SEQ 19. Since we dont have a sequence 19 field, we created a formula called SEQ#19v2 and that states that job sequence = 19 so then we needed to create a formula to show that data so see exp 2
<img src="
BUT when we put that formula into our report it duplicates the fields where the statment is true...see exp 3
<img src="
How do I stop that from happening?

THANK YOU ALL SO MUCH.
 
If you group on Job ID and insert a maximum on your SEQ19 formula as I suggested earlier, and then drag the other detail fields into the group footer and suppress the detail section, you will have only line row per job ID. Not sure why you are reluctant to take this approach.

You are probably getting row inflation because the field you are using in the SEQ19 formula is coming from a second table that has more than one row per job ID.

-LB
 
nevermind!!!! I got it. THANK YOU SO MUCH LBASS!!!!!!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top