Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 equivalent formula fields in crystal reports

Author  Topic 

gagani
Posting Yak Master

112 Posts

Posted - 2011-11-09 : 14:23:31
I have a datetime column in a table.

For example,

datetime code
09/11/2011 5
09/11/2011 2
10/11/2011 5


My output should be

fromdate enddate
10/11/2011 09/11/2012

the following sql query is working fine.

select Max(datetime) as fromdate, (dateadd(day, -1, dateadd(year,1, max(datetime)) as enddate from table1 where code = 5

I am trying to write two formula fields for the above two columns in crystal reports, but having difficulty.
Can anyone help with it.
Thanks

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2011-11-16 : 05:11:02
In crystal reports, you can make use formula field or in-built aggregate functions

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -