?
Solved

Formula to show blank field

Posted on 2011-02-17
5
Medium Priority
?
681 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month8 days, 10 hours left to enroll

764 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