TableCreate a WinForm that contains Reports
that looks for data in a DataSet
object (which is programmatically populated using a SQL Server source).
The release
is stored on the server and can be accessed by client machines. The problem is what executable only runs on me PC. In the others an error of type is generated:
System.IO.FileNotFoundException
The rdlc
report files and the xsd
DataSet object are set with build action
as Embedded Resource
.
I think the reference to some of these objects is wrong, but I can not find where.
Help me, please?
Note that the exception described above is generated in the windows error report on system execution on client PCs, not in debug
The code that populates the data from a DataTable dtComissoes
:
ds = new dsComissoes();
dsTableComissoes = ds.Tables["dtComissoes"];
foreach (DataRow row in dtComissoes.Rows)
{
int i = dsTableComissoes.Rows.Count;
dsTableComissoes.Rows.Add();
dsTableComissoes.Rows[i]["CodConta"] = row["CodConta"];
dsTableComissoes.Rows[i]["Descricao"] = row["Descricao"];
dsTableComissoes.Rows[i]["NumOrdem"] = row["NumOrdem"];
dsTableComissoes.Rows[i]["Cliente"] = row["Cliente"];
dsTableComissoes.Rows[i]["NF"] = row["NF"];
dsTableComissoes.Rows[i]["Item"] = row["Item"];
dsTableComissoes.Rows[i]["CondPagto"] = row["CondPagto"];
dsTableComissoes.Rows[i]["Titulos"] = row["Titulos"];
dsTableComissoes.Rows[i]["Parcela"] = row["Parcela"];
dsTableComissoes.Rows[i]["ValorItem"] = row["ValorItem"];
dsTableComissoes.Rows[i]["Comissao"] = row["Comissao"];
dsTableComissoes.Rows[i]["PTN"] = row["PTN"];
dsTableComissoes.Rows[i]["Valor"] = row["Valor"];
dsTableComissoes.Rows[i]["Linha"] = row["Linha"];
}
And the code passed to generate the report:
dtComissoesBindingSource.DataSource = dtComissoes;
rpvComissoes.LocalReport.SetParameters(new ReportParameter("DataInicial", DataInicio.ToString()));
rpvComissoes.LocalReport.SetParameters(new ReportParameter("DataFinal", DataFim.ToString()));
rpvComissoes.LocalReport.Refresh();
rpvComissoes.RefreshReport();
rpvComissoes.Refresh();