コード例 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            AnalysisDetailsReport rpt = new AnalysisDetailsReport();

            rpt.Site = this.Site;
            return(rpt);
        }
コード例 #2
0
        internal void ShowReportsAnalysisDetails(DataTable dtAnalysisDetails, string sReportName, bool isPrint, Decimal TotalAvgBet, string sAnalysisDetails)
        {

            string sVersion, sSiteName;

            try
            {
                this.ReportsPrintDialog = new System.Windows.Forms.PrintDialog();
                this.ReportsPrintDocument = new System.Drawing.Printing.PrintDocument();

                var vReportsAnalysisDetails = new AnalysisDetailsReport();
                vReportsAnalysisDetails.SetDataSource(dtAnalysisDetails);
                vReportsAnalysisDetails.SetParameterValue("@ReportName", sReportName);

                GetVersion_SiteName(out  sVersion, out  sSiteName);

                vReportsAnalysisDetails.SetParameterValue("siteName", sSiteName);
                vReportsAnalysisDetails.SetParameterValue("BMCVersion", sVersion);
                vReportsAnalysisDetails.SetParameterValue("TotalAvgBet", TotalAvgBet);
                vReportsAnalysisDetails.SetParameterValue("CurrencyCulture", ExtensionMethods.CurrentCurrenyCulture);
                vReportsAnalysisDetails.SetParameterValue("CurrencySymbol", ExtensionMethods.CurrentCurrenyCulture.GetCurrencySymbol());
                vReportsAnalysisDetails.SetParameterValue("SiteCode", Settings.SiteCode);
                if (isPrint)
                {
                    this.ReportsPrintDialog.Document = this.ReportsPrintDocument;
                    DialogResult dr = this.ReportsPrintDialog.ShowDialog();

                    if (dr == DialogResult.OK)
                    {
                        int nCopy = this.ReportsPrintDocument.PrinterSettings.Copies;
                        int sPage = this.ReportsPrintDocument.PrinterSettings.FromPage;
                        int ePage = this.ReportsPrintDocument.PrinterSettings.ToPage;
                        string PrinterName = this.ReportsPrintDocument.PrinterSettings.PrinterName;

                        vReportsAnalysisDetails.PrintOptions.PrinterName = PrinterName;
                        vReportsAnalysisDetails.PrintToPrinter(nCopy, false, sPage, ePage);
                    }
                }
                else
                {
                    ExportReports(vReportsAnalysisDetails, sAnalysisDetails);
                }

                AuditReports();
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }
        }
コード例 #3
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     AnalysisDetailsReport rpt = new AnalysisDetailsReport();
     rpt.Site = this.Site;
     return rpt;
 }