I need to create a simple, stand-alone application that will allow for users to input some data and then print a report. I would prefer to use SSRS as a reporting engine but I
You can use the standalone Reporting Services ReportViewer control with a DataSet from a SQL Server Compact database file, that runs completely locally and does not require any SQL Server installtion.
I do that in my SQL Server Compact Toolbox, with code similar to this (full source available at http://sqlcetoolbox.codeplex.com ) :
public partial class ReportGrid : UserControl
{
public ReportGrid()
{
InitializeComponent();
}
public DataSet DataSet { get; set; }
public string TableName { get; set; }
private void ReportGrid_Load(object sender, EventArgs e)
{
if (DataSet != null)
{
DataSet.DataSetName = TableName;
Stream rdlc = RdlcHelper.BuildRDLCStream(
DataSet, TableName);
reportView.LocalReport.LoadReportDefinition(rdlc);
reportView.LocalReport.DataSources.Clear();
reportView.LocalReport.DataSources.Add(
new ReportDataSource(DataSet.DataSetName, DataSet.Tables[0]));
reportView.RefreshReport();
}
}
}