当前位置: 首页>>代码示例>>C#>>正文


C# ReportPrintTool.ShowRibbonPreviewDialog方法代码示例

本文整理汇总了C#中ReportPrintTool.ShowRibbonPreviewDialog方法的典型用法代码示例。如果您正苦于以下问题:C# ReportPrintTool.ShowRibbonPreviewDialog方法的具体用法?C# ReportPrintTool.ShowRibbonPreviewDialog怎么用?C# ReportPrintTool.ShowRibbonPreviewDialog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ReportPrintTool的用法示例。


在下文中一共展示了ReportPrintTool.ShowRibbonPreviewDialog方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: fRpt_Load

 private void fRpt_Load(object sender, EventArgs e)
 {
     rptDonDatHang _rptDonDatHang = new rptDonDatHang();
     _rptDonDatHang.obj = objDonDatHang;
     _rptDonDatHang.DataSource = dtDonDatHangCT;
     _rptDonDatHang.DataMember = "ChiTietDonHang";
     using (ReportPrintTool printTool = new ReportPrintTool(_rptDonDatHang))
     {
         printTool.ShowRibbonPreviewDialog();
         printTool.ShowRibbonPreview(UserLookAndFeel.Default);
     }
     this.Close();
 }
开发者ID:TanNguyenNet,项目名称:invoice_service,代码行数:13,代码来源:fRpt.cs

示例2: btnGraphReport_Click


//.........这里部分代码省略.........
                        {
                            countLeads++;
                            LeadsStatus++;
                        }
                    }

                    leadSeriesPerStage.Points.Add(new DevExpress.XtraCharts.SeriesPoint(salesStage.SalesStageName, countLeads));
                    leadSeriesPerStage.LegendTextPattern = "{A} : {V}";
                    countLeads = 0;
                }
                leadSeriesPerStage.ArgumentScaleType = DevExpress.XtraCharts.ScaleType.Qualitative;
                DashboardReportDesign.seriesList3.Add(leadSeriesPerStage);
                #endregion

                #region Overall Leads
                leads = context.Leads.ToList();
                List<string> statuses = new List<string>() {"Engaged client", "Active", "Not active"};
                countLeads = 0; int overAll = leads.Count(); string percent = "";

                foreach (var status in statuses)
                {
                    foreach (var item in leads)
                    {
                        var customerAccount = context.Customers.FirstOrDefault(c => c != null && c.LeadID == item.LeadID);

                        if (item.IsActive == true && status == statuses[0] && customerAccount != null && item.Status == "New Customer")
                        {
                            countLeads++;
                        }
                        else if (item.IsActive == true && status == statuses[1] && customerAccount == null)
                        {
                            countLeads++;
                        }
                        else if (item.IsActive == false && status == statuses[2] && customerAccount == null)
                        {
                            countLeads++;
                        }
                    }

                    Compute(countLeads, overAll, out percent);
                    countLeads = 0;

                    if (status == statuses[0])
                    {
                        if (Convert.ToInt32(percent) < 10)
                        {
                            DashboardReportDesign.lblEngaged.Text = "0" + percent + "%";
                        }
                        else
                        {
                            DashboardReportDesign.lblEngaged.Text = percent + "%";
                        }
                    }
                    else if (status == statuses[1])
                    {
                        if (Convert.ToInt32(percent) < 10)
                        {
                            DashboardReportDesign.lblActive.Text = "0" + percent + "%";
                        }
                        else
                        {
                            DashboardReportDesign.lblActive.Text = percent + "%";
                        }
                    }
                    else if (status == statuses[2])
                    {
                        if (Convert.ToInt32(percent) < 10)
                        {
                            DashboardReportDesign.lblNotActive.Text = "0" + percent + "%";
                        }
                        else
                        {
                            DashboardReportDesign.lblNotActive.Text = percent + "%";
                        }
                    }
                }
                #endregion

                dataList.Add(new DashboardReportData
                {
                    ReportHeader = "NSPIRE INC.",
                    ReportTitle = "GRAPH REPORT as of " + DateTime.Now.ToString("MMMM d, yyyy"),
                    TotalLeads = overAll,
                    TotalLeadsMonth = LeadsMonth,
                    TotalLeadsSalesStage = LeadsStatus,
                    TotalLeadsYear = LeadsYear
                });

                var report = new DashboardReportDesign()
                {
                    DataSource = dataList.Distinct(),
                    Name = "GRAPH REPORT as of " + DateTime.Now.ToString("MMMM d, yyyy")
                };

                using (ReportPrintTool printTool = new ReportPrintTool(report))
                {
                    printTool.ShowRibbonPreviewDialog();
                }
            }
        }
