pmenonsmitka
Programmer
I am using Crystal Reports 9 over an Oracle 9 platform.
Problem :
Report has 2 date based parameters : Start Date and End Date.
In my record selection I have :
{WORKORDER.WORKTYPE} in ["LUBE", "PM"]
and ({WORKORDER.STATUSDATE} in
datetime({?Start Date}, time(0,0,0))
to
datetime({?End Date}, time(23,59,59))
or
({WORKORDER.TARGSTARTDATE} in
datetime({?Start Date}, time(0,0,0))
to
datetime({?End Date}, time(23,59,59))))
------------------------------------------------------------
NOW THE ISSUE IS :
I have a formula called @%Completed that states :
if Sum ({@WOSent}, {@LeadCraft}) > 0 then
(Sum ({@WOComp}, {@LeadCraft}) / Sum ({@WOSent}, {@LeadCraft})) * 100 else 0
WorkOrders_Sent is a formula that has :
If ({WORKORDER.WORKTYPE} in ["LUBE", "PM"]
and
{WORKORDER.TARGSTARTDATE} in
datetime({?Start Date}, time(0,0,0))
to
datetime({?End Date}, time(23,59,59))) then 1 else 0
and
WorkOrders_Completed is a formula that has :
If ({WORKORDER.STATUS} = 'CLOSE'
and
{WORKORDER.STATUSDATE} in
datetime({?Start Date}, time(0,0,0))
to
datetime({?End Date}, time(23,59,59))
and
{WORKORDER.WORKTYPE} in ["LUBE", "PM"])
then 1 else 0
------------------------------------------------------------
I have created a Cross Tab with the Rows grouped by
@LeadCraft
In the Summarized fields area I have the calculation of the
@%Completed (as an Average) : Avg of @%Completed.
Is there a way in the Column grouping where I can combine the WORKORDER.STATUSDATE as well as the WORKORDER.TARGSTARTDATE. I don't mean specifying them separately in the Columns grouping of the Cross tab. I mean combining them because the @%Completed calculation in the cross tab is based on both these dates (as shown above).
I want to make sure that the WORKORDER.STATUSDATE and the WORKORDER.TARGSTARTDATE fall between the date parameters(range)specified for the report.
When I group it by just @Leadcraft (without using Crosstab) it works fine. The issue is that the end result uses two separate dates for the calculation but I am grouping by one of those dates and its coming up all screwy.
Can this be done?? If so, how? REally appreciate any tips/help on this issue.
Thanks,
Problem :
Report has 2 date based parameters : Start Date and End Date.
In my record selection I have :
{WORKORDER.WORKTYPE} in ["LUBE", "PM"]
and ({WORKORDER.STATUSDATE} in
datetime({?Start Date}, time(0,0,0))
to
datetime({?End Date}, time(23,59,59))
or
({WORKORDER.TARGSTARTDATE} in
datetime({?Start Date}, time(0,0,0))
to
datetime({?End Date}, time(23,59,59))))
------------------------------------------------------------
NOW THE ISSUE IS :
I have a formula called @%Completed that states :
if Sum ({@WOSent}, {@LeadCraft}) > 0 then
(Sum ({@WOComp}, {@LeadCraft}) / Sum ({@WOSent}, {@LeadCraft})) * 100 else 0
WorkOrders_Sent is a formula that has :
If ({WORKORDER.WORKTYPE} in ["LUBE", "PM"]
and
{WORKORDER.TARGSTARTDATE} in
datetime({?Start Date}, time(0,0,0))
to
datetime({?End Date}, time(23,59,59))) then 1 else 0
and
WorkOrders_Completed is a formula that has :
If ({WORKORDER.STATUS} = 'CLOSE'
and
{WORKORDER.STATUSDATE} in
datetime({?Start Date}, time(0,0,0))
to
datetime({?End Date}, time(23,59,59))
and
{WORKORDER.WORKTYPE} in ["LUBE", "PM"])
then 1 else 0
------------------------------------------------------------
I have created a Cross Tab with the Rows grouped by
@LeadCraft
In the Summarized fields area I have the calculation of the
@%Completed (as an Average) : Avg of @%Completed.
Is there a way in the Column grouping where I can combine the WORKORDER.STATUSDATE as well as the WORKORDER.TARGSTARTDATE. I don't mean specifying them separately in the Columns grouping of the Cross tab. I mean combining them because the @%Completed calculation in the cross tab is based on both these dates (as shown above).
I want to make sure that the WORKORDER.STATUSDATE and the WORKORDER.TARGSTARTDATE fall between the date parameters(range)specified for the report.
When I group it by just @Leadcraft (without using Crosstab) it works fine. The issue is that the end result uses two separate dates for the calculation but I am grouping by one of those dates and its coming up all screwy.
Can this be done?? If so, how? REally appreciate any tips/help on this issue.
Thanks,