private void button3_Click(object sender, EventArgs e) { //CrystalDecisions.Windows.Forms.CrystalReportViewer crystalReportViewer // = Utility.ViewReport("TakingInventory_Report", null); frmReportViewer host = new frmReportViewer(); // host.Controls.Add(crystalReportViewer); host.Controls["crystalReportViewer1"].Dock = DockStyle.Fill; host.Show(); }
private void button2_Click(object sender, EventArgs e) { try { List<KeyValuePair<string, object>> paramList = new List<KeyValuePair<string, object>>(); paramList.Add(new KeyValuePair<string, object>("@InventoryID", Convert.ToInt32(cmb_Inventory.SelectedValue))); CrystalDecisions.Windows.Forms.CrystalReportViewer crystalReportViewer = Utility.ViewReport("InventoryStock_Report.rpt", paramList); frmReportViewer host = new frmReportViewer(); host.Controls.Add(crystalReportViewer); host.Controls["crystalReportViewer1"].Dock = DockStyle.Fill; host.Show(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }