Solved

# Formula to show blank field

Posted on 2011-02-17
677 Views
Hello,
I am trying to create this formula but it doesn't seem to work right.
I have Part No, Phase IN, Phase OUT and REV fields.
I want to show the most recent REV for that Part No. To id the most recent REV is if Phase OUT date is blank.

I tried this formula
if IsNull ({Phase_OUT}) then REV

but it is still grabbing the first REV or the first available line

is there a way to grab particular REV if Phase_OUT date is blank (didn't expire)

thank you,
0

LVL 42

Expert Comment

ID: 34920208
are you placing this formula in the Details section of the report?

if so, how is your grouping done?

0

Author Comment

ID: 34920256
it is in my report header....

the grouping is done by Operation for that Part No

thanks
0

Author Comment

ID: 34920281
I used Select Expert and set not equal to "", will that work?
0

LVL 100

Accepted Solution

mlmcc earned 250 total points
ID: 34921168
You probably need  to use a SQL expression or perhaps a subreport.

Crystal works on 1 record at a time so if there are multiple records for a part then you would have to search for the one you want.

Is there a field the parts can be sorted on that would make the most recent rev the first or last record?
If so, group on part then sort on that  field and the one you want will be the first (group header) or last (group footer)

mlmcc
0

LVL 34

Assisted Solution

James0628 earned 250 total points
ID: 34924666
You said that you put your formula in the Report Header.  Is the report run for just one "Part No" at a time?  If it's run for multiple parts, putting that formula in the Report Header doesn't seem to make sense.

Assuming that the report is run for one "Part No", you could try using a formula like the one that you posted, and then creating a second formula like the following and putting it in the Report Header:

The theory is that any record where Phase_OUT is null has the REV value that you want, and your old formula outputs REV when Phase_OUT is null, and an empty string or 0 (depending on what type of field REV is) when Phase_OUT is not null, so the maximum value returned by your old formula should be the REV value from a record where Phase_OUT is null.

Whether or not this will actually work depends on your data, report, etc.

James
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

### Suggested Solutions

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…