1
我正在創建會計系統。但我有麻煩創建試算平衡。所以我發現這個存儲過程從互聯網,可以使軌跡平衡但麻煩是,我可以如何使用這種類型的存儲產品使用Visual Studio 2008 4.0 net c#進行水晶報告。因爲在這個存儲過程表創建和一些數據插入牆壁使用存儲過程聲明表中的水晶報表2008
USE [data_base]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[gettrial]
@startdate datetime,
@enddate datetime
AS
declare @tab1 table
(
debit decimal(18,2),
credit decimal(18,2),
account varchar(20),
balance decimal(18,2),
accountname varchar(50)
)
insert into @tab1
select sum(dr),sum(cr),jdetail.accountno,sum(dr)-sum(cr),accountname
from jdetail
join account on account.accountno=jdetail.accountno
where date>[email protected] and date<[email protected]
group by jdetail.accountno,account.accountname
select accountname as 'AccountTitle' ,account as 'Account No.',
'Debit'=case when sign(balance)=1
then balance
end,
'Credit'=case when sign(balance)=-1
then balance*-1
end
from @tab1
--where balance<>0
ORDER BY 'Credit','Debit' asc
您是否有示例項目... – user1889089