开发者ID:tonryu,项目名称:NSPIRESystem,代码行数:101,代码来源:LeadDashboard.xaml.cs

示例3: btnPrintContact_Click

        private void btnPrintContact_Click(object sender, RoutedEventArgs e)
        {
            using (var context = new DatabaseContext())
            {
                int itemNo = 0;
                if (contactsList.Count() > 0)
                {
                    List<ContactsReportData> dataList = new List<ContactsReportData>();
                    List<ContactsReportDetail> detailsList = new List<ContactsReportDetail>();
                    foreach (var contact in contactsList)
                    {
                        itemNo++;
                        var detail = new ContactsReportDetail();

                        detail.CompanyName = contact.Company;
                        detail.ContactNo = itemNo;
                        detail.ContactPerson = contact.ContactPersonName;
                        detail.PhoneNo = contact.PhoneNo;
                        detail.Position = contact.Position;
                        detailsList.Add(detail);
                    }
                    dataList.Add(new ContactsReportData()
                    {
                        ReportHeader = "CONTACT PERSONS",
                        ReportTitle = "CONTACT PERSONS as of " + DateTime.Now.ToString("MMMM dd, yyyy"),
                        TotalContacts = detailsList.Count(),
                        details = detailsList
                    });

                    var report = new ContactsReportDesign
                    {
                        DataSource = dataList.Distinct(),
                        Name = "CONTACT PERSONS as of "
                            + DateTime.Now.ToString("MMMM dd, yyyy")
                    };

                    using (ReportPrintTool printTool = new ReportPrintTool(report))
                    {
                        printTool.ShowRibbonPreviewDialog();
                    }
                }
                else
                {
                    var windows = new NoticeWindow();
                    NoticeWindow.message = "No details to print.";
                    windows.Height = 0;
                    windows.Top = screenTopEdge + 8;
                    windows.Left = (screenWidth / 2) - (windows.Width / 2);
                    if (screenLeftEdge > 0 || screenLeftEdge < -8) { windows.Left += screenLeftEdge; }
                    windows.ShowDialog();
                }
            }
        }
开发者ID:tonryu,项目名称:NSPIRESystem,代码行数:53,代码来源:LeadMasterData.xaml.cs

示例4: btnPrintLead_Click

        private void btnPrintLead_Click(object sender, RoutedEventArgs e)
        {
            using (var context = new DatabaseContext())
            {
                int itemNo = 0;
                if (leadsList.Count() > 0)
                {
                    List<LeadsReportData> dataList = new List<LeadsReportData>();
                    List<LeadsReportDetail> detailsList = new List<LeadsReportDetail>();
                    foreach (var lead in leadsList)
                    {
                        itemNo++;
                        var detail = new LeadsReportDetail();
                        detail.Address = lead.CompanyAddress;
                        detail.CompanyName = lead.CompanyName;
                        detail.LeadNo = itemNo;
                        detail.SalesStageStatus = lead.SalesStageStatus;
                        detail.Territory = lead.TerritoryName;
                        detailsList.Add(detail);
                    }
                    dataList.Add(new LeadsReportData()
                    {
                        ReportHeader = "LEADS",
                        ReportTitle = "LEADS as of " + DateTime.Now.ToString("MMMM dd, yyyy"),
                        TotalLeads = detailsList.Count(),
                        details = detailsList
                    });

                    var report = new LeadsReportDesign
                    {
                        DataSource = dataList.Distinct(),
                        Name = "LEADS as of "
                            + DateTime.Now.ToString("MMMM dd, yyyy")
                    };

                    using (ReportPrintTool printTool = new ReportPrintTool(report))
                    {
                        printTool.ShowRibbonPreviewDialog();
                    }
                }
                else
                {
                    var windows = new NoticeWindow();
                    NoticeWindow.message = "No data to print.";
                    windows.Height = 0;
                    windows.Top = screenTopEdge + 8;
                    windows.Left = (screenWidth / 2) - (windows.Width / 2);
                    if (screenLeftEdge > 0 || screenLeftEdge < -8) { windows.Left += screenLeftEdge; }
                    windows.ShowDialog();
                }
            }
        }
