0

I use VS2019 and DevExpress 19.1. I made a few changes on my sql database and then i added new data to my report designer. I'm using datatable. I can see new data on preview but when i run the program i can't see the new data on my report.I tried to delete my view table on mssql and create again, to delete dataset and create again. Here is my preview and report.

Preview:

Preview photo

Report:

Report photo

Thank you.

private void Btn_FaturaYazdir_Click(object sender, EventArgs e)
    {
        var sorgu = db.VW_FATURALARs.Where(t => t.FATURANO == txt_FaturaNo.Text);
        DataSet ds = new DataSet();
        ds.Tables.Add(LINQToDataTable(sorgu));

        rprSatisFaturasi rpr = new rprSatisFaturasi();
        rpr.DataSource = ds;
        rpr.ShowPreview();
    }

That is how i connect my report to the database. db.VW_FATURALAR is view on database.

and by this way connect my labels to the database column.

shockwave
  • 1
  • 2
  • Does this answer your question? [Why saving changes to a database fails?](https://stackoverflow.com/questions/17147249/why-saving-changes-to-a-database-fails) – SMor Dec 05 '20 at 17:30
  • @SMor That's not the same problem i can see my new data on database both SSMS and VS. Even on preview of my report i can see the new data but whenever i run the program and try to see my report, the new data is not shown on the report but old ones. – shockwave Dec 05 '20 at 17:42
  • Are your reports hosted on SSRS and are using cached data? If they always need to be as up to date as possible you'll need to ensure they aren't. – Thom A Dec 05 '20 at 18:33
  • @Larnu I don't save my reports anywhere but the datas inside the report are kept in MSSQL. I don't use SSRS. I design my report througt VS. This catched data thing is only for SSRS? or its is also for VS, MSSQL? – shockwave Dec 05 '20 at 18:46
  • So what is "the program"? – Thom A Dec 05 '20 at 18:59
  • @Larnu An accounting program and the report is a bill. – shockwave Dec 05 '20 at 19:10
  • We can't read your mind, see ANY code, or look over your shoulder. Either the data IS there or it is not. Since it is NOT there, then it seems YOU look in one database and your application looks in another. You should start debugging by looking at your connection string when you attempt to populate / display the report. – SMor Dec 05 '20 at 19:44
  • @SMor I editted my question above. I added my cnnection codes and how to connect to column. – shockwave Dec 05 '20 at 21:23
  • Guys i solved my problem. i hadn't updated my view table on VS. I had to drag my view table from sql database to VS. Problem is solved. Thank you all. – shockwave Dec 05 '20 at 21:51

0 Answers0