DAL- CodeSmith
Posted: Tue Sep 26, 2006 1:21 pm
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
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
tableD
=====
id
description
tableE
=====
id
description