开发者ID:tonryu,项目名称:NSPIRESystem,代码行数:52,代码来源:LeadMasterData.xaml.cs

示例5: btnPrint_Click

        private void btnPrint_Click(object sender, RoutedEventArgs e)
        {
            using (var context = new DatabaseContext())
            {
                var accounts = context.CustomerAccounts.ToList();
                int accountNo = 0;
                if (accounts.Count() > 0)
                {
                    List<CustomerAccountsReportData> dataList = new List<CustomerAccountsReportData>();
                    List<CustomerAccountsReportDetail> detailsList = new List<CustomerAccountsReportDetail>();
                    foreach (var account in accounts)
                    {
                        accountNo++;
                        var detail = new CustomerAccountsReportDetail();
                        var territory = context.Territories.FirstOrDefault(c => c.TerritoryID == account.TerritoryID);
                        var customer = context.Customers.FirstOrDefault(c => c.CustomerID == account.CustomerID);
                        var product = context.Products.FirstOrDefault(c => c.ProductID == account.ProductID);

                        detail.AccountNumber = Convert.ToString(accountNo);
                        detail.Customer = customer.CompanyName;
                        detail.Discount = account.Discount;
                        detail.Gross = account.Gross;
                        detail.ModeOfPayment = account.ModeOfPayment;
                        detail.NetValue = account.NetValue;
                        detail.Product = product.ProductName;
                        detail.ServiceCharge = account.ServiceCharge;
                        detail.Territory = territory.TerritoryName;
                        detailsList.Add(detail);
                    }
                    dataList.Add(new CustomerAccountsReportData()
                    {
                        ReportHeader = "CUSTOMER ACCOUNTS",
                        ReportTitle = "CUSTOMER ACCOUNTS as of " + DateTime.Now.ToString("MMMM dd, yyyy"),
                        TotalCustomerAccounts = detailsList.Count(),
                        details = detailsList
                    });

                    var report = new CustomerAccountsReportDesign
                    {
                        DataSource = dataList.Distinct(),
                        Name = "CUSTOMER ACCOUNTS as of "
                            + DateTime.Now.ToString("MMMM dd, yyyy")
                    };

                    using (ReportPrintTool printTool = new ReportPrintTool(report))
                    {
                        printTool.ShowRibbonPreviewDialog();
                    }
                }
                else
                {
                    var windows = new Shared.Windows.NoticeWindow();
                    Shared.Windows.NoticeWindow.message = "No data to print.";
                    windows.Height = 0;
                    windows.Top = screenTopEdge + 8;
                    windows.Left = (screenWidth / 2) - (windows.Width / 2);
                    if (screenLeftEdge > 0 || screenLeftEdge < -8) { windows.Left += screenLeftEdge; }
                    windows.ShowDialog();
                }
            }
        }
开发者ID:tonryu,项目名称:NSPIRESystem,代码行数:61,代码来源:CustomerAccounts.xaml.cs

