Search code examples
c#winformsreportstimulsoft

C# winFom Send DataTable to stimulsoft report


i want to display a data table records that's not connected to any database in a stimulation report. i try this lines of code but the report page is empty what can i do?

        factorDT.TableName = "factorDT";
        factorDataSet.Tables.Add("factorDT");

        factorDT.Columns.Add("PCode", typeof(int));
        factorDT.Columns.Add("Title", typeof(string));
        factorDT.Columns.Add("UnitPrice", typeof(int));
        factorDT.Columns.Add("Count", typeof(int));
        factorDT.Columns.Add("TotPrice", typeof(int));

        private void simpleButton1_Click(object sender, EventArgs e)
        {
         stiReport1.RegData("factorDataSet",factorDataSet);
         stiReport1.Dictionary.Synchronize();
         stiReport1.Compile();
         stiReport1.Show(true);
        }

Solution

  • I solve this by saving my data table into XML file and load it to my StiReport