F
F.oliveirarocha
Guest
Hi folks, is me again, asking for your help.
I'm getting an error during the printing of report, when I input the parameters.
I want that the report file, rdlc shows the parameters at the maskedtextbox1 and maskedtextbox2 to be printed as placed at the header.
I' got an error message:
Microsoft.Reporting.WinForms.LocalProcessingException: 'Occurred an error during the processing the local report'.
Inner Exception
"UnknownReportParameterException: attempt to configure a report parameter '01/08/2019 00:00:00' that is not defined in this report."
I just want to print the parameter inicial data and final date. The report is working very well, but whithout passing the parameters to be printed.
Here follows the code.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Microsoft.Reporting.WinForms;
namespace SGFRenaissance
{
public partial class FrmRel_TitulosaPagaremAberto : Form
{
public FrmRel_TitulosaPagaremAberto()
{
InitializeComponent();
}
private void FrmRel_TitulosaPagaremAberto_Load(object sender, EventArgs e)
{
this.reportViewer1.RefreshReport();
}
private void btn_executar_Click(object sender, EventArgs e)
{
DateTime datainicio = Convert.ToDateTime(maskedTextBox1.Text);
DateTime datafim = Convert.ToDateTime(maskedTextBox2.Text);
this.Numero_Parcelas_a_PagarTableAdapter.Fill(this.Rel_NumeroParcelaaPagar.Numero_Parcelas_a_Pagar, datainicio, datafim);
this.reportViewer1.LocalReport.SetParameters(new Microsoft.Reporting.WinForms.ReportParameter(datainicio.ToString(), datafim.ToString())); // Here gets the error. Without this line the report works fine.
this.reportViewer1.RefreshReport();
}
}
}
My question is simple. How to print the parameters already working "datainicio" and "datafim" (inicialdate and finaldate) translated. I put two textbox at the rdlc and added parameter expression but the Parameters didnot work.
The expression is: "=Parameters!ReportParameter1_DataInicio.Value.ToString"
Please help me with that. Thanks in advance.
Continue reading...
I'm getting an error during the printing of report, when I input the parameters.
I want that the report file, rdlc shows the parameters at the maskedtextbox1 and maskedtextbox2 to be printed as placed at the header.
I' got an error message:
Microsoft.Reporting.WinForms.LocalProcessingException: 'Occurred an error during the processing the local report'.
Inner Exception
"UnknownReportParameterException: attempt to configure a report parameter '01/08/2019 00:00:00' that is not defined in this report."
I just want to print the parameter inicial data and final date. The report is working very well, but whithout passing the parameters to be printed.
Here follows the code.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Microsoft.Reporting.WinForms;
namespace SGFRenaissance
{
public partial class FrmRel_TitulosaPagaremAberto : Form
{
public FrmRel_TitulosaPagaremAberto()
{
InitializeComponent();
}
private void FrmRel_TitulosaPagaremAberto_Load(object sender, EventArgs e)
{
this.reportViewer1.RefreshReport();
}
private void btn_executar_Click(object sender, EventArgs e)
{
DateTime datainicio = Convert.ToDateTime(maskedTextBox1.Text);
DateTime datafim = Convert.ToDateTime(maskedTextBox2.Text);
this.Numero_Parcelas_a_PagarTableAdapter.Fill(this.Rel_NumeroParcelaaPagar.Numero_Parcelas_a_Pagar, datainicio, datafim);
this.reportViewer1.LocalReport.SetParameters(new Microsoft.Reporting.WinForms.ReportParameter(datainicio.ToString(), datafim.ToString())); // Here gets the error. Without this line the report works fine.
this.reportViewer1.RefreshReport();
}
}
}
My question is simple. How to print the parameters already working "datainicio" and "datafim" (inicialdate and finaldate) translated. I put two textbox at the rdlc and added parameter expression but the Parameters didnot work.
The expression is: "=Parameters!ReportParameter1_DataInicio.Value.ToString"
Please help me with that. Thanks in advance.
Continue reading...