RegisterDatasource
danni
Denmark
Hi
I have the following objectgraph and registered the "items" list as datasource. After thre RegisterData I enable the lists in the datasource.
My problem is when I look Data in the designer then I only see the first object in each level in the object graph, but want to show all. Can you see what im doing wrong?
If I look at mainmenu->Data->Reportdata with the treeview I get the full object graph - of I press ok in that window the Data windows is updated with the full object graph.
Thank you.
I have the following objectgraph and registered the "items" list as datasource. After thre RegisterData I enable the lists in the datasource.
My problem is when I look Data in the designer then I only see the first object in each level in the object graph, but want to show all. Can you see what im doing wrong?
If I look at mainmenu->Data->Reportdata with the treeview I get the full object graph - of I press ok in that window the Data windows is updated with the full object graph.
Thank you.
                    List<ReportObjectElev> items = new List<ReportObjectElev>();
                    ReportObjectElev elev = new ReportObjectElev();
                    elev.Bop?¦lskommune = new ReportBaseKommune();
                    elev.Brobygningshold = new List<ReportBaseBrobygningshold>();
                    elev.Brobygningshold.Add(new ReportBaseBrobygningshold());
                    elev.Fraflytningskommune = new ReportBaseKommune();
                    elev.Historik = new List<ReportBaseHistorik>();
                    elev.Historik.Add(new ReportBaseHistorik());
                    elev.Holdtilmeldinger = new List<ReportBaseHoldtilmelding>();
                    elev.Holdtilmeldinger.Add(new ReportBaseHoldtilmelding());
                    elev.Kontaktpersoner = new List<ReportBaseKontakt>();
                    elev.Kontaktpersoner.Add(new ReportBaseKontakt());
                    elev.Notater = new List<ReportBaseNotat>();
                    elev.Notater.Add(new ReportBaseNotat());
                    elev.Praktikformidlinger = new List<ReportBasePraktikformidling>();
                    elev.Praktikformidlinger.Add(new ReportBasePraktikformidling());
                    elev.Prim?¦rKontaktperson = new ReportBaseAnsat();
                    elev.Relationer = new List<ReportBasePerson>();
                    elev.Relationer.Add(new ReportBasePerson());
                    elev.Skole = new ReportBaseSkole();
                    elev.Skole??r = new ReportBaseSkoleaar();
                    elev.Stamklasse = new ReportBaseHoldtilmelding();
                    elev.Vejleder = new ReportBaseAnsat();
                    items.Add(elev);
                   Â
                    report.RegisterData(items, "Elevdata", FastReport.Data.BOConverterFlags.BrowsableOnly, 3);                   Â
                    report.GetDataSource("Elevdata").Enabled = true;
                    report.GetDataSource("Elevdata.Brobygningshold").Enabled = true;
                    report.GetDataSource("Elevdata.Historik").Enabled = true;
                    report.GetDataSource("Elevdata.Holdtilmeldinger").Enabled = true;
                    report.GetDataSource("Elevdata.Kontaktpersoner").Enabled = true;
                    report.GetDataSource("Elevdata.Notater").Enabled = true;
                    report.GetDataSource("Elevdata.Praktikformidlinger").Enabled = true;
                    report.GetDataSource("Elevdata.Relationer").Enabled = true;
Comments
Which FR.Net version do you use? Did you tried the latest version?
I made a simple test project where it worked fine, so it must be our objects that arent instantiated or something.
Now I have installed version 1.2.23 but it doesnt help.
I have uploaded a very small test project where I made a datasource. If you use that one it works.
There is a Entities.Dll included in the project. If you use that datasoruce. The tree in the Data windows is not builded correctly. Could be our object thats weird.
FRTestDesigner.rar is the test project using FR version 1.2.23
Untitled.Png shows a screen dump where you can see a difference in the Data windows and the "select report data" menu.
I cannot see what wrong with it. Maybe you can?
Thanks.
maxNestingLevel with values 1 to 4 give different registered data, but if I use a value larger than 4 there is no change.
I even tried 1000 for fun and there is no difference from 4.
Thanks! :-)
It works now, but maybe it works a bit too well now :-)
Now I can see the properties of System.Objects aswell.
System.DateTime, Systen.Int32 forinstance.
Try check out the enclosed picture. This is en error trying to preview the "value" of a nullable Int32 eg. Int32?.
/Thanks
I will try to fix this as well.
Just checking what the status is on this item?
Do datetime, datetime? and int? act like objects or simple datatypes when viewed in the "Data" window of the designer?
thanks
It was fixed long time ago - sorry I didn't notify you about this.