选择水晶报表中条件所在的数据 [英] selecting data with where condition in crystal report

查看:75
本文介绍了选择水晶报表中条件所在的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我正在从单个表中获取BankBook的数据,我在tbl_BankBook中有一个状态列,其状态类似于收入"或支出",当我尝试根据状态列显示数据时卡住了.

我有一些名称,例如日期,详细信息,银行金额(cr),金额(dr)的列.

我想根据状态(收入/费用)列将数据放入金额列.
我是通过抑制属性来实现的,代码:-如果{tbl_Bank_Book.Status} =''Expenditure'',则为true

我想根据状态对两个金额列实施总和功能.我不能总结.它显示总计
总和不符合状态列.

问候,
Arshad

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

推荐答案

很快又很脏:

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



检查PIVOT查询

干杯



Check up on PIVOT queries

Cheers


我解决了我的问题,谢谢所有帮助我的人.
我通过使用公式使用运行总感觉".
i solved my problem, thank you all guys who helped me.
i used Running total Feild by using a formula.


这篇关于选择水晶报表中条件所在的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