Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Having a problem with a formula. Post Reply Post New Topic
Author Message
sireev
Newbie
Newbie


Joined: 11 Feb 2009
Online Status: Offline
Posts: 4
Quote sireev Replybullet Topic: Having a problem with a formula.
    Posted: 11 Feb 2009 at 10:19am
Hi,
 
I have a formula as follows
 
{V_SERVICE_REQUEST_PART_TRACKER.DATE_CLOSED} >= {?From} and
{V_SERVICE_REQUEST_PART_TRACKER.DATE_CLOSED} <= {?To} and
if {?Site} <> "All" then
    {V_SERVICE_REQUEST_PART_TRACKER.SITE} = {?Site}
    else 1=1 and
if {?SR Status} <> "All" then
   {V_SERVICE_REQUEST_PART_TRACKER.SR_STATUS} = {?SR Status}
   else 1=1 and
If {?Part Number} <> "All" then
   {V_SERVICE_REQUEST_PART_TRACKER.PART_NUM_PART_TRACKER} = {?Part Number}
   else 1=1
 
On a crystal report where V_SERVICE_REQUEST_PART_TRACKER is a oracle view.When I run the report to display information for a particular Part Number which I provide as a parmaeter at run-time,it does not show the information.I am unable to understand why.
 
When I say Show SQL it shows me the following
 
SELECT
    V_SERVICE_REQUEST_PART_TRACKER."SR_NUM", V_SERVICE_REQUEST_PART_TRACKER."JBA_JOB_NUM", V_SERVICE_REQUEST_PART_TRACKER."DATE_CLOSED", V_SERVICE_REQUEST_PART_TRACKER."DATE_CREATED", V_SERVICE_REQUEST_PART_TRACKER."SVR_JOB_CAT", V_SERVICE_REQUEST_PART_TRACKER."FIN_JOB_CAT", V_SERVICE_REQUEST_PART_TRACKER."SR_STATUS", V_SERVICE_REQUEST_PART_TRACKER."PART_NUM", V_SERVICE_REQUEST_PART_TRACKER."SR_ASSET_SERIAL_NUM", V_SERVICE_REQUEST_PART_TRACKER."ACCOUNT_NAME", V_SERVICE_REQUEST_PART_TRACKER."SITE", V_SERVICE_REQUEST_PART_TRACKER."ACCOUNT_COUNTRY", V_SERVICE_REQUEST_PART_TRACKER."ACCOUNT_PARENT_SERVICE_REGION", V_SERVICE_REQUEST_PART_TRACKER."ACTIVITY_TYPE", V_SERVICE_REQUEST_PART_TRACKER."ACTIVITY_STATUS", V_SERVICE_REQUEST_PART_TRACKER."ACTIVITY_OWNER", V_SERVICE_REQUEST_PART_TRACKER."BILLABLE_FLAG", V_SERVICE_REQUEST_PART_TRACKER."ENGINEER_CODE", V_SERVICE_REQUEST_PART_TRACKER."PART_NUM_PART_TRACKER", V_SERVICE_REQUEST_PART_TRACKER."PART_DESC_PART_TRACKER", V_SERVICE_REQUEST_PART_TRACKER."QTY", V_SERVICE_REQUEST_PART_TRACKER."SOURCE", V_SERVICE_REQUEST_PART_TRACKER."DESTINATION", V_SERVICE_REQUEST_PART_TRACKER."PART_LIST_PRICE", V_SERVICE_REQUEST_PART_TRACKER."SR_SUB_STATUS"
FROM
    "SIEBEL"."V_SERVICE_REQUEST_PART_TRACKER" V_SERVICE_REQUEST_PART_TRACKER   
WHERE
    V_SERVICE_REQUEST_PART_TRACKER."DATE_CLOSED" >= {ts '2009-01-01 00:00:00.00'} AND
    V_SERVICE_REQUEST_PART_TRACKER."DATE_CLOSED" < {ts '2009-02-11 00:00:00.00'} AND       V_SERVICE_REQUEST_PART_TRACKER."SR_STATUS" = 'Closed'   
ORDER BY
    V_SERVICE_REQUEST_PART_TRACKER."PART_NUM" ASC,
    V_SERVICE_REQUEST_PART_TRACKER."SR_ASSET_SERIAL_NUM" ASC,
    V_SERVICE_REQUEST_PART_TRACKER."DATE_CLOSED" ASC,
    V_SERVICE_REQUEST_PART_TRACKER."PART_NUM_PART_TRACKER" ASC
 
It is not picking up the Part number part of the formula.can someone help me understand why?
 
Thank you,
Sireesha.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 12 Feb 2009 at 6:39am
bit odd of a formula, does this work any better?
 
IF
{V_SERVICE_REQUEST_PART_TRACKER.DATE_CLOSED} >= {?From} and
{V_SERVICE_REQUEST_PART_TRACKER.DATE_CLOSED} <= {?To} THEN
if {?Site} <> "All" then
    {V_SERVICE_REQUEST_PART_TRACKER.SITE} = {?Site}
ELSE//    else 1=1 and
if {?SR Status} <> "All" then
   {V_SERVICE_REQUEST_PART_TRACKER.SR_STATUS} = {?SR Status}
   else //1=1 and
If {?Part Number} <> "All" then
   {V_SERVICE_REQUEST_PART_TRACKER.PART_NUM_PART_TRACKER} = {?Part Number}
   //else 1=1
 
hope this helps
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.014 seconds.