Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filling dataset with SP with relational info
Message
De
09/11/2010 07:33:09
 
 
À
08/11/2010 23:10:33
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Versions des environnements
Environment:
VB 9.0
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
01488565
Message ID:
01488582
Vues:
49
>I am writing a module in my app to use DevExpress XtraReports. It seems they like datasets with relational information. Soooo
>
>In my Strataframe business objects I tend to use stored procedures that return multiple tables. If I have a single parent record with 5 child tables, I will pass the pk of the parent as the param to my sp and fill 6 BOs on one trip to the server. Sometimes I'll fill the parent with one sp and then all the children from another.
>
>If I have a set of parents I will usually do everything in one sp so the result set of the parents can be used create the collection of foreign keys to pull all the related children ( the framework takes care of dynamically filtering the chlidren on navigating the parent )
>
>I can use these business objects with XtraReports, but my understanding is the master-detail stuff is more easily handled with datasets.
>
>I don't really need the business objects for the XtraReports and it seems regular datasets will be easier but I see that when I use the Visual Studio 2010 add new datasource wizard and select the sp that returns multiple tables only the schema of the first table makes it into the treeview. Is this to be expected and should I just have a separate stored proc for each table or is there a trick to returning multiple tables and having the schema builder see the structure so that the structure is there for building the report?
>
>If this isn't viable I'll probably stick to my BOs and just copy into the datasets, but getting structures into the datasets at design time may be a PITA
>
>Any suggestions, guidance appreciated. I can see advantages to pulling all the data on one trip but I need the structures at design time to build the reports.
>
>TIA

Does the report tool work with entity classes? In VS, you can use an entity class to design your reports (the class or dataset or connection or something that matches just has to exist at design time) and then at runtime pass the same name and structure to the report as either a dataset or list or entity class - as long as it matches the same structure and column names and types it works. I tested this numerous times but I haven't worked with DevExpress XtraReports....
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform