Ciao, quando creo un report, gestisco i campi del dataset nel report tramite un codice del tipo
<DataSets>
<DataSet Name="Documento">
<Query>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
<CommandText />
<DataSourceName>Contact</DataSourceName>
</Query>
<Fields>
<Field Name="IDFattura">
<rd:TypeName>System.String</rd:TypeName>
<DataField>IDFattura</DataField>
</Field>
<Field Name="IDEstrattoConto">
<rd:TypeName>System.String</rd:TypeName>
<DataField>IDEstrattoConto</DataField>
</Field>
<Field Name="IDCliente">
<rd:TypeName>System.String</rd:TypeName>
<DataField>IDCliente</DataField>
</Field>
<Field Name="DescrizioneAliquota">
e nel codice
LocalReport rptReport = ReportViewer1.LocalReport;
string nomeFile = "Reports\\FT.rdlc";
string filePath = Path.Combine(Request.PhysicalApplicationPath, nomeFile);
rptReport.ReportPath = filePath;
dataSet = msnHelper.DataHelper.GetFattura(sqlConnection, IDFattura);
ReportDataSource reportDataSource = new ReportDataSource();
reportDataSource.Name = "Documento";
reportDataSource.Value = dataSet.Tables[0];
ReportViewer1.LocalReport.Refresh();
ReportViewer1.LocalReport.DataSources.Clear();
ReportViewer1.LocalReport.DataSources.Add(reportDa taSource);
ReportViewer1.DataBind();
come posso inserire una nuova tabella nel mio report che venga alimentata da una sorgente diversa... non dal dataSet.Tables[0] ma da un nuovo datatale (aggiuntivo)? Cosa devo modificare nel codice del report (prima porzione di codice postata) e nel codice C# (seconda porzione postata)
Grazie a tutti
Grazie


Rispondi quotando