Crystal Reports is not showing records from the database, only the columns

前端 未结 1 342
死守一世寂寞
死守一世寂寞 2021-01-28 19:48

I am trying to display the records from one of the tables created in a database. When I run the application, it loads but I can only see the columns without the records ( record

相关标签:
1条回答
  • 2021-01-28 20:00
    1. Try to debug, step by step.. does your dsSalarii has some data? if yes, go next step
    2. You must to ensure, that name of DataTable (in your case : "DataTable1") is the same in CrystalReport, if yes, go next step
    3. It s not enough to only Set DataSource to a report, you must pass data to a report :

      ds.WriteXml(XmlDataPath)
      

    save your dataset as xml, now you can add your generated xml to a Crystal Report, so open Crystal Report, go to Database> Database expert> Create New Connection> ADO.NET(xml) and choose path to generated xml

    next step is putting database fields in report

    0 讨论(0)
提交回复
热议问题