示例6: btnGenerate_Click

        private void btnGenerate_Click(object sender, EventArgs e)
        {
            if (!validator.Validate())
                return;
            try
            {
                SplashScreenManager.ShowForm(this, typeof(PleaseWaitForm), false, false, false);
                DateTime first = new DateTime(Convert.ToInt32(cbYear.EditValue), Convert.ToInt32(cbMonth.EditValue), 1);
                DateTime last = new DateTime(Convert.ToInt32(cbYear.EditValue), Convert.ToInt32(cbMonth.EditValue),
                    DateTime.DaysInMonth(Convert.ToInt32(cbYear.EditValue), Convert.ToInt32(cbMonth.EditValue)));

                driver d = driver.SingleOrDefault(Convert.ToInt64(cbDriver.EditValue));
                List<FeesDriverList> fdl = new List<FeesDriverList>();
                string sql = String.Format("WHERE driver_id = {0} AND start::date BETWEEN '{1:yyyy-MM-dd}' AND '{2:yyyy-MM-dd}' ORDER BY start",
                    d.id, first, last);
                List<freight> fre = freight.Fetch(sql);
                if (fre.Count <= 0)
                {
                    SplashScreenManager.CloseForm(false);
                    XtraMessageBox.Show("Não foi encontrado resultados para este período!");
                    return;
                }
                foreach (freight fr in fre)
                {
                    fdl.Add(new FeesDriverList()
                    {
                        date = Convert.ToDateTime(fr.start),
                        driver = d.full_name,
                        freight_id = fr.id.ToString(),
                        value = fr.value_comission
                    });
                }

                FeesDriverModel f = new FeesDriverModel();
                f.feesList = fdl;
                f.document_driver = d.cpf;
                f.driver = d.full_name;
                f.emission_at = String.Format("Emitido em {0:dd/MM/yyyy HH:mm}", driver.Now());
                f.reference = String.Format("Referente à {0} de {1}", cbMonth.Text, cbYear.EditValue);
                f.signature = "Emitido por CadoreTecnologia";

                FeesDriverReport report = new FeesDriverReport();
                report.bdgFees.DataSource = f;

                foreach (DevExpress.XtraReports.Parameters.Parameter p in report.Parameters)
                {
                    p.Visible = false;
                }
                /*PdfExportOptions po = new PdfExportOptions() {ImageQuality = PdfJpegImageQuality.Highest, Compressed = true };
                report.ExportToPdf("C:\\Users\\William\\Desktop\\testePDF.pdf", po);*/

                /*HtmlExportOptions htmlOptions = report.ExportOptions.Html;
                htmlOptions.CharacterSet = "UTF-8";
                htmlOptions.TableLayout = false;
                htmlOptions.RemoveSecondarySymbols = false;
                htmlOptions.Title = "Teste relatório HTML";
                htmlOptions.ExportMode = HtmlExportMode.SingleFilePageByPage;
                htmlOptions.PageBorderColor = Color.Blue;
                htmlOptions.PageBorderWidth = 3;
                report.ExportToHtml("C:\\Users\\William\\Desktop\\testeHTML.html");*/
                ReportPrintTool tool = new ReportPrintTool(report);
                SplashScreenManager.CloseForm(false);
                tool.ShowRibbonPreviewDialog();
                //this.Close();
            }
            catch (Exception ex)
            {
                SplashScreenManager.CloseForm(false);
                XtraMessageBox.Show(String.Format("Ocorreu um erro:\n{0}\n{1}", ex.Message, ex.InnerException));
            }
        }
开发者ID:cadore,项目名称:TruckSystem,代码行数:71,代码来源:ChooseDriverFeesReport.cs

示例7: btnPrint_Click

        private void btnPrint_Click(object sender, RoutedEventArgs e)
        {
            using (var context = new DatabaseContext())
            {
                int productNo = 0;
                if (productsList.Count() > 0)
                {
                    List<ProductsReportData> dataList = new List<ProductsReportData>();
                    List<ProductsReportDetails> detailsList = new List<ProductsReportDetails>();
                    List<LeadsPerProducts> leadsList = new List<LeadsPerProducts>();
                    var leads = context.Leads.ToList();

                    foreach (var product in productsList)
                    {
                        if (product != null)
                        {
                            productNo++;
                            var detail = new ProductsReportDetails();

                            detail.Category = product.Category;
                            detail.Cost = product.Cost;
                            detail.ProductId = productNo;
                            detail.ProductName = product.ProductName;
                            detailsList.Add(detail);
                        }

                        if (leads != null)
                        {
                            foreach (var lead in leads)
                            {
                                var toReport = new LeadsPerProducts();

                                toReport.LeadName = lead.CompanyName;
                                leadsList.Add(toReport);
                            }
                        }
                    }

                    dataList.Add(new ProductsReportData()
                    {
                        ReportHeader = "PRODUCTS",
                        ReportTitle = "PRODUCTS OF as of " + DateTime.Now.ToString("MMMM dd, yyyy"),
                        TotalProducts = detailsList.Count(),
                        details = detailsList,
                        leads = leadsList
                    });

                    var report = new ProductsReportDesign
                    {
                        DataSource = dataList.Distinct(),
                        Name = "LEAD ACTIVITIES OF as of " + DateTime.Now.ToString("MMMM dd, yyyy")
                    };

                    using (ReportPrintTool printTool = new ReportPrintTool(report))
                    {
                        printTool.ShowRibbonPreviewDialog();
                    }
                }
                else
                {
                    var windows = new NoticeWindow();
                    NoticeWindow.message = "No data to print.";
                    windows.Height = 0;
                    windows.Top = screenTopEdge + 8;
                    windows.Left = (screenWidth / 2) - (windows.Width / 2);
                    if (screenLeftEdge > 0 || screenLeftEdge < -8) { windows.Left += screenLeftEdge; }
                    windows.ShowDialog();
                }
            }
        }
