none
Create report with multiple business objects RRS feed

  • Question

  • Hi,


    I have two objects, let's say Client and Company.

    Right now I have a Table in my report, with the client data. I'd like to add the company name in that table. But the company name is not in the client table, I have the company ID in the client table and the company name in the Company Table.


    Is there a way to "link" two business objects as we can do with datasets (sql)? I know that I could add a Company property to my client object but I would like to avoid that. Thanks.

    Wednesday, June 20, 2007 7:06 PM

Answers

  •  

    Hi,

     

    I think there is no way to access to an object inside an object (at least I haven't found any). The solution I found is build a new class specifically for the report. The new class directly contains all the properties I need for the report, and I use my existing business objects to populate the list of objects I need for the report. So that can be a way of solving the problem I had. Hope this helps,

     

    Samuel Langlois

    Arimasoft

    Friday, March 7, 2008 11:33 PM

All replies

  • I see everyone uses datasets...


    One more question, just in case I would have more success with this one. I have an object inside my object datasource. Let's say, an "Employee" object (which is my datasource), containing a "Company" Object, and I want to access a property of the Company object.


    Using Fields!property.Value, I get no result. I there any way to access a property inside a datasource object reference?

    Thursday, June 21, 2007 3:33 PM
  • Samuel,

     

    Try using:

     

    =Fields!Company.Value.Name

     

    I hope this help

     

    Friday, March 7, 2008 12:49 PM
  • I experiencing difficulty with the same issue.

     

    If I try adding some like:

    =Fields!Company.Value.Name

    I get a compile error:

     

    "The Value expression for the textbox ‘Company’ refers to the field ‘Company'.  Report item expressions can only refer to fields within the current data set scope or, if inside an aggregate, the specified data set scope."

     

    In this case, I've already added a client record and am trying to add a company record for this client on the next row.

     

    I've been scouring the how to's and haven't figured out how to accomplish what I'm trying to do.

     

    What I have is a Datasource like this:

     

    Object1

    -properties

    -List<object2>

    -Properties

    -List<object3>

     

    What I'm trying to do is create a report that groups the object3 records under the object2 records, and the object2 records under the object1 record. If anyone knows of a good tutorial that would explain how to do this it would be extremely helpful.

     

    Cheers!

    Friday, March 7, 2008 5:11 PM
  •  

    Hi,

     

    I think there is no way to access to an object inside an object (at least I haven't found any). The solution I found is build a new class specifically for the report. The new class directly contains all the properties I need for the report, and I use my existing business objects to populate the list of objects I need for the report. So that can be a way of solving the problem I had. Hope this helps,

     

    Samuel Langlois

    Arimasoft

    Friday, March 7, 2008 11:33 PM