report does not update the data

Hello, I'll explain my problem.


When I created the report, I designed it and used it for the first time. It displays well, and when the information needs to change, it doesn't change. It always displays the information from the first time the report was used.


It's a stored procedure in SQL Server, which generates a report based on a sales ID that I send from C#.

From SQL Server, the query and what I want to show in the report work well, but it doesn't update. In the preview of the report design, everything works fine when I set the fixed parameters to test.


That code allows me to see the report in C# but it always shows the same information as when I used it.

I have other reports working and they show the information that is needed but I have problems with this one.

 try

 {

   string rutaReporte = @"D:\WILLY\POS SWT\Sistema_para_restaurante_swt\PRESENTACION\REPORTES\RptComanda.frx";

   Report report = new Report();

   report.Load(rutaReporte);

   // parámetro al reporte

   report.SetParameterValue("IdVenta", idventa);

   report.Prepare();

   report.ShowPrepared();

 }

 catch (Exception ex)

 {

   MessageBox.Show("Error al cargar el informe: " + ex.Message);

 }


That code allows me to see the report in C# but it always shows the same information as when I used it.

I have other reports working and they show the information that is needed but I have problems with this one.


This image is when I did it for the first time. I got the information I needed, but for each sale I have to generate the new information in the report. They are commands.

I repeat through SQL, everything works fine.

Comments

  • i have same problem

    I cannot update dynamic data,

    every time it reflects old design test data.

    i ma passing JSON Data in dataset


    string report_path = Server.MapPath("~/FastReportTemplate/");

    using (Report report = new Report())

    {

    report.Load(report_path + "MDX_Online.frx");

    report.Dictionary.ClearRegisteredData();

    report.RegisterData(new List<ProductInfo> { productInfo }, "ProductInfo");

    report.Prepare();

    PDFExport pdfExport = new PDFExport();

    string filename = "Test.pdf";

    string pdfPath = report_path + filename;

    report.Export(pdfExport, pdfPath);

    report.Dispose();

    }


    Please, anyone can solve this issue.

    Please suggest.

Leave a Comment