Hi there,
Am stuck with a major financial reports and need some technical assistance:
Crystal version: 8.5
Database and connectivity: SQL Server
Sample data:
Am using a Sequel view to select the following data
Date, Account No, Account Desc, Amounts
The SQL view is able to return both income amounts and expenses amounts. The main difference between the incomes and the expenses is the account No. (incomes are '61110*' while expenses are '61190*')
Expected output:
I need to achieve the following.
1. By a user specifing the begin dates and end dates i.e.(Sept 2004 - March 2005 or to any date) I should display the current reporting year's amount (sept04 -March05) and previous year's amount (sept03 -March04) and difference alongside each other. How do i achieve this?
SAMPLE OUTPUT...
(Sept04-march05) (sept03-march04)
Current Year Previous Year Diff
INCOME: Beef 12,000 10,000 2,000
EXPENSES: Beef 5,000 4,000 1,000
Ps: Currently am using a record selection formula and record selection that works only from Jan05 -march05 ( gives all values for 2004 and 2003 as NULL)
{?sdate} = parameter name of start date
{?edate} = parameter name of end date
current record selection formula...
(
(
{table.date} in [dateserial(year({?sdate}),
month({?sdate}),
1) to
dateserial(Year({?edate)),
Month({?edate})+1,
1-1)
) or
(
{table.date} in [dateserial(year({?sdate})-1,
month({?sdate}),
1) to
dateserial(Year({?edate))-1,
Month({?edate})+1,
1-1)
)
)
.. and my formulas are:
YTD AMOUNT
if {table.date} in YearToDate and {table.date} <Minimum(MonthToDate) then {table.amount} else 0
LYTD AMOUNT
if {table.date} in LastYearYTD and {table.date} <Minimum(LastYearMTD) then {table.amount}else 0
Please assist!
Am stuck with a major financial reports and need some technical assistance:
Crystal version: 8.5
Database and connectivity: SQL Server
Sample data:
Am using a Sequel view to select the following data
Date, Account No, Account Desc, Amounts
The SQL view is able to return both income amounts and expenses amounts. The main difference between the incomes and the expenses is the account No. (incomes are '61110*' while expenses are '61190*')
Expected output:
I need to achieve the following.
1. By a user specifing the begin dates and end dates i.e.(Sept 2004 - March 2005 or to any date) I should display the current reporting year's amount (sept04 -March05) and previous year's amount (sept03 -March04) and difference alongside each other. How do i achieve this?
SAMPLE OUTPUT...
(Sept04-march05) (sept03-march04)
Current Year Previous Year Diff
INCOME: Beef 12,000 10,000 2,000
EXPENSES: Beef 5,000 4,000 1,000
Ps: Currently am using a record selection formula and record selection that works only from Jan05 -march05 ( gives all values for 2004 and 2003 as NULL)
{?sdate} = parameter name of start date
{?edate} = parameter name of end date
current record selection formula...
(
(
{table.date} in [dateserial(year({?sdate}),
month({?sdate}),
1) to
dateserial(Year({?edate)),
Month({?edate})+1,
1-1)
) or
(
{table.date} in [dateserial(year({?sdate})-1,
month({?sdate}),
1) to
dateserial(Year({?edate))-1,
Month({?edate})+1,
1-1)
)
)
.. and my formulas are:
YTD AMOUNT
if {table.date} in YearToDate and {table.date} <Minimum(MonthToDate) then {table.amount} else 0
LYTD AMOUNT
if {table.date} in LastYearYTD and {table.date} <Minimum(LastYearMTD) then {table.amount}else 0
Please assist!