Although I read this article:
Printing and making reports in c# winform
it did not answer where I was hoping to go with using the Microsoft RDLC report writer.
Suppose that you have data somewhere (any SQL database (MS, MySQL, etc.), or any other file, such as a CSV file) and you would like to read that data, do some calculations with that data and then produce a report. You might exclude some data based on some factors. You might want to print some ratios without showing all the data that went into the calculation of those ratios.
Ultimately, I would like to take an array or datatable that I have in memory and produce it as a report.
In the simplest form, suppose I have an array called MyReport. It has r rows and c columns. For each row, print the columns across the page. I may want to have some subtotals along the way. Have the report writer take care of the page headers, page footers and page numbering.
This is basic COBOL stuff. In COBOL there was a "Report Section". An example can be found at:
http://h30266.www3.hpe.com/odl/axplp/progtool/cobol29/AA_Q2G1H_TK.PDF, pages 10-45 through 10-47. However, do not assume that the data is neatly organized in some input file where you are just reading a record, then printing that record. Suppose instead that you read the data, crunch on it and then the output is very different (and hopefully more meaningful) than the detailed data records. Most likely, you are summarizing the detailed data records, but through an algorithm that is more complex than anything you could write in SQL.
How can I do something similar in C#?