Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I am fetching data from a single table for BankBook, I have a status column in the tbl_BankBook where status is like 'Income' or 'expenditure', got stuck when I am trying to display data according to my status column.

I have columns having name like date, particulars, bank amount(cr), amount(dr).

I want to place data according to status(Income / expense) column in amount column .
i did it by suppress property , code:- if {tbl_Bank_Book.Status}='Expenditure' then true

i want to implement sum funtion for both amount column according to status. i am failed to sum. it is displaying total
sum not according to status column.

Regards,
Arshad
Posted
Updated 23-Jan-11 21:00pm
v3
Comments
thatraja 22-Jan-11 3:02am    
Confusing little bit, Do you mean hide the section(income/expenditure) based on status column value? can you attach screenshot or link of the report in your question? It will help you to get the solution quickly.
arshad alam 22-Jan-11 5:19am    
i want to like balance sheet
arshad alam 22-Jan-11 5:19am    
opp, i meant to show like a balance sheet
Chris Maunder 22-Jan-11 6:55am    
Far better to just edit your original comment than repost a new one.
arshad alam 24-Jan-11 3:03am    
check it once more.. i have modified...

Very quick and dirty :

Select tbl_BankBook.Amount as Expenditure , 0 as Income from tbl_BankBook where tbl_BankBook.Status = 'Expenditure'
UNION
Select 0 as Expenditure , tbl_BankBook.Amount as Income from tbl_BankBook where tbl_BankBook.Status = 'Income'


Check up on PIVOT queries

Cheers
 
Share this answer
 
v2
Comments
arshad alam 24-Jan-11 3:51am    
where to write this code ??
Estys 24-Jan-11 4:42am    
This would be the query to fetch the data. You could add the SUM() function to it if you like.
i solved my problem, thank you all guys who helped me.
i used Running total Feild by using a formula.
 
Share this answer
 
Comments
Member 10986425 19-Dec-14 13:47pm    
please tell me formula....hows this poossible

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900