Hang on Business Object Binding

Stimulsoft Reports.NET discussion
Post Reply
MiddleTommy
Posts: 36
Joined: Tue Jan 13, 2009 12:43 pm

Hang on Business Object Binding

Post by MiddleTommy »

I have Business Objects that contain collections and relations to each other. when I RegData to a collection of these objects the StiReport (Print, Preview, Design) Hangs.


I can run a simple Linq query over the objects and pick out the (simple data type) fields I want in the report.
I can not RegData to this directly I have to call ToList() on the query first because you use the Reset Method and a Linq Ienumerable doesnt implement Reset.

Just wondering why My business objects are not supported directly?
I guess the uncleaned business objects cause an eternal loop with all the intertwined relations. PO.POItems.PO.POItems.PO.POItems(loop loop loop)
Is is possible to turn off auto Property Discovery in a reports dictionary when you RegData?
Or it would be even nicer to be able to set the Level of Detail the report auto generates in the Dictionary. 1 Level would be the Standard. 2 levels would get the collection and and collections in the collection etc...

It would be nice to be able to Register Data with out having to "Clean" it first.
It would be even nicer to be able to register a single object that contained collections of other objects
for example Say I register a PurchaseOrder(PO) object. Currently I have to add variables for the PO properties then register the PO Items(Cleaned)

I would love to be able to do

Code: Select all

report.RegData("PO",currentPO);
without the need to add variables.

Perhaps the need for a Collection Column type would permit these situations
and the ability to add Properties on Properties(especially of type object) and add Properties to Variables in the Designer

I think these suggestions would greatly simplify report creation for anyone using an ORM. And give Stimulsoft a great speed advantage in report creation vs. the other guys.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Hang on Business Object Binding

Post by Edward »

Hello Tommy,

Thank you very much for your advices :)

Could you please send a test project to support[at]stimulsoft.com for analysis.

Thank you.
MiddleTommy
Posts: 36
Joined: Tue Jan 13, 2009 12:43 pm

Hang on Business Object Binding

Post by MiddleTommy »

I worked up a Test app with this as the Data

Code: Select all

 private void button1_Click(object sender, RoutedEventArgs e)
        {

            List jobs = new List();
            for (int d = 0; d  Parts
        {
            get
            {   
                if(parts == null)
                    parts = new List();
                return parts;
            }
            set { parts = value; }
        }

        public Job Job
        {
            get { return job; }
            set { job = value; }
        }

        private List parts;

        private Job job;
    }

    public class Job
    {
        private string name;

        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        public List Drawings
        {
            get
            {
                if (drawings == null)
                    drawings = new List();
                return drawings;
            }
            set { drawings = value; }
        }

        private List drawings;
    }
The code doesnt crash the system but it sure does take a while and results in a lot of datasources for such a simple data tree.
My code can probably go up to twenty levels of relations and this example is only 3
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Hang on Business Object Binding

Post by Edward »

Hi,

Please check the prerelease build from 9th January. We have made some changes in it.

Thank you.
Post Reply