Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CR9 -- problem with Command Object Parameters

Status
Not open for further replies.

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??


 
Found the solution -- File -> Options -> Fields -> Number one machine had commas enabled and that was causing my formula to not recognize the number as a number.

There was no error of any kind generated because of this in Crystal Reports 9.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top