chrislarkin
Programmer
- Jun 5, 2001
- 31
Hi,
I have a command object that looks something like:
SELECT
*
FROM
lawdbf7.JB242_V
where
showend_date_numeric < dbglt_posting_date
and left(digits(dbglt_account),3) = '014'
and dbglt_fiscal_year ={?FISCAL_YEAR}
and dbglt_acct_period = {?PERIOD}
---------------
Then I have a formula that uses the parameters:
beforereadingrecords;
StringVar monthend :=
switch
({?period} = 1, '0731',
{?period} = 2, '0831',
{?period} = 3, '0930',
{?period} = 4, '1031',
{?period} = 5, '1130',
{?period} = 6, '1231',
{?period} = 7, '0131',
{?period} = 8, '0229', //valid leap or non-leap year
{?period} = 9, '0331',
{?period} = 10, '0430',
{?period} = 11, '0531',
{?period} = 12, '0630',
True, '9999');
NumberVar actualyear :=
switch
({?period} <= 6, {?fiscal_year} - 1,
{?period} > 6, {?fiscal_year});
ToNumber (ToText(actualyear) & monthend)
------------
This report works on my machine, but on all other machines, no records are selected.
If I login elsewhere, same result (no records).
The formula only works when on my machine logged in as me.
Any ideas??
I have a command object that looks something like:
SELECT
*
FROM
lawdbf7.JB242_V
where
showend_date_numeric < dbglt_posting_date
and left(digits(dbglt_account),3) = '014'
and dbglt_fiscal_year ={?FISCAL_YEAR}
and dbglt_acct_period = {?PERIOD}
---------------
Then I have a formula that uses the parameters:
beforereadingrecords;
StringVar monthend :=
switch
({?period} = 1, '0731',
{?period} = 2, '0831',
{?period} = 3, '0930',
{?period} = 4, '1031',
{?period} = 5, '1130',
{?period} = 6, '1231',
{?period} = 7, '0131',
{?period} = 8, '0229', //valid leap or non-leap year
{?period} = 9, '0331',
{?period} = 10, '0430',
{?period} = 11, '0531',
{?period} = 12, '0630',
True, '9999');
NumberVar actualyear :=
switch
({?period} <= 6, {?fiscal_year} - 1,
{?period} > 6, {?fiscal_year});
ToNumber (ToText(actualyear) & monthend)
------------
This report works on my machine, but on all other machines, no records are selected.
If I login elsewhere, same result (no records).
The formula only works when on my machine logged in as me.
Any ideas??