TableObject
I have a datatable and i want to bind it to fastreport Table Object, but it does not work. I use C# and visual studio 2015. My frx file matches to my datatable. My Table Object name matches with my register data parameters. But still it does not work. Please Help, thanks all. Here is my C# source
using (Report report = new Report())
        {
            report.Load(@"C:\Users\sevket\Documents\Visual Studio 2015\Projects\OnMuhasebe\OnMuhasebe\bin\Debug\isimsiz.frx"); //Loading frx
            DataTable tablo = new DataTable(); //starts my data table
            DataColumn sutun; //my columns
            sutun = new DataColumn("kod"); //0
            tablo.Columns.Add(sutun);
            sutun = new DataColumn("cinsi"); //1
            tablo.Columns.Add(sutun);
            sutun = new DataColumn("miktar"); //2
            tablo.Columns.Add(sutun);
            sutun = new DataColumn("birimfiyat"); //3
            tablo.Columns.Add(sutun);
            sutun = new DataColumn("tutar"); //4
            tablo.Columns.Add(sutun);
            for (int i = 0; i < dgvFaturaListe.Rows.Count - 1; i++)//my datarows
            {
                DataRow satir;
                satir = tablo.NewRow();
                satir["kod"] = dgvFaturaListe.Rows[i + 1].Cells[2].Value.ToString();
                satir["cinsi"] = dgvFaturaListe.Rows[i + 1].Cells[3].Value.ToString();
                satir["miktar"] = dgvFaturaListe.Rows[i + 1].Cells[5].Value.ToString();
                satir["birimfiyat"] = dgvFaturaListe.Rows[i + 1].Cells[6].Value.ToString();
                satir["tutar"] = dgvFaturaListe.Rows[i + 1].Cells[8].Value.ToString();
                tablo.Rows.Add(satir);
                i++;
            }
            report.RegisterData(tablo, "Tablo");// passing table to frx
            if (report.Prepare())
            {
                // Hazırlanmış olan raporun g?¶sterilmesini saÄŸlıyoruz.
                report.ShowPrepared();
            }
        }
<TableObject Name="Tablo" Left="94.5" Top="378" Width="708.75" Height="37.8">
    <TableColumn Name="kod" Width="94.5"/>
    <TableColumn Name="cinsi" Width="302.4"/>
    <TableColumn Name="miktar" Width="94.5"/>
    <TableColumn Name="birimfiyat" Width="94.5"/>
    <TableColumn Name="tutar" Width="122.85"/>
    <TableRow Name="Row1">
      <TableCell Name="Cell1"/>
      <TableCell Name="Cell2"/>
      <TableCell Name="Cell3"/>
      <TableCell Name="Cell4"/>
      <TableCell Name="Cell5"/>
    </TableRow>
    <TableRow Name="Row2">
      <TableCell Name="Cell6"/>
      <TableCell Name="Cell7"/>
      <TableCell Name="Cell8"/>
      <TableCell Name="Cell9"/>
      <TableCell Name="Cell10"/>
    </TableRow>
  </TableObject>
Comments