473,320 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

in report formula trigger how we use the nvl function with date

how can we use the date column of table like dt_bl_date is date datatype column of table a
in table valu of column is null then
i want to use the valu of column in and add like 30 dys in the value of cloumn


d=nvl(:dt_bl_date,0)+30

but it gives err

tell me
everybody
Mar 5 '08 #1
3 4233
amitpatel66
2,367 Expert 2GB
how can we use the date column of table like dt_bl_date is date datatype column of table a
in table valu of column is null then
i want to use the valu of column in and add like 30 dys in the value of cloumn


d=nvl(:dt_bl_date,0)+30

but it gives err

tell me
everybody
So what you want as an output when you add 30 to NULL? How can you store a NUMBER in date datatype variable.

If the date is NULL, then what you want as an output? Add 30 days to SYSDATE or something like that??
Mar 5 '08 #2
how can we use the date column of table like dt_bl_date is date datatype column of table a
in table valu of column is null then
i want to use the valu of column in and add like 30 dys in the value of cloumn


d=nvl(:dt_bl_date,0)+30

but it gives err

tell me
everybody
Expand|Select|Wrap|Line Numbers
  1.  
  2. function CF_1Formula return date is
  3. begin
  4.   if :hiredate is null  then
  5.   :cp_1:= :hiredate+30;
  6.   return (:cp_1);
  7.   else
  8.    return(:hiredate);
  9. end if;
  10. exception
  11.  when others then 
  12. srw.message(1000,sqlerrm);
  13. end;
  14. //
  15.  
Note :- You will get result null because you want to add 30 into null date value so anything plus null result will be null. :hiredate------use------>sysdate
Mar 5 '08 #3
debasisdas
8,127 Expert 4TB
try using

sysdate +30
Mar 5 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Stephan | last post by:
Hi, I'm using Visual Studio 2003 (C#) with the integrated Crystal Report software and have the following question: How can I assign a value (string) to an unbound (string) field in Crystal...
1
by: Simon Bailey | last post by:
I currently have a query calculating the gap in days between two dates. The fields being "DateLookedAt" and "DateResolved" plus the calculated field "TimeTaken". I am looking to add another...
3
by: Matt MacDonald | last post by:
I'm trying to run a report using a form containing a crystal report viewer, but I keep getting an error saying tha "The specified value type is different to the current value type I'm trying to use...
0
by: RJN | last post by:
Hi I have a main report and a sub report. I have a formula field on the main report and one on the sub report. I want the formula in the subreport to be evaluated after the formula in the main...
0
by: RJN | last post by:
Hi Sorry for posting this message again. I have a main report and a sub report. I have a formula field on the main report and one on the sub report. I want the formula in the subreport to be...
0
by: rjn | last post by:
Hi I have a main report in which I have inserted a sub report. I have a formula field on the main report and one on the sub report. I want the formula in the subreport to be evaluated after the...
0
by: kamboj.shalabh | last post by:
Hi to all, Well, I am working on dotnet 2005 with crystal reports 10 and backend as sql server. I am facing a problem while loading a report. Actually the issue is, when I load report it takes...
2
by: TB | last post by:
HI, is there a formula(function) you could use to the display the previous month's name in a report. i know there is a function(formula) that returns the previous month's value (ie 4 for the...
0
by: =?Utf-8?B?WmVk?= | last post by:
Good Day, I been looking for a day now and I couldn't find a good source of information. I have a one of a kind report wherein the RDLC file including all controls are programmatically generated...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.