Object bindingSource
Greetings,
I'm just a new developer for Fast Report
I want to ask about if Fast-Report support DataSource Object (BindingSource depend on object) ??
if answer YES
so I have problem that
When I add new form to my solution and add new bindingSource named as bindingSource1 that bound to object (LLBL EntityCollection [url="http://www.llblgen.com)" ] http://www.llblgen.com)[/url]
then design my report depend on bindSource1
finally in button view event write this code
var ec = new EntityCollection<CODEActionEntity>();
BL.ActionManager.FillAction(ec, null);
bindingSource1.DataSource = ec;
report1.Prepare();
report1.Show();
after run, I got this error
(Text1): error CS0103: The name 'bindingSource1' does not exist in the current context
(Text3): error CS0103: The name 'bindingSource1' does not exist in the current context
(Text5): error CS0103: The name 'bindingSource1' does not exist in the current context
any one can advice me !!!
BTW. I use my Data access layer to Fill my collection
I'm just a new developer for Fast Report
I want to ask about if Fast-Report support DataSource Object (BindingSource depend on object) ??
if answer YES
so I have problem that
When I add new form to my solution and add new bindingSource named as bindingSource1 that bound to object (LLBL EntityCollection [url="http://www.llblgen.com)" ] http://www.llblgen.com)[/url]
then design my report depend on bindSource1
finally in button view event write this code
var ec = new EntityCollection<CODEActionEntity>();
BL.ActionManager.FillAction(ec, null);
bindingSource1.DataSource = ec;
report1.Prepare();
report1.Show();
after run, I got this error
(Text1): error CS0103: The name 'bindingSource1' does not exist in the current context
(Text3): error CS0103: The name 'bindingSource1' does not exist in the current context
(Text5): error CS0103: The name 'bindingSource1' does not exist in the current context
any one can advice me !!!
BTW. I use my Data access layer to Fill my collection
Comments
FastReport supports business objects. See the demo: Demos\C#\DataFromBusinessObject
For example, the sample "DataFromBusinessObject" shows in the DataWindow "Categories" which is defined in the winforms project.
I need to do the same as I have a "Customers" collection defined in my DAL project that I need to show in the DataWindow EXACTLY as the sample shows "Categories". How to do that in VS/FatsReport designers ???
The easiest way to create a new report with BO is to use run-time designer, just like in this demo.
1) add a button/menu item in your app ("design a report");
2) write the following event handler for this button:
3) run your app and press the button. Design a report and save it to a file.
4) to run the report, use the following code:
In this way, you work with "live" data when designing a report and when previewing it. Later you may remove the "design a report" button from your app, or you may decide to keep this functionality (as it is royalty-free) - it will allow you to create/modify reports without need to recompile your app. This approach was used in the main demo program to create all demo reports.
I think there are missing understand
Let's ask in another way
In FastRepoet Demo "DataFromBusinessObject "
How could you add the "Categories" object (that designed in Form Class) to the FastRepoet Datasource in design Time (to enable me design my report in design Time) ??