Example #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            DeclarationPrint rpt = new DeclarationPrint();

            rpt.Site = this.Site;
            return(rpt);
        }
        internal void ShowDeclarationReport(DataSet DSDeclaration, string userName,int BatchNo, int nMachineCount, string sDropType, 
            string ExchangeConnectionString, string TicketingConnectionString)
        {
            try
            {
                string sVersion, sSiteName;

                var rDSDeclaration = new DeclarationPrint();

                rDSDeclaration.SetDataSource(DSDeclaration);
                rDSDeclaration.SetParameterValue("UserName", userName);
                rDSDeclaration.SetParameterValue("DropType", sDropType);
                if (ExchangeConnectionString.Trim() == "")
                    GetVersion_SiteName(out  sVersion, out  sSiteName);
                else
                    GetVersion_SiteName(out  sVersion, out  sSiteName, ExchangeConnectionString, TicketingConnectionString);
                rDSDeclaration.SetParameterValue("SiteCode", Settings.SiteCode);
                rDSDeclaration.SetParameterValue("siteName", sSiteName);
                rDSDeclaration.SetParameterValue("Version", sVersion);
                rDSDeclaration.SetParameterValue("CurrencyCulture", ExtensionMethods.CurrentCurrenyCulture);
                rDSDeclaration.SetParameterValue("CurrencySymbol", ExtensionMethods.CurrentCurrenyCulture.GetCurrencySymbol());
                rDSDeclaration.SetParameterValue("DateCulture", ExtensionMethods.CurrentDateCulture);
                rDSDeclaration.SetParameterValue("BatchNo", BatchNo);
                rDSDeclaration.SetParameterValue("MachineCount", nMachineCount);

                crystalReportViewer.ReportSource = rDSDeclaration;

                AuditReports();

                strReportName = "Declaration Report";
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     DeclarationPrint rpt = new DeclarationPrint();
     rpt.Site = this.Site;
     return rpt;
 }