public ReportViewDlg(ReportInfo info) { reportInfo = info; this.Build (); TabName = reportInfo.Title; reportviewer1.DefaultExportFileName = reportInfo.Title; panelParameters.Visible = false; LoadReport(reportInfo); }
public static string GenerateHashName(ReportInfo reportInfo) { string parameters = "_"; foreach(var pair in reportInfo.Parameters) { parameters += String.Format("{0}={1}", pair.Key, pair.Value); } if (parameters == "_") parameters = String.Empty; return String.Format("Report_{0}{1}", reportInfo.Identifier, parameters); }
void LoadReport(ReportInfo info) { logger.Debug (String.Format ("Report Parameters[{0}]", info.GetParametersString ())); reportviewer1.LoadReport (info.GetReportUri (), info.GetParametersString (), info.ConnectionString, true); }
private Report GetReportFromFile(ReportInfo reportInfo) { RDLParser rdlp; Report r; string source = System.IO.File.ReadAllText(reportInfo.GetPath()); rdlp = new RDLParser(source); rdlp.Folder = System.IO.Path.GetDirectoryName (reportInfo.GetPath()); rdlp.OverwriteConnectionString = reportInfo.ConnectionString; rdlp.OverwriteInSubreport = true; r = rdlp.Parse(); return r; }