none
Datasource as Business Objects: How to work with collection properties? RRS feed

  • Question

  • Good Morning,

    I´m trying to build a "master/detail" sales report.  The datasource is as collection of Sale objects. Each Sale object has a collection of SaleItem objects and externalize it as a property.

    My report need to show the information of each sale (Number, Client, Date...) and the information about the itens sold (product name, quantity, value ...).

    One solution i found was to make SaleItem objects refer to Sale objects on my domain model. Then i use the SaleItem objects as the datasource and build the report grouping Sales to achieve my objectives.

    But that is a problem with my solution: I pollute my business objects with references that i will use just for reporting. There are more complex situations where i can´t  do that.

    I would like to know if there is any manner to use Sale as the primary datasource and then show it´s itens inside the report using Sale's properties. I've tried using sub-Reports but it seens i only can use primitive types as parameters...

    Thanks in advance!
    Tuesday, June 24, 2008 2:02 PM