I am using Sage 50 (Peachtree) Quantum 2013, Crystal Reports 2008 and PSQL is the database engine.
I am designing a report to show Units Sold for Inventory Items for a specific date range and Units sold for Inventory Items Last Year (which is specific date range less one year).
I am getting an error in my formula for Last Year's Units Sold:
IF {JrnlRow.RowDate} >= dateSERIAL(YEAR({@BEG DATE})-1, MONTH({@BEG DATE}),DAY({@BEG DATE}))
OR IF {JrnlRow.RowDate} <= dateSERIAL(YEAR({@END DATE})-1, MONTH({@END DATE}),DAY({@END DATE}))
then {@Units Sold In Liters}
The error is: the keyword "then" is missing
Can someone tell me what is wrong with the formula? Am I missing a parenthesis somewhere?
I want to show the Item ID, Item Description, Units Sold, Units Sold in Liters for two time periods.
The first time period is the date range entered by the user ({?Date Range}) and the second time period is for a year ago from date range entered by the user.
For example:
UNITS SOLD JAN 1, 2012 through JUN 30, 2012 vs UNITS SOLD JAN 1, 2011 through JUN 30, 2011
ITEM ID ITEM DESCRIPTION UNITS SOLD LITERS SOLD ITEM ID ITEM DESCRIPTION UNITS SOLD LITERS SOLD
A OIL 10 100 A OIL 5 50
B GREASE 1 1 B GREASE 0 0
C ULTRA SYN 14 265 C ULTRA SYN 18 341
I have a parameter for the report date range {?Date Range} where the user enters a starting date and a ending date.
My record selection is:
{JrnlRow.RowDate} = {?Date Range} or {JrnlRow.RowDate} >= DATESERIAL(YEAR({@BEG DATE})-1,MONTH({@BEG DATE}),DAY({@END DATE}))
AND {JrnlRow.RowDate} >= DATESERIAL(YEAR({@END DATE})-1,MONTH({@END DATE}),DAY({@END DATE}))
{@BEG DATE} = Minimum({?Date Range})
{@END DATE} = Maximum({?Date Range})
Thank you for your help.
I am designing a report to show Units Sold for Inventory Items for a specific date range and Units sold for Inventory Items Last Year (which is specific date range less one year).
I am getting an error in my formula for Last Year's Units Sold:
IF {JrnlRow.RowDate} >= dateSERIAL(YEAR({@BEG DATE})-1, MONTH({@BEG DATE}),DAY({@BEG DATE}))
OR IF {JrnlRow.RowDate} <= dateSERIAL(YEAR({@END DATE})-1, MONTH({@END DATE}),DAY({@END DATE}))
then {@Units Sold In Liters}
The error is: the keyword "then" is missing
Can someone tell me what is wrong with the formula? Am I missing a parenthesis somewhere?
I want to show the Item ID, Item Description, Units Sold, Units Sold in Liters for two time periods.
The first time period is the date range entered by the user ({?Date Range}) and the second time period is for a year ago from date range entered by the user.
For example:
UNITS SOLD JAN 1, 2012 through JUN 30, 2012 vs UNITS SOLD JAN 1, 2011 through JUN 30, 2011
ITEM ID ITEM DESCRIPTION UNITS SOLD LITERS SOLD ITEM ID ITEM DESCRIPTION UNITS SOLD LITERS SOLD
A OIL 10 100 A OIL 5 50
B GREASE 1 1 B GREASE 0 0
C ULTRA SYN 14 265 C ULTRA SYN 18 341
I have a parameter for the report date range {?Date Range} where the user enters a starting date and a ending date.
My record selection is:
{JrnlRow.RowDate} = {?Date Range} or {JrnlRow.RowDate} >= DATESERIAL(YEAR({@BEG DATE})-1,MONTH({@BEG DATE}),DAY({@END DATE}))
AND {JrnlRow.RowDate} >= DATESERIAL(YEAR({@END DATE})-1,MONTH({@END DATE}),DAY({@END DATE}))
{@BEG DATE} = Minimum({?Date Range})
{@END DATE} = Maximum({?Date Range})
Thank you for your help.