开发者ID:tonryu,项目名称:NSPIRESystem,代码行数:70,代码来源:ProductsMasterData.xaml.cs

示例8: btnPrint_Click

        private void btnPrint_Click(object sender, RoutedEventArgs e)
        {
            using (var context = new DatabaseContext())
            {
                int customerNo = 0;
                if (customersList.Count() > 0)
                {
                    List<CustomersReportData> dataList = new List<CustomersReportData>();
                    List<CustomersReportDetail> detailsList = new List<CustomersReportDetail>();
                    foreach (var customer in customersList.OrderBy(c => c.CustomerID))
                    {
                        customerNo++;
                        var detail = new CustomersReportDetail();
                        var lead = context.Leads.FirstOrDefault
                            (c => c.CompanyName.ToLower() == customer.CompanyName.ToLower());

                        detail.CompanyAddress = customer.CompanyAddress;
                        detail.CompanyName = customer.CompanyName;
                        detail.CustomerID = customerNo;
                        detail.DateSigned = customer.DateSigned;
                        detail.Email = customer.Email;
                        if (lead != null) { detail.FromLead = "FROM LEAD"; } else { detail.FromLead = ""; }
                        detail.PhoneNo = customer.PhoneNo;
                        detail.Website = customer.Website;
                        detailsList.Add(detail);
                    }
                    dataList.Add(new CustomersReportData()
                    {
                        ReportHeader = "CUSTOMERS",
                        ReportTitle = "CUSTOMERS as of " + DateTime.Now.ToString("MMMM dd, yyyy"),
                        TotalCustomers = detailsList.Count(),
                        details = detailsList
                    });

                    var report = new CustomersReportDesign
                    {
                        DataSource = dataList.Distinct(),
                        Name = "CUSTOMERS as of "
                            + DateTime.Now.ToString("MMMM dd, yyyy")
                    };

                    using (ReportPrintTool printTool = new ReportPrintTool(report))
                    {
                        printTool.ShowRibbonPreviewDialog();
                    }
                }
                else
                {
                    var windows = new Shared.Windows.NoticeWindow();
                    Shared.Windows.NoticeWindow.message = "No data to print.";
                    windows.Height = 0;
                    windows.Top = screenTopEdge + 8;
                    windows.Left = (screenWidth / 2) - (windows.Width / 2);
                    if (screenLeftEdge > 0 || screenLeftEdge < -8) { windows.Left += screenLeftEdge; }
                    windows.ShowDialog();
                }
            }
        }
开发者ID:tonryu,项目名称:NSPIRESystem,代码行数:58,代码来源:CustomersMasterData.xaml.cs

示例9: btnGenerate_Click


