Posted 12 October 2017, 7:40 pm EST
Hi,
Using the Data group on the Home Tab of the C1FlexReportDesigner, you can change the Data Source any time after you have fixed a report’s style/ template. Refer the below documentation link that shows the group in the Design mode.
http://helpcentral.componentone.com/nethelp/FlexReport/DesignMode.html
Also, Data Source can be changed at run-time for any report using the below mentioned code snippet:
c1FlexReport1.DataSource.RecordSourceType = RecordSourceType.Auto;
string dsPath=Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments).ToString();
c1FlexReport1.DataSource.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + dsPath +@"\ComponentOne Samples\Common
\C1NWind.mdb";
c1FlexReport1.DataSource.RecordSource = "Employees";
You can add fields like images, charts, shapes, etc in a report using the FlexReportDesigner using the Insert tab. You can learn more about inserting each field from the below documentation link:
http://helpcentral.componentone.com/nethelp/FlexReport/AddingFlexReportFields.html
For images, you might want to follow the steps mentioned here:
http://helpcentral.componentone.com/nethelp/FlexReport/ImageField.html
Next, you can add fields to the Detail section dynamically using the below code snippet:
// create the Detail section
s = c1FlexReport1.Sections[SectionTypeEnum.Detail];
s.Height = 330;
s.Visible = true;
TextField textField = new TextField();
textField.Name = "FldID";
textField.Text.Expression = "EmployeeID";
textField.Left = 0;
textField.Top = 0;
textField.Width = 400;
textField.Height = 300;
c1FlexReport1.Sections.Detail.Fields.Add(textField);
Here, a TextField is inserted.
Let us know if you wish to display the grid as an image or simply a grid-like layout which can be obtained using the borders of the fields and sections and ShapeFields.
Hope this helps.
Regards,
Esha