库存报告格式 [英] formatting of stock report
问题描述
朋友您好,我正在准备一个项目的库存报告.
目前是这样的
[日期] [期初库存] [发送数量] [需求数量] [期末库存]
2012年4月1日22 4 18
2012年4月1日18 10 28
2012年4月2日28 6 22
2012年4月2日22100122
但它应该像这样显示
Hello friends i am preparing stock report in a project.
currently it is like this
[date] [opening stock] [sent qty] [ rec qty] [ closing stock]
1 april 2012 22 4 18
1 april 2012 18 10 28
2 april 2012 28 6 22
2 april 2012 22 100 122
but it should display like this
[date] [opening stock] [sent qty] [ rec qty] [ closing stock]
2012年4月1日22 4---
------------ --- ---- 10 28
2012年4月2日28 6 ---- ----
------------- ---- ----- 100122
(此处期初存货,期末存货不应重复一个日期.)
朋友,您能帮我在gridview中以正确的格式显示数据吗?
在此先感谢朋友
1 april 2012 22 4 --- --
------------ --- ---- 10 28
2 april 2012 28 6 ---- ----
------------- ---- ----- 100 122
(Here opening stock, closing stock should not repeat for a single date.)
friends can you please help me in showing data in correct format in gridview
thanks in advance friends
推荐答案
尝试以下查询:-
try below query:-
select dt, opening_stock, sent_qty, rec_qty, closing_stock from (
select dt, opening_stock, sent_qty, null rec_qty, null closing_stock ,dt as dt1 from users
union all
select null dt, null opening_stock, null sent_qty, rec_qty, closing_stock , dt as dt1 from users
) a
order by dt1
*您的[日期]字段位于此处
现在您可以将其绑定到gridview..
*your [date] field is dt here
now you can bind it to gridview..
这篇关于库存报告格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!