//.........这里部分代码省略.........
                if (_truck == null)
                    _truck = new truck();
            }

            if (llf.Count <= 0)
            {
                XtraMessageBox.Show("Nenhum resultado encontrado para o período informado!");
                return;
            }

            decimal value_gross = 0;
            SplashScreenManager.ShowForm(this, typeof(PleaseWaitForm), false, false, false);
            trailer t1 = new trailer();
            trailer t2 = new trailer();
            trailer t3 = new trailer();
            if (_truck.id > 0)
            {
                t1 = trailer.SingleOrDefault("WHERE [email protected] AND [email protected]", _truck.id, 1);
                t2 = trailer.SingleOrDefault("WHERE [email protected] AND [email protected]", _truck.id, 2);
                t3 = trailer.SingleOrDefault("WHERE [email protected] AND [email protected]", _truck.id, 3);
            }
            FreightsByTruckModel fm = new FreightsByTruckModel()
            {
                emission_at = String.Format("Emitido em {0:dd/MM/yyyy HH:mm}", freight.Now()),
                reference = String.Format("Período de {0:dd/MM/yyyy} à {1:dd/MM/yyyy}", start, end),
                signature = "Emitido por CadoreTecnologia",
                truck = String.Format("{0} - {1}{2}{3}",
                _truck.board, (t1 != null ? t1.board : ""), (t2 != null ? "/" + t2.board : ""), (t3 != null ? "/" + t3.board : "")),
                driver = _driver.full_name
            };

            if (_truck.id <= 0 && (t1.id <= 0) && (t2.id <= 0) && (t3.id <= 0))
            {
                fm.truck = "Motorista não cadastrado para nenhum veículo.";
                if (_driver.inactive)
                    fm.truck += " Motorista inativo.";
            }

            List<ListFreights> lf = new List<ListFreights>();
            foreach (freight f in llf)
            {
                decimal value_fueleds = 0, value_outputs = 0;
                List<ListFueleds> lfueled = new List<ListFueleds>();
                List<fueled> llfueled = fueled.Fetch("WHERE freight_id = @0", f.id);
                foreach (fueled fu in llfueled)
                {
                    value_fueleds += fu.total;
                    lfueled.Add(new ListFueleds()
                    {
                        date = Convert.ToDateTime(fu.date),
                        liters = fu.liters,
                        discont = fu.discount,
                        value_liters = fu.value_liters,
                        value_total = fu.total,
                        gas_station = customer.SingleOrDefault(fu.gas_station_id).corporate_name
                    });
                }

                List<ListOutputs> loutputs = new List<ListOutputs>();
                List<output> lloutputs = output.Fetch("WHERE freight_id = @0", f.id);
                foreach (output o in lloutputs)
                {
                    value_outputs += o.value;
                    loutputs.Add(new ListOutputs()
                    {
                        date = Convert.ToDateTime(o.date),
                        description = o.description,
                        value = o.value,
                        customer = customer.SingleOrDefault(o.customer_id).corporate_name
                    });
                }

                lf.Add(new ListFreights()
                {
                    comission = f.value_comission,
                    date = Convert.ToDateTime(f.start),
                    id = f.id,
                    listFueleds = lfueled,
                    listOutputs = loutputs,
                    driver = isTruck ? driver.SingleOrDefault(f.driver_id).full_name : truck.SingleOrDefault(f.truck_id).board,
                    outputs = value_outputs,
                    fueleds = value_fueleds,
                    product = f.product,
                    value_ton = f.value_ton,
                    gross = (f.value_ton * f.weight),
                    liquid = ((f.value_ton * f.weight) - (f.value_comission + value_fueleds + value_outputs))
                });
                value_gross += (f.value_ton * f.weight);
            }
            fm.gross = value_gross;
            fm.listFreights = lf;

            FreightsByTruckReport report = new FreightsByTruckReport();
            report.bdgFreigths.DataSource = fm;
            report.list.Value = isTruck ? "Motorista" : "Placa";
            report.start_page.Value = isTruck ? "Veículo" : "Motorista";
            ReportPrintTool tool = new ReportPrintTool(report);
            SplashScreenManager.CloseForm(false);
            tool.ShowRibbonPreviewDialog();
        }
开发者ID:cadore,项目名称:TruckSystem,代码行数:101,代码来源:ChooseTruckFreightsReportForm.cs

