data grid and table object
Hello ,
I need a component in fast report that will work like data gird in .net ,i can't use table object because it doesn't have datasource, and cant adjust it self in runtime dynamicly acording to my data source.
How can i write this kind of my own custom component , could you please send me example codes etc , i couldnt find anything in the documentation about this.
And/Or could you help me to solve this in table object ,
I use ManualBuild event like in demo , with the code below ;
DataSourceBase customers =Report.GetDataSource("DATASOURCENAME");
//Report.GetDataSource("FK_InventoryReceiptItemVariant_InventoryReceiptItem");
if( customers== null ) MessageBox.Show("null");
// init it
customers.Init();
// number of columns in the datasource
int colCount = customers.Columns.Count;
// print the table header which contains column titles. It's a row with index = 0.
Table3.PrintRow(0);
for (int i = 0; i < colCount; i++)
{
// fill the cell with column title
Cell3.Text = customers.Columns.Alias;
// print it
Table3.PrintColumn(0);
}
// now print a datasource content
while (customers.HasMoreRows)
{
// print the table body. It's a row with index = 1.
Table3.PrintRow(1);
for (int i = 0; i < colCount; i++)
{
// fill the cell with datasource column's data
Cell8.Text = customers[customers.Columns].ToString();
// print it
Table3.PrintColumn(0);
}
// move to the next row
customers.Next();
}
But this code doesnt understand the relation between the parent band and the child band which the tabel object in , also , it prints the all table for every row int the data source.
Thanks in advance
I need a component in fast report that will work like data gird in .net ,i can't use table object because it doesn't have datasource, and cant adjust it self in runtime dynamicly acording to my data source.
How can i write this kind of my own custom component , could you please send me example codes etc , i couldnt find anything in the documentation about this.
And/Or could you help me to solve this in table object ,
I use ManualBuild event like in demo , with the code below ;
DataSourceBase customers =Report.GetDataSource("DATASOURCENAME");
//Report.GetDataSource("FK_InventoryReceiptItemVariant_InventoryReceiptItem");
if( customers== null ) MessageBox.Show("null");
// init it
customers.Init();
// number of columns in the datasource
int colCount = customers.Columns.Count;
// print the table header which contains column titles. It's a row with index = 0.
Table3.PrintRow(0);
for (int i = 0; i < colCount; i++)
{
// fill the cell with column title
Cell3.Text = customers.Columns.Alias;
// print it
Table3.PrintColumn(0);
}
// now print a datasource content
while (customers.HasMoreRows)
{
// print the table body. It's a row with index = 1.
Table3.PrintRow(1);
for (int i = 0; i < colCount; i++)
{
// fill the cell with datasource column's data
Cell8.Text = customers[customers.Columns].ToString();
// print it
Table3.PrintColumn(0);
}
// move to the next row
customers.Next();
}
But this code doesnt understand the relation between the parent band and the child band which the tabel object in , also , it prints the all table for every row int the data source.
Thanks in advance