I first searched for an example on MSDN, but I didn't like the way described there. In this article on MSDN they use a XmlTextWriter, which makes the code hard to read and not very maintainable in my opinion. You can find that MSDN article here.
After some further investigation I found the RDLC XSD on MSDN. You can find the XSD here.
I used the xsd.exe Tool to generate a Class based on the XSD. This way you can create an RDLC in a more Object Oriented way, which leads to more maintanable code.

It would be awesome if someone had the courage to add comments, so Intellisense would be able to help creating RDLCs programmatically.
After adding the Report.cs to your solution, you can start making your own RDLCs programmatically. Note that the ReportViewer needs a Stream to read the RDLC.
I chose not to show my whole implementation of my own ReportGenerator, because it's not really a good example. These steps might get you started though.
1. Create a new Report object.
2. Do whatever you want with the object.. Add textboxes, rectangles..
3. Before reading the Report object into the ReportViewer you need to serialize the object to a Stream. I chose to use a MemoryStream. (Don't forget to set the position of the Stream to 0!)

4. Load the Local Report in the ReportViewer using the LoadReportDefinition method.

And that should be it!







