Jump to content
Design Pattern Choice
No replies to this topic
Posted 08 October 2012 - 11:23 AM
I have a C# class library that is responsible for generating reports. Each report consists of the following:
Some of the reports have the same header / footer. None of the reports have the same body.
The body component is generated by taking a parameter which stores the data that needs to be displayed. The type for the parameter varies for each report.
e.g. Report 1 might take List<Bogus> as a parameter
Report 2 might take List<Interesting> as a parameter
What is the best way to represent the above using a design pattern. I have considered using a factory but am having difficulties with the body section as each report takes different parameters.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users