VS 2010本地报告中的数据集,表和数据源名称 [英] Dataset, Table and DataSource Names in VS 2010 Local Reporting
问题描述
你好, 我的问题是我无法在报告中显示值。我似乎不明白在哪里放什么名称,数据集或来源。 我有一个由XSD定义的数据集,该数据集添加到项目中,如下所示: < xs: element name =" Dataset_CR" MSDATA:IsDataSet = QUOT;真" msdata:Locale =" en-US"> &NBSP; < xs:element name =" Angebote"> 该应用程序称为Ikarus数据集"Dataset_CR"。我要读出的表格是"Angebote"。 现在来自rdlc的XML片段: < DataSources> < span style ="font-size:small">
...
< xs:complexType>
< xs:choice minOccurs =" 0" maxOccurs =" unbounded">
...
< DataSource Name =" IKARUS">
;&NBSP;&NBSP;&NBSP;&NBSP;
< ConnectionProperties>
&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; &NBSP; 跨度>< DataProvider的> System.Data.DataSet中< / DataProvider的> 跨度> 跨度> 跨度>
;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; < ConnectString> / *
本地连接* /< / ConnectString>
;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;
< / ConnectionProperties>
  ;&NBSP;
跨度>< RD:的DataSourceID> 569a2a27-a7ae-4579-aef4-2481af0b1ed6< / RD:的DataSourceID> 跨度> 跨度> 跨度>
< p style ="margin:0cm 0cm 0pt"> &NBSP;&NBSP;
< / DataSource>
< / DataSources>
< span style ="font-size:small; color:#000000; font-family:Times New Roman">< DataSet>
< DataSet Name =" Angebote">
;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;
<字段>
...
< rd:DataSetInfo>
<查询>
&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; &NBSP;&NBSP; &NBSP;<的datasourcename> IKARUS< /的datasourcename>
&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; <的CommandText> / *本地查询* /< /的CommandText>
&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ; < /查询>
&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;< RD:DataSetInfo>
&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; < RD:的DataSetName> Dataset_CR< / RD:的DataSetName>
&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; < RD:表名> Angebote< / RD:表名>
&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; &NBSP;< RD:ObjectDataSourceSelectMethod> Angebote< / RD:ObjectDataSourceSelectMethod>
&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; < RD:ObjectDataSourceType> IKARUS.Dataset_CR,Berichte.Datasets.Dataset_CR.Designer.vb,版本= 0.0.0.0,文化=中性公钥=空< / RD:ObjectDataSourceType>
&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; < / rd:DataSetInfo>
< / DataSet>
< / DataSets>
在报告数据字段中尝试创建数据集的向导时,我选择表格"Angebote"的名称作为名称;并且在"可用数据集"中field
then"Dataset_CR(Angebote)。
形式:
<跨度风格=" 颜色:#000000 "> <跨度风格=" font-family:Times New Roman字体"> <跨度>&NBSP; 跨度>昏暗RD作为新Microsoft.Reporting.WinForms.ReportDataSource(QUOT ; Angebote",Dset.Tables(0))
rds.Name =" IKARUS"
ReportViewer1.LocalReport.DataSources.Add(rds)
有些人可能会指出我在做错的方向。数据集肯定是填充的,因为我可以用另一种方法生成报告。
感谢您提前帮助。
最大
编辑:对不起格式化问题
如果有人知道在本地模式下使用VS Reporting Services并且数据集未直接从SQL Server填充的良好教程,那么它也会帮助我,甚至可以解决我的问题。
我看起来很好,但只找到适合我的情况的教程。
提前Thx
Max
Hello, My problem is that i cant values to show in my report. It seems i dont understand where to put what name of what table, Dataset or Source. I have a an dataset defined by an XSD that is added to the project looking like this: <xs:element name="Dataset_CR" msdata:IsDataSet="true" msdata:Locale="en-US">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element name="Angebote"> The application is called Ikarus the data set "Dataset_CR" and the table i want to read out is "Angebote". Now a XML snippet from the rdlc: <DataSources>
<DataSource Name="IKARUS">
<ConnectionProperties> <DataProvider>System.Data.DataSet</DataProvider> <ConnectString>/*
Local Connection */</ConnectString>
</ConnectionProperties>
<rd:DataSourceID>569a2a27-a7ae-4579-aef4-2481af0b1ed6</rd:DataSourceID>
</DataSource> </DataSources> <DataSets>
<DataSet Name="Angebote">
<Fields> ...
<rd:DataSetInfo> When trying the wizard for dataset creation in the report data field i select as name the name of the table "Angebote" and in the "available datasets" field
then "Dataset_CR (Angebote). In the form: Dim rds As New Microsoft.Reporting.WinForms.ReportDataSource("Angebote", Dset.Tables(0)) rds.Name = "IKARUS" Could some point me in the direction of what i am doing wrong. The dataset is definatly filled as i can generate a report with another method. Thanks for helping, in advance. EDIT: Sorry for formating problems
...
...
<Query>
<DataSourceName>IKARUS</DataSourceName>
<CommandText>/* Local Query */</CommandText>
</Query>
<rd:DataSetInfo>
<rd:DataSetName>Dataset_CR</rd:DataSetName>
<rd:TableName>Angebote</rd:TableName>
<rd:ObjectDataSourceSelectMethod>Angebote</rd:ObjectDataSourceSelectMethod>
<rd:ObjectDataSourceType>IKARUS.Dataset_CR, Berichte.Datasets.Dataset_CR.Designer.vb, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</rd:ObjectDataSourceType>
</rd:DataSetInfo>
</DataSet>
</DataSets>
ReportViewer1.LocalReport.DataSources.Add(rds)
Max
If someone knows a good tutorial for using VS Reporting Services in local mode with a dataset not filled directly from a SQL Server, it would also help me and maybe even solve my problem.
I looked arround but only found tutorials for situations that didn't fit me.
Thx in advance
Max
这篇关于VS 2010本地报告中的数据集,表和数据源名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!