Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Display the current value or if it is null then previous value

Posted on 2009-03-31
8
Medium Priority
?
423 Views
Last Modified: 2012-05-06
If the field value is not null show me the value but if it is null then show me the previous value.
The way it works ,the report is built on Crystal Console and then put on Crystal RAS server where it is taken by third party application, which has the provision of drop down or selection list where the user can pick any one value or leave it blank.
So the client wants show me the value if the user selects  a value.
But if the user does not select any value and leave it blank show me the previous value and if that field  has never filled and left blank for show me an error message "No Data".
0
Comment
Question by:bodeveloper17
  • 4
  • 4
8 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 24035179
WHere is the user selecting values?

Is this in the parameter prompting screen?

Is this a database field?

Does the report pull all data or is there filtering?

mlmcc
0
 

Author Comment

by:bodeveloper17
ID: 24038753
User is selecting the value in a third party application. But the data gets updated in Database.
This is not a parameter.It is a field value
Yes this is a database field.
Right now the report is pulling the value if it is there for that PR.ID, if there is no value then display "No Data"
But the record will have only one value at a time.It can be left blank also.
So show me data if there is value, if there it is empty then show me the previous filled value.
If the record is new, user has not filled any value show me "No data"
Report is grouped by PR.ID and has a selection criteria based on Process Name.
Let me know if you need more info.Thanks for you help.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 24040738
How can you tell the difference between a new record and one that has had data?

Is that value saved somewhere?

mlmcc
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

 

Author Comment

by:bodeveloper17
ID: 24040921
Yes it is saved in another table.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 24041026
Is that table included in the report?

mlmcc
0
 

Author Comment

by:bodeveloper17
ID: 24041189
Yes i have included that table.
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 1500 total points
ID: 24041507
Something like

If IsNull({TheField}) then
    If IsNull({ThePreviousField}) then
        "No Data"
    else
         {ThePreviousField}
else
   {TheField}

mlmcc
0
 

Author Closing Comment

by:bodeveloper17
ID: 31565059
Thanks a lot mlmcc.I changed the formula and it worked.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

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. …
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…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

927 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