reportviewer with 3 datatable in dataset's ?

I am in an impasse. I created a report from one dataSet which divided in 3 datatable, being that for example the Datatable = Operation Is related with the DataTable= Resource with a field = x and Datatable Operation the program Is related with another DataTable= Product of a field= y.

is perfect that I developed for caputura this perfect one as if follows:

// Captures the fields that I want for webservices

this._TempoDataSet = null; this._TempoDataSet = wsD.DB.Producao_Operacoes_List_Produ(cboCodigo.Text, Ambiente._Filial, Ambiente._Empresa);

/// iteration for population dataset
foreach (DataRow dop in this._TempoDataSet.Tables[0].Rows)
{

/// 1 dataTale population
myDataRow = produOperacoes1.TabProduOperaco.NewRow();
myDataRow["EMPRESA"] = Ambiente._Empresa;
myDataRow["G2_FILIAL"] = Ambiente._Filial;
myDataRow["G2_CODIGO"] = dop["G2_CODIGO"].ToString().Trim();
myDataRow["G2_PRODUTO"] = dop["G2_PRODUTO"].ToString().Trim();
myDataRow["G2_OPERAC"] = dop["G2_OPERAC"].ToString().Trim();
myDataRow["G2_RECURSO"] = dop["G2_RECURSO"].ToString().Trim();
myDataRow["G2_FERRAM"] = dop["G2_FERRAM"].ToString().Trim();
myDataRow["G2_LINHAPR"] = dop["G2_LINHAPR"].ToString().Trim();
myDataRow["G2_TPLINHA"] = dop["G2_TPLINHA"].ToString().Trim();
myDataRow["G2_DESCRI"] = dop["G2_DESCRI"].ToString().Trim();
myDataRow["G2_TPOPER"] = dop["G2_TPOPER"].ToString().Trim();
myDataRow["G2_CTRAB"] = dop["G2_CTRAB"].ToString().Trim();
myDataRow["G2_MAOOBRA"] = Convert.ToDouble(dop["G2_MAOOBRA"].ToString());
myDataRow["G2_SETUP"] = Convert.ToDouble(dop["G2_SETUP"].ToString());
myDataRow["G2_LOTEPAD"] = Convert.ToDouble(dop["G2_LOTEPAD"].ToString());
myDataRow["G2_TEMPAD"] = Convert.ToDouble(dop["G2_TEMPAD"].ToString());

produOperacoes1.TabProduOperaco.Rows.Add(myDataRow);

/// 2 DataTable
/// Find
DataRow[] foundRecurso = produOperacoes1.TabOpeRecur.Select("FILIAL ='" +
Ambiente._Filial.ToString() + "' and RECURSO ='" +
dop["G2_RECURSO"].ToString().Trim() + "'");
/// iteration case exist for population dataTable2

if (foundRecurso.LongLength == 0)
{
myDataRow1 = produOperacoes1.TabOpeRecur.NewRow();
myDataRow1["EMPRESA"] = Ambiente._Empresa;
myDataRow1["FILIAL"] = Ambiente._Filial;
myDataRow1["RECURSO"] = dop["G2_RECURSO"].ToString().Trim();
myDataRow1["G2_DESCRICAO"] = dop["DESCRECUR"].ToString().Trim();
produOperacoes1.TabOpeRecur.Rows.Add(myDataRow1);
}

/// 3 DataTable
/// Find in exist

DataRow[] foundProduto = produOperacoes1.TabProdRela.Select("B1_FILIAL ='"
+ Ambiente._Filial.ToString() + "' and B1_CODIGO ='" +
dop["G2_PRODUTO"].ToString().Trim() + "'");
/// iteration case for population dataTable3

if (foundRecurso.LongLength == 0)
{
myDataRow2 = produOperacoes1.TabProdRela.NewRow();
myDataRow2["EMPRESA"] = Ambiente._Empresa;
myDataRow2["B1_FILIAL"] = Ambiente._Filial;
myDataRow2["B1_CODIGO"] = dop["G2_PRODUTO"].ToString().Trim();
myDataRow2["B1_DESCRICAO"] = dop["B1_DESC"].ToString().Trim();
produOperacoes1.TabProdRela.Rows.Add(myDataRow2);
}

}

This is codigo that he is perfect:

Now it comes the impression:


reportViewer1.Visible = true;
string remoteUri = mendereco + "/wPlanCad/";
string fileName = "ProduOperacoes.xml", myStringWebResource =
null;
string fileName1 = "ProduOperacoes.xsd";
myStringWebResource = remoteUri + fileName;
produOperacoes1.WriteXml(Environment.GetEnvironmentVariable("TEMP") + "\\" +
fileName, XmlWriteMode.WriteSchema);

produOperacoes1.WriteXmlSchema(Environment.GetEnvironmentVariable("TEMP") +
"\\" + fileName1);

ProduOperacoes empDS = new ProduOperacoes();
empDS.ReadXml(Environment.GetEnvironmentVariable("TEMP") + "\\"
+ fileName);
reportViewer1.ProcessingMode =
Microsoft.Reporting.WinForms.ProcessingMode.Local;
reportViewer1.LocalReport.ReportEmbeddedResource =
"PlanCad.Classes.ProduOperacoes.rdlc";

/// here I add 3 dataTables for this dataset

reportViewer1.LocalReport.DataSources.Add(new
Microsoft.Reporting.WinForms.ReportDataSource("ProduOperacoes_TabProduOperaco", empDS.Tables["TabProduOperaco"]));

reportViewer1.LocalReport.DataSources.Add(new
Microsoft.Reporting.WinForms.ReportDataSource("ProduOperacoes_TabOpeRecur",
empDS.Tables["TabOpeRecur"]));

reportViewer1.LocalReport.DataSources.Add(new
Microsoft.Reporting.WinForms.ReportDataSource("ProduOperacoes_TabProdRela",
empDS.Tables["TabProdRela"]));

Question?

It would like to know if componet Reportviewer(Visual Studio 2005) does not obtain to manipulate through an only Table(Table) this situation,

therefore for that I only perceived I can identify in the Table of component only one dataset with an only Datatable! I could make in the only one datatable, but my problem is that necessary to have archives xml with the so great minor possible of will be question performance and mines application that Windows Forms is windows this twirling in the InterNet through calls webservices in the remote Data base and or independent place of where the user if finds generally possess notebooks.

Somebody has an idea of as can solve this problem?

Yuri

[5533 byte] By [yuri.lemes] at [2007-12-20]

SQL Server

Site Classified