system
October 14, 2009, 2:49pm
1
Hi Guys,
I have a requirement as below:
get Maximum of ‘PlmtDate’ when PlmtCode <> ‘a,b,c’ and otherCode = ‘x,y’
and
get Maximum - 1 of ‘PlmtDate’ when PlmtCode = ‘a,b,c’ and otherCode = ‘x, y’ (has to pull last but previuos date)
I tried creating a formula with Crystal Syntax in crystal v10 but couldn’t succeed.
Any help would be really appreciated
sona_crystal (BOB member since 2009-10-14)
system
October 15, 2009, 11:38am
2
Hi,
Please create a formula which should be something like this:
if condition then
maximum({Orders.Order Date})
else if condition then
minimum({Orders.Order Date}) -1
Cheers!!!
Manish
cr_manish (BOB member since 2009-07-30)
system
October 15, 2009, 1:17pm
3
Hi Manish,
tried using this but unfortunately doesn’t work either, btw can we use Minimum(date_field)-1? is it valid?
any other way of doing this would be helpful
sona_crystal (BOB member since 2009-10-14)
system
October 16, 2009, 4:37am
4
Hi,
You hae mentioned it is not working. Let me know whether any error is coming or the wrong output is coming.
Minimum (Date)-1 is valid.
Also, let me know the layout of the report and where exactly you want your formula to be means in which section of the report.
Cheers!!!
Manish
cr_manish (BOB member since 2009-07-30)
system
October 16, 2009, 8:57am
5
Manish I want to insert this formula field ‘date1’ in my subreport. It has to pull the date for this criteria:
If Plmt = ‘a’,‘b’,‘c’ and area <> ‘x’,‘y’ then pull the maximum of the ‘date1’ field
else if plmt = ‘a’,‘b’,‘c’ and area = ‘x’,‘y’ then pull ‘date1’ when rownum = 2 when its ordered by desc (hope its clear now: It has to pull the record previous to the maximum date)
Can u tell me hw to do it in crystal or basic syntax to create a formula field with this?
Sona…
sona_crystal (BOB member since 2009-10-14)
system
October 19, 2009, 3:39pm
6
Hi,
If possible send me a sample report with saved data. Also, based on that report let me know your exact requirement.
Regards
Manish Tiwari
cr_manish (BOB member since 2009-07-30)