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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.