DAL- CodeSmith

Stimulsoft Reports.NET discussion
Post Reply
iomega55
Posts: 29
Joined: Sat Sep 23, 2006 1:37 am

DAL- CodeSmith

Post by iomega55 »

Hi:

At this moment I'm using CodeSmith for the DAL tier. One property of this product is DeepLoad function. You get the parent record and DeepLoad gets all the child information with relationships already defined for parent-child. In the sample below if I have tableA.id = xx DeepLoad gets all information related to xx inside tableAB and table AC. At this moment my dataset is complete. Here via stireport.RegData I can pass my dataset.

For reporting purposes tableA.tableEid is already in the dataset, but I need tableE.description, so its requiered to add tableE to the datasource and define the relation with tableA. DeepLoad dont do this, because it only adds child information.


Questions:
a) If a pass Dataset(tableA,tableAB,tableAC) and go to Designer can I add tableE, tableD to the datasource and most important preserve this information for next calls of the report?
b) Is it possible to have a mixed datasource? ie part one sent via RegData(tableA,tableAB,tableAC,plus relations) and part two created via Designer(tableE,tableD,plus relations)?
c) Or the correct way is define and fill the entire dataset in codebehind and send a complete datasource to stireport

d) Or define entire report in Designer.


a), b) and c) As you can see I just like to take advantege of DAL, but I'm a little confuse 'cause I think may be I'm mixing 2 technologies that could be for different purposes

d) Clean and better solution



Sample structure:

tableA
=====
id
name
lastname
tableEid
balance

tableAB
======
id
tableAid
address
pc

tableAC
======
id
tableAid
tableDid
email

tableD
=====
id
description

tableE
=====
id
description
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

DAL- CodeSmith

Post by Vital »

StimulReport.Net have special property - StiReport.CacheAllData (you can change this property from Report Designer).
By default this property equal false.

If property equal false, then you can create relation only between datasources placed in one DataSet. If you create relation beetwen
two tables placed in different DataSet, this relation can't work.

If property equal true then all data will automatically placed in to one DataSet. You can create relation beetwen any datasources in
Report Dictionary. In this mode you can split data from sql, dataset, tables, business objects ant etc.

Thank you.
Post Reply