示例10: btnPrint_Click

        private void btnPrint_Click(object sender, RoutedEventArgs e)
        {
            using (var context = new DatabaseContext())
            {
                var activities = activityList.ToList();
                int itemNo = 0;
                var lead = context.Leads.FirstOrDefault(c => c.LeadID == LeadId);
                if (activities.Count() > 0)
                {
                    List<LeadActivityReportData> dataList = new List<LeadActivityReportData>();
                    List<LeadActivityReportDetail> detailsList = new List<LeadActivityReportDetail>();

                    foreach (var leadActivity in activities)
                    {
                        var contact = context.Contacts.FirstOrDefault(c => c.ContactPersonName == leadActivity.ContactPerson);

                        if (leadActivity.CompanyName == lead.CompanyName)
                        {
                            itemNo++;
                            var detail = new LeadActivityReportDetail();

                            detail.ActivityDate = leadActivity.ActivityDate;
                            detail.ActivityNo = itemNo;
                            detail.ActivityTime = leadActivity.ActivityTime;
                            detail.ClientResponse = leadActivity.ClientResponse;
                            detail.CompanyName = leadActivity.CompanyName;
                            detail.Cost = leadActivity.Cost;
                            detail.Description = leadActivity.Description;
                            detail.DetailsOfTransaction = leadActivity.TransactionDetails;
                            detail.DueDateOfNextStep = leadActivity.NextStepDueDate;
                            detail.MarketingVoucherNo = leadActivity.MarketingVoucher;
                            detail.NextStep = leadActivity.NextStep;
                            detail.SalesRep = leadActivity.SalesRep;
                            if (contact != null) { detail.ContactPerson = contact.ContactPersonName; }
                            else { detail.ContactPerson = ""; }
                            detailsList.Add(detail);
                        }
                    }

                    dataList.Add(new LeadActivityReportData()
                    {
                        ReportHeader = "LEAD ACTIVITIES",
                        ReportTitle = "LEAD ACTIVITIES of " + lead.CompanyName.ToUpper()
                        + " as of " + DateTime.Now.ToString("MMMM dd, yyyy"),
                        TotalActivities = detailsList.Count(),
                        details = detailsList
                    });

                    var report = new LeadActivityReportDesign
                    {
                        DataSource = dataList.Distinct(),
                        Name = "LEAD ACTIVITIES of " + lead.CompanyName.ToUpper()
                        + " as of " + DateTime.Now.ToString("MMMM dd, yyyy")
                    };

                    using (ReportPrintTool printTool = new ReportPrintTool(report))
                    {
                        printTool.ShowRibbonPreviewDialog();
                    }
                }
                else
                {
                    var windows = new NoticeWindow();
                    NoticeWindow.message = "No data to print.";
                    windows.Height = 0;
                    windows.Top = screenTopEdge + 8;
                    windows.Left = (screenWidth / 2) - (windows.Width / 2);
                    if (screenLeftEdge > 0 || screenLeftEdge < -8) { windows.Left += screenLeftEdge; }
                    windows.ShowDialog();
                }
            }
        }
开发者ID:tonryu,项目名称:NSPIRESystem,代码行数:72,代码来源:LeadActivityMasterData.xaml.cs

示例11: GenerarFicheroFacturaPdfToolStripMenuItemClick

        private void GenerarFicheroFacturaPdfToolStripMenuItemClick(object sender, EventArgs e)
        {
            if (!DatosLineaValido()) return;
            bsFactura.EndEdit();
            Factura factura = bsFactura.Current as Factura;

            ActualizarContadoresLineas();

            try
            {
                XtraReportFactura xtraReport=new XtraReportFactura
                {
                    Factura=factura
                };

                xtraReport.Parameters["licenciaMunicipal"].Value = Settings.Default.licencia;
                xtraReport.Parameters["email"].Value = Settings.Default.email;
                xtraReport.Parameters["Movil"].Value = Settings.Default.movil;
                xtraReport.Parameters["Nif"].Value = Settings.Default.nif;
                xtraReport.Parameters["Telefono"].Value = Settings.Default.telefono;
                xtraReport.Parameters["nombre"].Value = Settings.Default.nombre;
                xtraReport.Parameters["direccion"].Value = Settings.Default.direccion;
                xtraReport.Parameters["poblacion"].Value = Settings.Default.poblacionCP;

                if (!string.IsNullOrEmpty(Settings.Default.Iban))
                {
                    xtraReport.Parameters["poblacion"].Value = string.Format("IBAN: {0}", Settings.Default.Iban);
                }
                else
                {
                    xtraReport.Parameters["poblacion"].Value = string.Format("IBAN: {0}", Settings.Default.ccc);
                }

                SetTextWatermark(xtraReport);

                using (ReportPrintTool printTool = new ReportPrintTool(xtraReport))
                {
                    // Invoke the Ribbon Print Preview form modally,
                    // and load the report document into it.
                    printTool.ShowRibbonPreviewDialog();

                    // Invoke the Ribbon Print Preview form
                    // with the specified look and feel setting.
                    printTool.ShowRibbonPreview(UserLookAndFeel.Default);
                }
                //(new PdfGenerador(factura)).Run();
            }
            catch (Exception exception)
            {
                XtraMessageBox.Show(exception.Message, "Error", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
            }

            if (factura != null) Settings.Default.ultimaFactura = factura.Numero;
            Settings.Default.Save();
        }
开发者ID:mondedos,项目名称:facturasmarianoconchi,代码行数:55,代码来源:Form1.cs


注:本文中的ReportPrintTool.ShowRibbonPreviewDialog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。