Custom Datasource type

Hi,

Will there be a capability to have a custom datasource type, in a future version? As it's possible in the VCL version.

The reason why I'm asking is that I would like to write my own SQL queries for the report, but I have to use a n-tier architecture and no direct link to the database from the client application will exist. In the business layer framework that I'm currently using, I can return any type of data, including a dataset and/or a datatable.

Daniel

Comments

  • edited 7:57PM
    Hello,

    What about business objects support that works already? You can supply any IEnumerable-type object to the FastReport.
  • edited 7:57PM
    AlexTZ wrote: »
    Hello,

    What about business objects support that works already? You can supply any IEnumerable-type object to the FastReport.

    I'm referring to using it via the end-user report designer. Definitely, being able to control the all the reports would be nice, but for us we want to give the end user the ability to create their own reports.

    The application that I just finished only has approx. 3MB of data, and only 10 tables to work with. So, it's only approx. 3MB of data that is loaded via the business objects. But, some of my future projects are larger(approx. 260 tables with the amount of data over 10GB, which is a conversion from a Delphi to .Net). So, obviously having to wait to load 260 tables containing 10GB of data via business objects is unreasonable, for the end-user. And, my future applications(2 future projects are in the planning stage, one is a new application and the other is a conversion from Delphi to .Net) have to be able to run via the internet.

    I hope this clarifies the reason why I would like to be able to develop my own custom datasource for FastReports.

    Daniel
  • edited 7:57PM
    But I don't think the custom datasource will solve your problem.
    FR.Net uses a "random" data access model (it differs from FR VCL that uses First/Next/Prior methods to navigate); it requires that all data must be loaded into datasource. It is needed to support data sorting, groups, master-detail relations. So I don't get why you need to use custom datasource instead of IEnumerable business object.
  • edited 7:57PM
    AlexTZ wrote: »
    But I don't think the custom datasource will solve your problem.
    FR.Net uses a "random" data access model (it differs from FR VCL that uses First/Next/Prior methods to navigate); it requires that all data must be loaded into datasource. It is needed to support data sorting, groups, master-detail relations. So I don't get why you need to use custom datasource instead of IEnumerable business object.

    Then how can I give the end-user the ability to create and modify reports, if the quantity of data that needs to be transferred prior to opening the report designer is very large (a few gigabytes), and over the internet? And, at the moment, the only answer I see is that I can't give the option to the end-user to create and modify reports.

    The reason why I was asking about the ability to create a custom datasource is that I would have the ability to use the underlying business layer framework( CSLA.Net) that I'm using to pass a SQL Select statement to the server and return the result set as a DataTable(as a property of the business object) over the internet. Also, it would permit me to control the security of the data, depending on the user's access rights(which data the user can read).

    So, if you did define an "interface" for the datasource object, how dificult can it be for someone to create their own custom datasource? Also, that would permit anybody to create a datasource to support other databases that you haven't implemented yet. But, if you haven't created an interface that the datasource classes are using, then I can see that it can be harder to implement a custom datasource.

    I think that the list of datasource types available would benefit from a plugable type framework for any developer to add their own custom datasource types.

    Daniel
  • edited 7:57PM
    Daniel,

    FastReport has a base class for custom datasources; it's not hard to implement own one. For example, custom ds that supports the DataView object has about 2kb source code. All I need is to document it better.
  • edited 7:57PM
    AlexTZ wrote: »
    Daniel,

    FastReport has a base class for custom datasources; it's not hard to implement own one. For example, custom ds that supports the DataView object has about 2kb source code. All I need is to document it better.

    Thanks, that is what I wanted to know [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> . And, will the source code for the custom ds that supports the DataView object be included with the registered version? I think that source code with descriptive comments might be enough as documentation, at least for now. Daniel[/img]
  • edited August 2008
    Sure we will have a version with source code.
    Btw I'm improving the business objects data source right now. It will be able to:
    - load the data when running a report (now it loads data when you register it);
    - load the data to datasources you actually using (now all business graph is loaded);
    - finally, not to copy data from the BO properties to the datasource internal structures; instead, use references. It will improve the memory usage a lot.
    This will allow you to use BO in the designer with no problems.
  • edited 7:57PM
    AlexTZ wrote: »
    Sure we will have a version with source code.
    Btw I'm improving the business objects data source right now. It will be able to:
    - load the data when running a report (now it loads data when you register it);
    - load the data to datasources you actually using (now all business graph is loaded);
    - finally, not to copy data from the BO properties to the datasource internal structures; instead, use references. It will improve the memory usage a lot.
    This will allow you to use BO in the designer with no problems.

    Good work. I'll probably have to wait and see how it works with regards to the business framework that I'm using(I'm still learning on how to use it more efficiently).

    Daniel
  • edited 7:57PM
    Hello,

    You can check current FR.Net version.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.