mravimtnl
MIS
- Nov 1, 2009
- 47
Dear all
I have various formulas based on two fileds udfnum.un_udfgen_id and udfnum. The table of the fields are like this.
Udf gen ID UN Nmber
1
2
...
...
53 contains 1, 0, or null
54 contains 1, 0, or null
55 contains 1, 0, or null
I have limited my record selction on 53 and 54. However crystal is showing only where there is data entered i.e either 1 or 0 fileds and blak fields where ther is no data is not being displyed. But i want all the data irrecspective of wheher data is entered or not.
I have already tried he following, made null values to default values in report options, made left out joins and all combinations of joins etc.
SQL is given below for your perusal:
SELECT
xaction."x_hist_type", xaction."x_term_name", xaction."x_timestamp",
badge."b_number_str",
cardholder."c_fname",
company."company_name",
udfboolean."ub_udfgen_id", udfboolean."ub_boolean",
udfnum."un_udfgen_id", udfnum."un_number"
FROM
{ oj (((("Pegasys"."dbo"."xaction" xaction INNER JOIN "Pegasys"."dbo"."badge" badge ON
xaction."x_badge_number" = badge."b_number_str")
INNER JOIN "Pegasys"."dbo"."cardholder" cardholder ON
badge."b_cardholder_id" = cardholder."c_id")
INNER JOIN "Pegasys"."dbo"."udfboolean" udfboolean ON
cardholder."c_id" = udfboolean."ub_cardholder_id")
INNER JOIN "Pegasys"."dbo"."udfnum" udfnum ON
cardholder."c_id" = udfnum."un_cardholder_id")
INNER JOIN "Pegasys"."dbo"."company" company ON
cardholder."c_company_id" = company."company_id"}
WHERE
xaction."x_timestamp" >= {ts '2011-06-01 00:00:00.00'} AND
xaction."x_timestamp" < {ts '2011-07-01 00:00:00.00'} AND
(xaction."x_hist_type" <> 33 AND
xaction."x_hist_type" <> 35 AND
xaction."x_hist_type" <> 37) AND
udfboolean."ub_boolean" = 1 AND
(udfboolean."ub_udfgen_id" = 17 OR
udfboolean."ub_udfgen_id" = 18 OR
udfboolean."ub_udfgen_id" = 19 OR
udfboolean."ub_udfgen_id" = 20 OR
udfboolean."ub_udfgen_id" = 55) AND
(udfnum."un_udfgen_id" = 53 OR
udfnum."un_udfgen_id" = 54)
ORDER BY
company."company_name" ASC,
badge."b_number_str" ASC
I have various formulas based on two fileds udfnum.un_udfgen_id and udfnum. The table of the fields are like this.
Udf gen ID UN Nmber
1
2
...
...
53 contains 1, 0, or null
54 contains 1, 0, or null
55 contains 1, 0, or null
I have limited my record selction on 53 and 54. However crystal is showing only where there is data entered i.e either 1 or 0 fileds and blak fields where ther is no data is not being displyed. But i want all the data irrecspective of wheher data is entered or not.
I have already tried he following, made null values to default values in report options, made left out joins and all combinations of joins etc.
SQL is given below for your perusal:
SELECT
xaction."x_hist_type", xaction."x_term_name", xaction."x_timestamp",
badge."b_number_str",
cardholder."c_fname",
company."company_name",
udfboolean."ub_udfgen_id", udfboolean."ub_boolean",
udfnum."un_udfgen_id", udfnum."un_number"
FROM
{ oj (((("Pegasys"."dbo"."xaction" xaction INNER JOIN "Pegasys"."dbo"."badge" badge ON
xaction."x_badge_number" = badge."b_number_str")
INNER JOIN "Pegasys"."dbo"."cardholder" cardholder ON
badge."b_cardholder_id" = cardholder."c_id")
INNER JOIN "Pegasys"."dbo"."udfboolean" udfboolean ON
cardholder."c_id" = udfboolean."ub_cardholder_id")
INNER JOIN "Pegasys"."dbo"."udfnum" udfnum ON
cardholder."c_id" = udfnum."un_cardholder_id")
INNER JOIN "Pegasys"."dbo"."company" company ON
cardholder."c_company_id" = company."company_id"}
WHERE
xaction."x_timestamp" >= {ts '2011-06-01 00:00:00.00'} AND
xaction."x_timestamp" < {ts '2011-07-01 00:00:00.00'} AND
(xaction."x_hist_type" <> 33 AND
xaction."x_hist_type" <> 35 AND
xaction."x_hist_type" <> 37) AND
udfboolean."ub_boolean" = 1 AND
(udfboolean."ub_udfgen_id" = 17 OR
udfboolean."ub_udfgen_id" = 18 OR
udfboolean."ub_udfgen_id" = 19 OR
udfboolean."ub_udfgen_id" = 20 OR
udfboolean."ub_udfgen_id" = 55) AND
(udfnum."un_udfgen_id" = 53 OR
udfnum."un_udfgen_id" = 54)
ORDER BY
company."company_name" ASC,
badge."b_number_str" ASC