Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Formula to show blank field

Posted on 2011-02-17
5
Medium Priority
?
682 Views
Last Modified: 2012-05-11
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
Comment
Question by:Palmer_Admin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 44

Expert Comment

by:zephyr_hex (Megan)
ID: 34920208
are you placing this formula in the Details section of the report?

if so, how is your grouping done?

there are several different ways you can do this... but i think we need more information about the structure of your report.
0
 

Author Comment

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

the grouping is done by Operation for that Part No

thanks
0
 

Author Comment

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

Accepted Solution

by:
mlmcc earned 1000 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 35

Assisted Solution

by:James0628
James0628 earned 1000 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:

Maximum ({your old formula})


 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question