我有一个存储过程select * from book table,使用子查询我的查询是
USE [library]
GO
/****** Object: StoredProcedure [dbo].[report_r_and_l] Script Date: 04/17/2013 12:42:39 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[report_r_and_l]
@fdate date,
@tdate date,
@key varchar(1)
as
if(@key='r')
select *
from dbo.books
where isbn =(select isbn from dbo.lending where (act between @fdate and @tdate) and (stat ='close'))
else if(@key='l')
select *
from dbo.books
where isbn =(select isbn from dbo.lending where lended_date between @fdate and @tdate)
Run Code Online (Sandbox Code Playgroud)
我知道子查询返回多个查询到主查询,但我不知道如何避免这个错误,任何人都可以帮助我吗?
朋友们,我用c#开发了一个简单的应用程序,它有两个rdlc报告
我使用下面的代码将数据源绑定到报表查看器
this.reportViewer1.LocalReport.ReportPath = @"C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\reports\reports\Report1.rdlc";
reportViewer1.LocalReport.DataSources.Clear();
reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("customer", dt.Tables[0])) ;
this.reportViewer1.RefreshReport();
Run Code Online (Sandbox Code Playgroud)
但是当报告生成时,它是空的报告没有数据显示,任何意见???