private DataGridViewRow[] GetReport(string report) { ReportParameterInfoCollection rpic = null; try { RdlShipperLib.RdlWrapper rdlWrapper = new RdlShipperLib.RdlWrapper(config.ReportServerUrl, report); rdlWrapper.SetCredentials("GenevaSource", "SysReports", "reports1"); rpic = rdlWrapper.Parameters; } catch (Exception ex) { MessageBox.Show(ex.ToString().Replace("/GenevaReports/", ""), "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); log.Error(ex); return null; } #region initialize datagrid dgvParameters.Columns.Add("Name", "Parameter"); dgvParameters.Columns.Add("Value", "Value(s)"); dgvParameters.Columns[0].Width = 150; // Convert.ToInt32(444 * 0.4); dgvParameters.Columns[1].Width = dgvParameters.Width - 170; // Convert.ToInt32(444 * 0.6); #endregion return DisplayReportArgs(rpic); }
private void DisplayReportArgs() { try { string report = String.Format("/GenevaReports/{0}", lblReport.Text); RdlShipperLib.RdlWrapper rdlWrapper = new RdlShipperLib.RdlWrapper(config.ReportServerUrl, report); ReportParameterInfoCollection rpic = rdlWrapper.Parameters; #region initialize datagrid if(!dgvParameters.Columns.Contains("Name")) dgvParameters.Columns.Add("Name", "Parameter"); ; if (!dgvParameters.Columns.Contains("Value")) dgvParameters.Columns.Add("Value", "Value(s)"); #endregion GetReportArgs(rpic); } catch { } }