public static void ShowReport(EMDataSet emDataSet,int contid,string reportDescription) { GenericCrystalViewer view = new GenericCrystalViewer(); view.Text = "Balance Report"; BalanceReport report = new BalanceReport(); report.SetDataSource(emDataSet); view.viewer.ReportSource = report; ParameterFields fields = new ParameterFields(); ParameterField field = new ParameterField(); field.ParameterFieldName = "contNumber"; ParameterDiscreteValue discrete = new ParameterDiscreteValue(); discrete.Value = emDataSet.ContainerTbl.FindByContID(contid).ContNumber; field.CurrentValues.Add(discrete); fields.Add(field); ParameterField field2 = new ParameterField(); field2.ParameterFieldName = "ReportDescription"; ParameterDiscreteValue discrete2 = new ParameterDiscreteValue(); discrete2.Value = reportDescription; field2.CurrentValues.Add(discrete2); fields.Add(field2); view.viewer.ParameterFieldInfo = fields; view.Show(); }
private void showGradeTotalsBtn_Click(object sender, System.EventArgs e) { GenericCrystalViewer v = new GenericCrystalViewer(); v.Text = "Monthly Sales View"; POItemReport report = new POItemReport(); EMDataSet copyDataSet = (EMDataSet)m_emDataSet.Copy(); foreach (EMDataSet.POItemTblRow itemRow in copyDataSet.POItemTbl) { if (!itemRow.IsCancelDateNull()) { itemRow.Delete(); continue; } if (itemRow.POID != GetHeaderRow().POID) itemRow.Delete(); } copyDataSet.AcceptChanges(); report.SetDataSource(copyDataSet); v.viewer.ReportSource = report; v.Show(); }
private void etaReport_Click(object sender, EventArgs e) { try { string friendlyConstraints; EMDataSet dataSet = CreateContainerViewOfDataSet(out friendlyConstraints); GenericCrystalViewer v = new GenericCrystalViewer(); v.Text = "ETA Report"; ParameterFields fields = new ParameterFields(); ParameterField field = new ParameterField(); field.ParameterFieldName = "reportDescription"; ParameterDiscreteValue discrete = new ParameterDiscreteValue(); discrete.Value = friendlyConstraints; field.CurrentValues.Add(discrete); fields.Add(field); v.viewer.ParameterFieldInfo = fields; ContETAReport report = new ContETAReport(); report.SetDataSource(dataSet); v.viewer.ReportSource = report; v.Show(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void ShowCrystalReport(EMDataSet dataSet, ReportClass report, string reportName, string friendlyConstraints) { GenericCrystalViewer v = new GenericCrystalViewer(); v.Text = reportName; ParameterFields fields = new ParameterFields(); ParameterField field = new ParameterField(); field.ParameterFieldName = "reportDescription"; ParameterDiscreteValue discrete = new ParameterDiscreteValue(); discrete.Value = friendlyConstraints; field.CurrentValues.Add(discrete); fields.Add(field); v.viewer.ParameterFieldInfo = fields; report.SetDataSource(dataSet); v.viewer.ReportSource = report; v.Show(); }