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 view to select the following data
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 specifing the begin dates and end dates (Jan-date) I should display the current year's amount and previous year's amount and difference alongside each other. How do i achieve this?
e.g account Desc current Year previous Year Diff
Beef 120 100 20
Chicken 200 175 25
2. How do I build a formula that is able to separate income amounts from expenses amounts and show the SUMS of the two in different lines
e.g
current Year previous Year Diff
INCOME: Beef 12,000 10,000 2,000
EXPENSES: Beef 5,000 4,000 1,000
Currently am using an IF statement that doesn't work
IF {table.Account}like "61110*" then SUM({table.amount}) else 0
--the IF returns the whole SUM of both incomes & expenses yet i want total of INCOMES alone!
3. The dates in my view are currently hard-wired (jan-date). How do i make it dynamic to allow users select the start date and end dates and still display current year and previous year's data as described above?
Please assist
MIKE
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 view to select the following data
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 specifing the begin dates and end dates (Jan-date) I should display the current year's amount and previous year's amount and difference alongside each other. How do i achieve this?
e.g account Desc current Year previous Year Diff
Beef 120 100 20
Chicken 200 175 25
2. How do I build a formula that is able to separate income amounts from expenses amounts and show the SUMS of the two in different lines
e.g
current Year previous Year Diff
INCOME: Beef 12,000 10,000 2,000
EXPENSES: Beef 5,000 4,000 1,000
Currently am using an IF statement that doesn't work
IF {table.Account}like "61110*" then SUM({table.amount}) else 0
--the IF returns the whole SUM of both incomes & expenses yet i want total of INCOMES alone!
3. The dates in my view are currently hard-wired (jan-date). How do i make it dynamic to allow users select the start date and end dates and still display current year and previous year's data as described above?
Please assist
MIKE