Understanding RegBusinessObject

Stimulsoft Reports.NET discussion
Post Reply
Tobias
Posts: 104
Joined: Mon Nov 24, 2008 8:44 am

Understanding RegBusinessObject

Post by Tobias »

Hi!

Lets say I have a simple invoice:

Code: Select all

public class Invoice
{
    public string ReceiptNumber { get; set; }
    public DateTime Time { get; set; }
    public CustomerData Customer { get; set; }
    public EmployeeData Employee { get; set; }
    public IList Items { get; set; }
    public IList VatTotals { get; set; }
    public IList Payments { get; set; }
}
If I do:

Code: Select all

StiOptions.Dictionary.BusinessObjects.MaxLevel = 100;
_stiReport.RegBusinessObject("Invoice", "Invoice", _invoice);
... I only see the ReceiptNumber and Time property in the designer - no Items list and no nested CustomerData.
So should I use RegData() instead, getting "ugly" databands? As far as I understood from another thread,
RegBusinessObject would also not give me sortable data bands.

So I was wandering, what RegBusinessObject should be used for.

Tobias
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Understanding RegBusinessObject

Post by Jan »

Hello,

You need register child business object manually when using RegBusinessObject method. Please check following live video:

http://www.stimulsoft.com/livedemos/Rep ... etail.html

Thank you.
Tobias
Posts: 104
Joined: Mon Nov 24, 2008 8:44 am

Understanding RegBusinessObject

Post by Tobias »

Jan wrote: You need register child business object manually when using RegBusinessObject method. Please check following live video:
Thx! So there's no way to do this in code? And lists in my business object are not sortable/filterable?

Tobias
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Understanding RegBusinessObject

Post by Jan »

Hello,

> Thx! So there's no way to do this in code?

You can do this from code with help of SynchronizeBusinessObjects(int maxLevel) method of report dictionary. This method available in latest prerelease builds of our product.

> And lists in my business object are not sortable/filterable?

At this moment this features is not available.

Thank you.
Post Reply