Last post Aug 28, 2012 03:03 PM by N_EvilScott
Aug 28, 2012 02:51 PM|Khan_1|LINK
I need a beginning example of reporting with flat files,instead of DB...
Aug 28, 2012 02:56 PM|inquisitive_mind|LINK
I doubt if its possible unless you want to convert the flat files to anyone of the datasources supported by SSRS.Take a look at this link.It has the datasources supported by SSRS 2008 R2 and flat files are not supported.
Aug 28, 2012 03:03 PM|N_EvilScott|LINK
So you want to generate reports based on data contained inside of flat files instead of an active SQL Database, thats the impression I get. If that's the case it's no problem at all.
The underlying structure of SSRS is that it gathers data using the ReportDataSource object. That object takes in ANY data and translates it to a usable dataset that RDLC can use to populate your reports.
The ReportDataSource object itself takes two parameters, Dataset Name (string) and the object data (any object).
What that means is you will need to manually be able to read your flat files and dump that data into the ReportDataSource object.
Here is an example:
private void DisplayMyReport()
// assumes there is a ReportViewer on the page called ReportViewer1
YourCustomFlatFileReader file = new YourCustomFlatFileReader();
ReportDataSource rds = new ReportDataSources("RDLC DataSet Name Here", file.GetData());