Sql 将多个datatable绑定到DataSet.xsd中

Sql 将多个datatable绑定到DataSet.xsd中,sql,stored-procedures,reporting-services,Sql,Stored Procedures,Reporting Services,我使用Reportviewer工具,在存储过程中使用for循环,它返回多个表,如何将这些多个表列绑定到dataset.xsd页面?有人能帮忙吗 cmd.CommandText=SP_Name cmd.CommandType=CommandType.storedProcess cmd.Parameters.AddWithValue(“@ddo\u code”,ddldocode.SelectedValue) cmd.Connection=con con.Open() SqlDataAdapter

我使用Reportviewer工具,在存储过程中使用for循环,它返回多个表,如何将这些多个表列绑定到dataset.xsd页面?有人能帮忙吗

cmd.CommandText=SP_Name
cmd.CommandType=CommandType.storedProcess
cmd.Parameters.AddWithValue(“@ddo\u code”,ddldocode.SelectedValue)
cmd.Connection=con
con.Open()
SqlDataAdapter da=newsqldataadapter(cmd)![SP返回的表格字段未显示][1]
DataSet ds=新数据集()
da.Fill(ds)
int Count=ds.Tables.Count
用于(int i=0;i

{

DataTable dt=newdatatable();

dt=ds.表[i];

RV_SalDetails.LocalReport.ReportEmbeddedResource=“ReportView.Report_Sal_Det.rdlc”

RV_SalDetails.LocalReport.DataSources.Add(新的Microsoft.Reporting.WebForms.ReportDataSource(“DataSet_Sal”,dt));


}

需要更多信息,以便正确回答我正在处理报告过程。。如果我的SP返回单表,那么我可以在DataSet.xsd页面上绑定它,然后在reportviewer控件上绑定它,这样我就可以在asp页面上查看输出。现在,我的SP返回多个数据表。但是我无法将数据表分配到我的DataSet.xsd页面。因此,我的报表查看器控件不显示任何内容,它显示尚未为数据源“DataSet_sal”提供数据源实例。请帮助..您使用的是什么报表查看器?是否有您使用的应用程序?如果是,是什么语言?我认为您的多模块表将在报告中显示多模块值,即按国家划分的总销售额,按男性客户划分的总销售额。如果是,则取决于您使用的报表查看器取决于如何操作。示例有些需要简单的数据源连接,您可以将它们绑定到报表上的每个控件等。有些我认为还需要报表上的子报表,以便允许多模块数据源。我正在尝试使用Asp.net ReportViewer控件和c#编码来显示报表。好的,您有什么样的示例代码吗?如果是这样的话,请编辑你的帖子,我们可以看看你到目前为止都做了些什么