0
votes

I am using Visual Studio 2013, Express version. I need to create a windows application that will allow users to generate reports. So I downloaded the ReportViewer 2012 RT and successfully added the ReportViewer dll to VS. So now I have a ReportViewer component in my toolbox I can add to a form.

Having never used ReportViewer before, I'm not sure where to go from here. I did find this page about how to add printable reports: http://msdn.microsoft.com/en-us/library/ms233804.aspx

The thing is, it gives these steps: 1) Drag a ReportViewer control from the Data tab of the Toolbox onto your form. 2) On the Project menu, choose Add New Item. In the Add New Item dialog box, select the Report icon and click Add. 3) The Report Designer opens in the development environment, and a report (.rdlc) file is added to the project.

After completing step 1 I do not see 'Report' in the list of items I can add. I do not see any other 'Report' components listed in the toolbox, either.

Does anyone know what I am missing?

I did a lot of searching found discussions about getting the ReportViewer in the first place that then stop there, or about using Report Builder. Based on my understanding of Report Builder, though, that is a SQL Server component and is for use in reporting on SQL server data...the reports in my application are to be based on local data (internal arrays), not SQL related at all. So I should just need the ReportViewer, right?

Thank you very much!

1

1 Answers

0
votes

Crystal Reports offers an easy way to display repots:

Report rpt = new Report() for (int i = 0; i < ds_consultsql.Tables[0].Rows.Count; i++) { ds_tableintheproject.Tables["table"].Rows.Add ( new object[] { ds_info.Tables[0].Rows[i]["camp1"].ToString(), ds_info.Tables[0].Rows[i]["camp2"].ToString(), ds_info.Tables[0].Rows[i]["camp3"].ToString(), ds_info.Tables[0].Rows[i]["campx"].ToString() } ); } rpt.SetDataSource(ds_datos); reportesVW.ReportSource = rpt; reportesVW.DataBind();

you just desing the report add your data from a datatable create in the proyect