public static void GenerateNewReport(DataTable tbl, string path, string caption)
        {
            StiReport report = new StiReport();

            //Add tbl to datastore
            report.RegData("tbl", tbl);

            //Fill dictionary
            report.Dictionary.Synchronize();
            report.Dictionary.DataSources[0].Name = "tbl";
            report.Dictionary.DataSources[0].Alias = "tbl";

            //StiPage page = report.Pages[0];
            foreach (StiPage page in report.Pages)
            {

                //Create header
                if (report.Pages.IndexOf(page) == 0)
                {
                    StiText header = new StiText(new RectangleD(0, 0, page.Width, page.Height / 20), caption);
                    StiText period = new StiText(new RectangleD(0, page.Height / 20, page.Width, page.Height / 20), tbl.TableName);
                    header.HorAlignment = StiTextHorAlignment.Center;
                    header.Font = new Font("Arial", 22.5f);
                    period.HorAlignment = StiTextHorAlignment.Center;
                    header.Font = new Font("Arial", 12f);
                    page.Components.Add(header);
                    page.Components.Add(period);
                    header.Render();
                    period.Render();
                }

                //Create HeaderBand
                StiHeaderBand headerBand = new StiHeaderBand();
                headerBand.Height = 0.5;
                headerBand.Name = "HeaderBand";
                page.Components.Add(headerBand);

                //Create Databand
                StiDataBand dataBand = new StiDataBand();
                dataBand.DataSourceName = "tbl";
                dataBand.Height = 0.5;
                dataBand.Name = "DataBand";
                page.Components.Add(dataBand);

                //Create texts
                double pos = 0;

                double columnWidth = StiAlignValue.AlignToMinGrid(page.Width / tbl.Columns.Count, 0.1, true);

                int nameIndex = 1;

                foreach (DataColumn dataColumn in tbl.Columns)
                {

                    //Create text on header
                    StiText headerText = new StiText(new RectangleD(pos, page.Height / 10, columnWidth, 0.5));
                    headerText.Text.Value = dataColumn.Caption;
                    headerText.HorAlignment = StiTextHorAlignment.Center;
                    headerText.Name = "HeaderText" + nameIndex.ToString();
                    headerText.Brush = new StiSolidBrush(Color.LightGray);
                    headerText.Border.Side = StiBorderSides.All;
                    headerBand.Components.Add(headerText);

                    //Create text on Data Band
                    StiText dataText = new StiText(new RectangleD(pos, 0, columnWidth, 0.5));
                    dataText.Text.Value = "{tbl." + Stimulsoft.Report.CodeDom.StiCodeDomSerializator.ReplaceSymbols(dataColumn.ColumnName) + "}";
                    dataText.Name = "DataText" + nameIndex.ToString();
                    dataText.Border.Side = StiBorderSides.All;

                    //Add highlight
                    StiCondition condition = new StiCondition();
                    condition.BackColor = Color.DarkGray;
                    condition.TextColor = Color.Black;
                    condition.Expression = "(Line & 1) == 1";
                    condition.Item = StiFilterItem.Expression;
                    dataText.Conditions.Add(condition);

                    dataBand.Components.Add(dataText);

                    pos = pos + columnWidth;

                    nameIndex++;
                }

                //Create FooterBand
                StiFooterBand footerBand = new StiFooterBand();
                footerBand.Height = 0.5;
                footerBand.Name = "FooterBand";
                page.Components.Add(footerBand);

                //Create text on footer
                StiText footerText = new StiText(new RectangleD(0, 0, page.Width, 0.5));
                footerText.Text.Value = "Всего записей - {Count()}";
                footerText.HorAlignment = StiTextHorAlignment.Right;
                footerText.Name = "FooterText";
                footerText.Brush = new StiSolidBrush(Color.Gray);
                footerBand.Components.Add(footerText);

                report.Show();
            }
        }
Beispiel #2
0
        public void OnRunningSalesAndBuyInvoicesReport(Entity reportEntity, Stimulsoft.Report.StiReport report, Dictionary <string, object> parameters)
        {
            var reportDataTable = new DataTable("ReportTable");

            var invoiceType = parameters["InvoiceType"] as string;

            EntityList salesAndBuysList = new EntityList();

            //var accountReviewType = parameters["AccountReviewType"];

            reportDataTable.Columns.Add("IssueDate");
            reportDataTable.Columns.Add("DocType_PersianText");
            reportDataTable.Columns.Add("InvoiceNumber");
            reportDataTable.Columns.Add("TotalStuffAndServicesPrice", typeof(decimal));
            reportDataTable.Columns.Add("GeneralDiscount", typeof(decimal));
            reportDataTable.Columns.Add("StuffAndServicesTotalAmountAfterDiscount", typeof(decimal));
            reportDataTable.Columns.Add("TotalTaxAndToll", typeof(decimal));
            reportDataTable.Columns.Add("FinalAmount", typeof(decimal));

            for (int i = 0; i < ps.SalesAndBuyInvoices.Entities.Count; i++)
            {
                Entity saleAndBuyEntity = ps.SalesAndBuyInvoices.Entities[i];

                var docType = saleAndBuyEntity.GetFieldValue <string>("DocType");

                if (docType == invoiceType)
                {
                    salesAndBuysList.Entities.Add(saleAndBuyEntity);
                }
            }

            foreach (var entity in salesAndBuysList.Entities)
            {
                var row = reportDataTable.NewRow();

                row["IssueDate"]                  = entity.GetFieldValue <string>("IssueDate");
                row["DocType_PersianText"]        = entity.GetFieldValue <string>("DocType_PersianText");
                row["InvoiceNumber"]              = entity.GetFieldValue <string>("InvoiceNumber");
                row["TotalStuffAndServicesPrice"] = entity.GetFieldValue <decimal>("TotalStuffAndServicesPrice");
                row["GeneralDiscount"]            = entity.GetFieldValue <decimal>("GeneralDiscount");
                row["StuffAndServicesTotalAmountAfterDiscount"] = entity.GetFieldValue <decimal>("StuffAndServicesTotalAmountAfterDiscount");
                row["TotalTaxAndToll"] = entity.GetFieldValue <decimal>("TotalTaxAndToll");
                row["FinalAmount"]     = entity.GetFieldValue <decimal>("FinalAmount");

                reportDataTable.Rows.Add(row);
            }


            report.Dictionary.DataSources.Clear();

            report.RegData("DataSource1", reportDataTable);
            report.Dictionary.Synchronize();

            StiDataBand dataBand1 = (StiDataBand)report.GetComponentByName("DataBand1");

            dataBand1.DataSourceName = "ReportTable";
            //report.DataSources.Clear();
            //var list = (StiDataBand)report.GetComponentByName("DataBand1");
        }
Beispiel #3
0
        public IReportBuilder WithDataBand(List <string> fields, double[] sizes, List <TextAlign> aligns = null, string dataSetName = "dataset", double height = 0.2)
        {
            CurrentData = new StiDataBand(MakeRectangle(0, 0, 0, height))
            {
                DataSourceName = dataSetName
            };

            var condition = new StiCondition
            {
                BackColor  = Color.FromArgb(0),
                TextColor  = Color.Transparent,
                Expression = "(Line & 1) == 1",
                Item       = StiFilterItem.Expression
            };

            CurrentData.Conditions.Add(condition);

            Page.Components.Add(CurrentData);


            var newVariable = new StiVariable()
            {
                Name  = "Xdec",
                Alias = "Xdec",
                Value = "10",
                Type  = typeof(int)
            };

            Report.Dictionary.Variables.Add(newVariable);


            CurrentData.BeforePrintEvent = new StiBeforePrintEvent("Xdec=Xdec+1;");
            CurrentData.AfterPrintEvent  = new StiAfterPrintEvent("Xdec=Xdec+1;");



            var x = 0.0;

            for (var i = 0; i < fields.Count; i++)
            {
                TextAlign align;
                if (aligns != null)
                {
                    align = aligns[i];
                }
                else
                {
                    align = Fields.FirstOrDefault(a => string.Equals(a.Item1, fields[i], StringComparison.CurrentCultureIgnoreCase))?.Item3 ?? TextAlign.Right;
                }

                var text    = "{" + $"{dataSetName}.{fields[i]}" + "}";
                var stiText = _textBuilder.New(text).WithFormat(MakeFormat(fields[i])).WithPosition(x)
                              .WithSize(sizes[i]).WithAlign((StiTextHorAlignment)align).Then();
                x += sizes[i];
                CurrentData.Components.Add(stiText);
            }

            return(this);
        }
Beispiel #4
0
        public static void CreateAndSendReport(string email)
        {
            //create report
            const string ReportsDirectory = "../../../Reports";

            var Report   = new StiReport();
            var page     = Report.Pages[0];
            var dataBand = new StiDataBand();

            dataBand.Height = 0.5;
            dataBand.Name   = "DataBand";
            page.Components.Add(dataBand);
            dataBand.Components.Add(new StiText(new RectangleD(0, 0, 5, 0.5))
            {
                Text = DateTime.Now.ToString()
            });
            dataBand.Components.Add(new StiText(new RectangleD(3, 0, 5, 0.5))
            {
                Text = "Makishev E A"
            });

            Report.Render();

            var exportFilePath = $"{ReportsDirectory}/SP_Report{DateTime.Now.ToString("yyyy-dd-MM_HH-mm-ss")}.xls";

            Report.Render(false);
            Report.ExportDocument(StiExportFormat.Excel, exportFilePath);

            // send report
            try
            {
                MailMessage mail       = new MailMessage();
                SmtpClient  SmtpServer = new SmtpClient("smtp.mail.ru");

                mail.From = new MailAddress("*****@*****.**");
                mail.To.Add(email);
                mail.Subject = "Report";
                mail.Body    = $"Hello i sended my first Stmulsoft report";
                Attachment reportFile = new Attachment(exportFilePath);
                mail.Attachments.Add(reportFile);

                SmtpServer.Port        = 587;
                SmtpServer.Credentials = new System.Net.NetworkCredential("*****@*****.**", "aidana05012008");
                SmtpServer.EnableSsl   = true;

                SmtpServer.Send(mail);
            }
            catch
            {
                Console.WriteLine("Mail don't sended!");
            }
        }
Beispiel #5
0
        private void ReadDataBand(XmlNode node, StiPage page, StiBand masterBand)
        {
            StiDataBand band = new StiDataBand();

            page.Components.Add(band);

            ReadBand(node, band);

            band.MasterComponent = masterBand;

            string dataSource = ReadString(node, "DataSource", band.Name);

            band.DataSourceName = dataSource;
        }
Beispiel #6
0
        private void click(object sender, EventArgs e)
        {
            StiComponent comp       = sender as StiComponent;
            string       customerID = (string)comp.BookmarkValue;

            if (customerID != null)
            {
                StiReport report = new StiReport();
                report.RegData(dataSet1);
                report.Load("..\\Details.mrt");
                StiDataBand dataBand = (StiDataBand)report.Pages["Page1"].Components["DataBand1"];
                StiFilter   filter   = new StiFilter("{Orders.CustomerID==\"" + customerID + "\"}");
                dataBand.Filters.Add(filter);
                report.Show();
            }
        }
Beispiel #7
0
        private void ReadDetailBand(XtraReportBase xtraReport, DetailBand xtraBand, StiPage page)
        {
            StiDataBand band = new StiDataBand();

            page.Components.Add(band);

            ReadBand(xtraBand, band);

            band.EvenStyle = xtraBand.EvenStyleName;
            band.OddStyle  = xtraBand.OddStyleName;

            string dsName = ParseDatasourceName(xtraReport.DataMember, true);

            band.DataSourceName   = dsName;
            band.DataRelationName = ParseRelationName(xtraReport.DataMember);
        }
Beispiel #8
0
        public void OnRunningConnectedAccountsrReport(Entity reportEntity, Stimulsoft.Report.StiReport report, Dictionary <string, object> parameters)
        {
            DataTable connectedAccountstDataTable = new DataTable("ReportTable");

            var core = CoreComponent.Instance;
            var connectedAccounts = core.TryGetUserSessionKeyValue("acc", "ConnectedAccounts");

            EntityList connectedAccountsEntityList = (EntityList)connectedAccounts;

            //var accountReviewType = parameters["AccountReviewType"];

            connectedAccountstDataTable.Columns.Add("CodeAndName");
            connectedAccountstDataTable.Columns.Add("AccountName");
            connectedAccountstDataTable.Columns.Add("DebtorAmount", typeof(decimal));
            connectedAccountstDataTable.Columns.Add("CreditorAmount", typeof(decimal));
            //connectedAccountstDataTable.Columns.Add("RemainingDebtorAmount", typeof(decimal));
            //connectedAccountstDataTable.Columns.Add("RemainingCreditorAmount", typeof(decimal));


            foreach (var entity in connectedAccountsEntityList.Entities)
            {
                var row = connectedAccountstDataTable.NewRow();

                row["CodeAndName"] = entity.GetFieldValue <string>("CodeAndName");
                row["AccountName"] = entity.GetFieldValue <string>("AccountName");
                //row["DebtorAmount"] = entity.GetFieldValue<string>("AccountCode");
                //row["CreditorAmount"] = entity.GetFieldValue<string>("FarsiAccountReviewType");
                row["DebtorAmount"]   = entity.GetFieldValue <decimal>("DebtorAmount");
                row["CreditorAmount"] = entity.GetFieldValue <decimal>("CreditorAmount");
                //row["RemainingDebtorAmount"] = entity.GetFieldValue<decimal>("RemainingDebtorAmount");
                //row["RemainingCreditorAmount"] = entity.GetFieldValue<decimal>("RemainingCreditorAmount");

                connectedAccountstDataTable.Rows.Add(row);
            }

            report.Dictionary.DataSources.Clear();

            report.RegData("ReportTable", connectedAccountstDataTable);
            report.Dictionary.Synchronize();

            StiDataBand dataBand1 = (StiDataBand)report.GetComponentByName("DataBand1");

            dataBand1.DataSourceName = "ReportTable";
        }
Beispiel #9
0
        private static void AddLineNo(ref StiText hText, ref StiText dataText, ref StiHeaderBand headerBand, ref StiDataBand dataBand)
        {
            double pos       = 0;
            int    nameIndex = 1;

            #region line
            //Create text on header
            hText               = new StiText(new RectangleD(pos, 0, 1, 0.5));
            hText.Text.Value    = "ردیف";
            hText.HorAlignment  = StiTextHorAlignment.Center;
            hText.VertAlignment = StiVertAlignment.Center;
            hText.Font          = new System.Drawing.Font("Tahoma", 10);
            hText.Brush         = new StiSolidBrush(Color.LightBlue);
            hText.Name          = "LineText" + nameIndex.ToString();
            hText.WordWrap      = true;
            hText.CanGrow       = true;
            hText.GrowToHeight  = true;
            hText.Border.Side   = StiBorderSides.All;
            headerBand.Components.Add(hText);

            dataText = new StiText(new RectangleD(pos, 0, 1, 0.5));
            dataText.HorAlignment  = StiTextHorAlignment.Center;
            dataText.VertAlignment = StiVertAlignment.Center;
            dataText.Font          = new System.Drawing.Font("Tahoma", 10);
            dataText.Text          = "{Line}";
            dataText.WordWrap      = true;
            dataText.CanGrow       = true;
            dataText.GrowToHeight  = true;
            dataText.Border.Side   = StiBorderSides.All;
            dataText.Interaction.SortingEnabled = true;
            dataBand.Components.Add(dataText);

            #endregion line
        }
Beispiel #10
0
        public static Exception ExportToExcel(ref DataTable dt, string OutputPath, bool HasPageHeader = true, bool HasHeaderBand = true,
                                              bool HasFooter = true, bool HasLineNo = false)
        {
            try
            {
                DateTime  ExportTimeStart = DateTime.Now;
                StiReport report          = new StiReport();
                StiPage   page            = report.Pages[0];
                page.PaperSize = System.Drawing.Printing.PaperKind.Custom;
                page.PageWidth = dt.Columns.Count * 1.2;
                StiHeaderBand headerBand = new StiHeaderBand();
                StiText       headerText = new StiText(new RectangleD(0, 0, page.Width, 0.5));
                page.RightToLeft = true;
                dt.TableName     = "Result";

                if (HasPageHeader)
                {
                    AddPageHeader(ref page, ref headerText);
                }

                if (HasFooter)
                {
                    AddFooter(ref page);
                }

                HasHeaderBand = false;
                if (HasHeaderBand)
                {
                    AddHasHeaderBand(ref headerText, ref page, ref headerBand);
                }

                #region Data
                //Create Databand
                StiDataBand dataBand = new StiDataBand();
                dataBand.DataSourceName = "Result";
                dataBand.Height         = 0.5;
                dataBand.CanGrow        = true;
                dataBand.GrowToHeight   = true;
                headerText.HorAlignment = StiTextHorAlignment.Right;
                dataBand.Name           = "DataBand1";
                page.Components.Add(dataBand);

                #endregion data

                double pos         = 0;
                double columnWidth = (page.Width - 1) / dt.Columns.Count;
                int    nameIndex   = 1;
                // StiDataTableSource userSource = new StiDataTableSource("Result", "Result", "Result");

                StiText hText    = new StiText();
                StiText dataText = new StiText();


                #region FillHeaderAndDate
                foreach (DataColumn dataColumn in dt.Columns)
                {
                    //userSource.Columns.Add(new Stimulsoft.Report.Dictionary.StiDataColumn(dataColumn.ColumnName, dataColumn.GetType()));

                    //Create text on header
                    //  StiText
                    hText = new StiText(new RectangleD(pos, 0, columnWidth, 0.5));
                    hText.HorAlignment  = StiTextHorAlignment.Center;
                    hText.VertAlignment = StiVertAlignment.Center;
                    hText.Font          = new System.Drawing.Font("Tahoma", 10);
                    hText.Brush         = new StiSolidBrush(Color.LightSteelBlue);
                    hText.Interaction.SortingEnabled = true;
                    hText.Interaction.SortingColumn  = "DataBand." + Stimulsoft.Report.CodeDom.StiCodeDomSerializator.ReplaceSymbols(dataColumn.ColumnName);
                    hText.Text.Value   = dataColumn.Caption;
                    hText.Name         = "HeaderText" + nameIndex.ToString();
                    hText.WordWrap     = true;
                    hText.CanGrow      = true;
                    hText.GrowToHeight = true;
                    hText.Border.Side  = StiBorderSides.All;
                    headerBand.Components.Add(hText);

                    //StiText
                    dataText = new StiText(new RectangleD(pos, 0, columnWidth, 0.5));
                    dataText.HorAlignment               = StiTextHorAlignment.Center;
                    dataText.VertAlignment              = StiVertAlignment.Center;
                    dataText.Font                       = new System.Drawing.Font("Tahoma", 10);
                    dataText.Text                       = "{Result." + Stimulsoft.Report.CodeDom.StiCodeDomSerializator.ReplaceSymbols(dataColumn.ColumnName) + "}";
                    dataText.Name                       = "DataText" + nameIndex.ToString();
                    dataText.WordWrap                   = true;
                    dataText.CanGrow                    = true;
                    dataText.GrowToHeight               = true;
                    dataText.ShrinkFontToFit            = true;
                    dataText.Border.Side                = StiBorderSides.All;
                    dataText.Interaction.SortingEnabled = true;
                    dataBand.Components.Add(dataText);
                    pos = pos + columnWidth;
                    nameIndex++;
                }
                #endregion

                if (HasLineNo)
                {
                    AddLineNo(ref hText, ref dataText, ref headerBand, ref dataBand);
                }
                string rptPath = System.IO.Path.GetTempFileName();
                report.RegData("Result", dt);
                //report.Save(rptPath);
                //report.Load(rptPath);
                //report.RegData("Result", dt);
                report.Design();
                //userSource.SetData()
                //userSource.Dictionary =


                //report.CacheAllData = true;
                report.Render(true);

                StiExcel2007ExportService excelExport = new StiExcel2007ExportService();
                //StiExcelExportService excelExport = new StiExcelExportService();
                excelExport.ExportExcel(report, OutputPath);


                DateTime ExportTimeEnd = DateTime.Now;
                ExportTime = (ExportTimeEnd - ExportTimeStart);

                return(null);
            }
            catch (Exception ex)
            {
                return(ex);
            }
        }
 private void InitializeComponent()
 {
     T_Detail = new T_DetailDataSource();
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyName", "MyCompanyName", "", typeof(string), "", false, false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyTaxCode", "MyCompanyTaxCode", "", typeof(string), "", false, false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyDirectorName", "MyCompanyDirectorName", "", typeof(string), "", false, false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyCountryCode", "MyCompanyCountryCode", "", typeof(string), "", false, false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyCountryName", "MyCompanyCountryName", "", typeof(string), "", false, false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyCity", "MyCompanyCity", "", typeof(string), "", false, false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyPostalCode", "MyCompanyPostalCode", "", typeof(string), "", false, false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyAddress", "MyCompanyAddress", "", typeof(string), "", false, false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyPhone", "MyCompanyPhone", "", typeof(string), "", false, false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyFax", "MyCompanyFax", "", typeof(string), "", false, false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyBankName", "MyCompanyBankName", "", typeof(string), "", false, false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyBankCode", "MyCompanyBankCode", "", typeof(string), "", false, false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyBankAccountNumber", "MyCompanyBankAccountNumber", "", typeof(string), "", false, false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyVATPayerFlag", "MyCompanyVATPayerFlag", "", typeof(bool), "", false, false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyConditionalUnitCurrencyCode", "MyCompanyConditionalUnitCurrencyCode", "", typeof(string), "", false, false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyDefaultTradingCurrencyCode", "MyCompanyDefaultTradingCurrencyCode", "", typeof(string), "", false, false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyConditionalUnitCurrencyRate", "MyCompanyConditionalUnitCurrencyRate", "", typeof(decimal), "", false, false, false));
     NeedsCompiling = false;
     // Variables init
     // Variables init
     MyCompanyName                        = "";
     MyCompanyTaxCode                     = "";
     MyCompanyDirectorName                = "";
     MyCompanyCountryCode                 = "";
     MyCompanyCountryName                 = "";
     MyCompanyCity                        = "";
     MyCompanyPostalCode                  = "";
     MyCompanyAddress                     = "";
     MyCompanyPhone                       = "";
     MyCompanyFax                         = "";
     MyCompanyBankName                    = "";
     MyCompanyBankCode                    = "";
     MyCompanyBankAccountNumber           = "";
     MyCompanyVATPayerFlag                = false;
     MyCompanyConditionalUnitCurrencyCode = "";
     MyCompanyDefaultTradingCurrencyCode  = "";
     MyCompanyConditionalUnitCurrencyRate = 0m;
     EngineVersion                        = StiEngineVersion.EngineV2;
     ReferencedAssemblies                 = new[] {
         "System.Dll",
         "System.Drawing.Dll",
         "System.Windows.Forms.Dll",
         "System.Data.Dll",
         "System.Xml.Dll",
         "Stimulsoft.Controls.Dll",
         "Stimulsoft.Base.Dll",
         "Stimulsoft.Report.Dll"
     };
     ReportAlias  = "Rpt Produc Location Price";
     ReportAuthor = "Programmer.GE";
     //
     // ReportChanged
     //
     ReportChanged = new DateTime(2011, 6, 12, 21, 55, 48, 0);
     //
     // ReportCreated
     //
     ReportCreated     = new DateTime(2009, 6, 28, 22, 3, 23, 0);
     ReportDescription = "პრაისი";
     ReportFile        = "D:\\User\\Documents\\Projects\\Apothex\\Source\\Class Library\\Apothex.Reporting\\Product" +
                         "ion\\RptProducLocationPrice.mrt";
     ReportGuid     = "e242476ffaeb44b39344532841ed84f0";
     ReportName     = "RptProducLocationPrice";
     ReportUnit     = StiReportUnitType.Centimeters;
     ReportVersion  = "2010.3.900";
     ScriptLanguage = StiReportLanguageType.CSharp;
     //
     // Page1
     //
     Page1            = new StiPage();
     Page1.Columns    = 2;
     Page1.Guid       = "0edad2017ef5402da56612e0faa7a32a";
     Page1.Name       = "Page1";
     Page1.PageHeight = 29.7;
     Page1.PageWidth  = 21;
     Page1.PaperSize  = PaperKind.A4;
     Page1.Border     = new StiBorder(StiBorderSides.None, Color.Black, 2, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Page1.Brush      = new StiSolidBrush(Color.Transparent);
     //
     // PageHeaderBand1
     //
     PageHeaderBand1 = new StiPageHeaderBand();
     PageHeaderBand1.ClientRectangle = new RectangleD(0, 0.4, 20, 2.2);
     PageHeaderBand1.Name            = "PageHeaderBand1";
     PageHeaderBand1.PrintOn         = StiPrintOnType.OnlyFirstPage;
     PageHeaderBand1.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     PageHeaderBand1.Brush           = new StiSolidBrush(Color.Transparent);
     //
     // Text4
     //
     Text4 = new StiText();
     Text4.ClientRectangle = new RectangleD(2.4, 0, 7.6, 2);
     Text4.Name            = "Text4";
     Text4.GetValue       += new StiGetValueEventHandler(Text4__GetValue);
     Text4.VertAlignment   = StiVertAlignment.Center;
     Text4.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Text4.Brush           = new StiSolidBrush(Color.Transparent);
     Text4.Font            = new Font("BPG Glaho Arial", 7F, FontStyle.Bold);
     Text4.Guid            = null;
     Text4.Interaction     = null;
     Text4.Margins         = new StiMargins(0, 0, 0, 0);
     Text4.TextBrush       = new StiSolidBrush(Color.Black);
     Text4.TextOptions     = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // Image1
     //
     Image1                      = new StiImage();
     Image1.AspectRatio          = true;
     Image1.ClientRectangle      = new RectangleD(0, 0, 2, 2);
     Image1.Guid                 = "b4725dd4d92a41f5a0f373916b5b430e";
     Image1.HorAlignment         = StiHorAlignment.Center;
     Image1.Name                 = "Image1";
     Image1.Stretch              = true;
     Image1.VertAlignment        = StiVertAlignment.Center;
     Image1.Border               = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Image1.Brush                = new StiSolidBrush(Color.Transparent);
     Image1.Image                = null;
     Image1.Interaction          = null;
     PageHeaderBand1.Guid        = null;
     PageHeaderBand1.Interaction = null;
     //
     // PageFooterBand1
     //
     PageFooterBand1 = new StiPageFooterBand();
     PageFooterBand1.ClientRectangle = new RectangleD(0, 28.1, 20, 0.6);
     PageFooterBand1.Name            = "PageFooterBand1";
     PageFooterBand1.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     PageFooterBand1.Brush           = new StiSolidBrush(Color.Transparent);
     //
     // Text3
     //
     Text3 = new StiText();
     Text3.ClientRectangle       = new RectangleD(0, 0, 19, 0.6);
     Text3.HorAlignment          = StiTextHorAlignment.Center;
     Text3.Name                  = "Text3";
     Text3.GetValue             += new StiGetValueEventHandler(Text3__GetValue);
     Text3.VertAlignment         = StiVertAlignment.Center;
     Text3.Border                = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Text3.Brush                 = new StiSolidBrush(Color.Transparent);
     Text3.Font                  = new Font("Arial", 8F);
     Text3.Guid                  = null;
     Text3.Interaction           = null;
     Text3.Margins               = new StiMargins(0, 0, 0, 0);
     Text3.TextBrush             = new StiSolidBrush(Color.Black);
     Text3.TextOptions           = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     PageFooterBand1.Guid        = null;
     PageFooterBand1.Interaction = null;
     //
     // HeaderVW_ProductLocation
     //
     HeaderVW_ProductLocation = new StiHeaderBand();
     HeaderVW_ProductLocation.ClientRectangle = new RectangleD(0, 3.4, 10, 0.6);
     HeaderVW_ProductLocation.Name            = "HeaderVW_ProductLocation";
     HeaderVW_ProductLocation.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     HeaderVW_ProductLocation.Brush           = new StiSolidBrush(Color.Transparent);
     //
     // HeaderVW_ProductLocation_MedicamentName
     //
     HeaderVW_ProductLocation_MedicamentName = new StiText();
     HeaderVW_ProductLocation_MedicamentName.ClientRectangle = new RectangleD(0, 0, 5.2, 0.6);
     HeaderVW_ProductLocation_MedicamentName.HorAlignment    = StiTextHorAlignment.Center;
     HeaderVW_ProductLocation_MedicamentName.Name            = "HeaderVW_ProductLocation_MedicamentName";
     HeaderVW_ProductLocation_MedicamentName.GetValue       += new StiGetValueEventHandler(HeaderVW_ProductLocation_MedicamentName__GetValue);
     HeaderVW_ProductLocation_MedicamentName.VertAlignment   = StiVertAlignment.Center;
     HeaderVW_ProductLocation_MedicamentName.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     HeaderVW_ProductLocation_MedicamentName.Brush           = new StiSolidBrush(Color.Gainsboro);
     HeaderVW_ProductLocation_MedicamentName.Font            = new Font("BPG Glaho Arial", 7F, FontStyle.Bold);
     HeaderVW_ProductLocation_MedicamentName.Guid            = null;
     HeaderVW_ProductLocation_MedicamentName.Interaction     = null;
     HeaderVW_ProductLocation_MedicamentName.Margins         = new StiMargins(0, 0, 0, 0);
     HeaderVW_ProductLocation_MedicamentName.TextBrush       = new StiSolidBrush(Color.Black);
     HeaderVW_ProductLocation_MedicamentName.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // HeaderVW_ProductLocation_CountryName
     //
     HeaderVW_ProductLocation_CountryName = new StiText();
     HeaderVW_ProductLocation_CountryName.ClientRectangle = new RectangleD(5.2, 0, 2.2, 0.6);
     HeaderVW_ProductLocation_CountryName.HorAlignment    = StiTextHorAlignment.Center;
     HeaderVW_ProductLocation_CountryName.Name            = "HeaderVW_ProductLocation_CountryName";
     HeaderVW_ProductLocation_CountryName.GetValue       += new StiGetValueEventHandler(HeaderVW_ProductLocation_CountryName__GetValue);
     HeaderVW_ProductLocation_CountryName.VertAlignment   = StiVertAlignment.Center;
     HeaderVW_ProductLocation_CountryName.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     HeaderVW_ProductLocation_CountryName.Brush           = new StiSolidBrush(Color.Gainsboro);
     HeaderVW_ProductLocation_CountryName.Font            = new Font("BPG Glaho Arial", 7F, FontStyle.Bold);
     HeaderVW_ProductLocation_CountryName.Guid            = null;
     HeaderVW_ProductLocation_CountryName.Interaction     = null;
     HeaderVW_ProductLocation_CountryName.Margins         = new StiMargins(0, 0, 0, 0);
     HeaderVW_ProductLocation_CountryName.TextBrush       = new StiSolidBrush(Color.Black);
     HeaderVW_ProductLocation_CountryName.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // HeaderVW_ProductLocation_ListPrice
     //
     HeaderVW_ProductLocation_ListPrice = new StiText();
     HeaderVW_ProductLocation_ListPrice.ClientRectangle = new RectangleD(9, 0, 1, 0.6);
     HeaderVW_ProductLocation_ListPrice.HorAlignment    = StiTextHorAlignment.Center;
     HeaderVW_ProductLocation_ListPrice.Name            = "HeaderVW_ProductLocation_ListPrice";
     HeaderVW_ProductLocation_ListPrice.GetValue       += new StiGetValueEventHandler(HeaderVW_ProductLocation_ListPrice__GetValue);
     HeaderVW_ProductLocation_ListPrice.VertAlignment   = StiVertAlignment.Center;
     HeaderVW_ProductLocation_ListPrice.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     HeaderVW_ProductLocation_ListPrice.Brush           = new StiSolidBrush(Color.Gainsboro);
     HeaderVW_ProductLocation_ListPrice.Font            = new Font("BPG Glaho Arial", 7F, FontStyle.Bold);
     HeaderVW_ProductLocation_ListPrice.Guid            = null;
     HeaderVW_ProductLocation_ListPrice.Interaction     = null;
     HeaderVW_ProductLocation_ListPrice.Margins         = new StiMargins(0, 0, 0, 0);
     HeaderVW_ProductLocation_ListPrice.TextBrush       = new StiSolidBrush(Color.Black);
     HeaderVW_ProductLocation_ListPrice.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // Text2
     //
     Text2 = new StiText();
     Text2.ClientRectangle                = new RectangleD(7.4, 0, 1.6, 0.6);
     Text2.Guid                           = "b2ee6a7204874db4bc1e2bae90edc3a9";
     Text2.HorAlignment                   = StiTextHorAlignment.Center;
     Text2.Name                           = "Text2";
     Text2.GetValue                      += new StiGetValueEventHandler(Text2__GetValue);
     Text2.Type                           = StiSystemTextType.Expression;
     Text2.VertAlignment                  = StiVertAlignment.Center;
     Text2.Border                         = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Text2.Brush                          = new StiSolidBrush(Color.Gainsboro);
     Text2.Font                           = new Font("BPG Glaho Arial", 7F, FontStyle.Bold);
     Text2.Interaction                    = null;
     Text2.Margins                        = new StiMargins(0, 0, 0, 0);
     Text2.TextBrush                      = new StiSolidBrush(Color.Black);
     Text2.TextOptions                    = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     HeaderVW_ProductLocation.Guid        = null;
     HeaderVW_ProductLocation.Interaction = null;
     //
     // DataVW_ProductLocation
     //
     DataVW_ProductLocation = new StiDataBand();
     DataVW_ProductLocation.ClientRectangle = new RectangleD(0, 4.8, 10, 0.6);
     DataVW_ProductLocation.DataSourceName  = "T_Detail";
     DataVW_ProductLocation.Name            = "DataVW_ProductLocation";
     DataVW_ProductLocation.Sort            = new[] {
         "ASC",
         "ProductName"
     };
     DataVW_ProductLocation.Border             = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     DataVW_ProductLocation.Brush              = new StiSolidBrush(Color.Transparent);
     DataVW_ProductLocation.BusinessObjectGuid = null;
     //
     // DataVW_ProductLocation_MedicamentName
     //
     DataVW_ProductLocation_MedicamentName                 = new StiText();
     DataVW_ProductLocation_MedicamentName.CanGrow         = true;
     DataVW_ProductLocation_MedicamentName.ClientRectangle = new RectangleD(0, 0, 5.2, 0.6);
     DataVW_ProductLocation_MedicamentName.Name            = "DataVW_ProductLocation_MedicamentName";
     DataVW_ProductLocation_MedicamentName.GetValue       += new StiGetValueEventHandler(DataVW_ProductLocation_MedicamentName__GetValue);
     DataVW_ProductLocation_MedicamentName.VertAlignment   = StiVertAlignment.Center;
     DataVW_ProductLocation_MedicamentName.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     DataVW_ProductLocation_MedicamentName.Brush           = new StiSolidBrush(Color.Transparent);
     DataVW_ProductLocation_MedicamentName.Font            = new Font("BPG Glaho Arial", 6F);
     DataVW_ProductLocation_MedicamentName.Guid            = null;
     DataVW_ProductLocation_MedicamentName.Interaction     = null;
     DataVW_ProductLocation_MedicamentName.Margins         = new StiMargins(0, 0, 0, 0);
     DataVW_ProductLocation_MedicamentName.TextBrush       = new StiSolidBrush(Color.Black);
     DataVW_ProductLocation_MedicamentName.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // DataVW_ProductLocation_CountryName
     //
     DataVW_ProductLocation_CountryName                 = new StiText();
     DataVW_ProductLocation_CountryName.CanGrow         = true;
     DataVW_ProductLocation_CountryName.ClientRectangle = new RectangleD(5.2, 0, 2.2, 0.6);
     DataVW_ProductLocation_CountryName.HorAlignment    = StiTextHorAlignment.Right;
     DataVW_ProductLocation_CountryName.Name            = "DataVW_ProductLocation_CountryName";
     DataVW_ProductLocation_CountryName.GetValue       += new StiGetValueEventHandler(DataVW_ProductLocation_CountryName__GetValue);
     DataVW_ProductLocation_CountryName.VertAlignment   = StiVertAlignment.Center;
     DataVW_ProductLocation_CountryName.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     DataVW_ProductLocation_CountryName.Brush           = new StiSolidBrush(Color.Transparent);
     DataVW_ProductLocation_CountryName.Font            = new Font("BPG Glaho Arial", 6F);
     DataVW_ProductLocation_CountryName.Guid            = null;
     DataVW_ProductLocation_CountryName.Interaction     = null;
     DataVW_ProductLocation_CountryName.Margins         = new StiMargins(0, 0, 0, 0);
     DataVW_ProductLocation_CountryName.TextBrush       = new StiSolidBrush(Color.Black);
     DataVW_ProductLocation_CountryName.TextFormat      = new StiPercentageFormatService(0, 0, ",", 4, " ", 3, "%", true, false, " ");
     DataVW_ProductLocation_CountryName.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // DataVW_ProductLocation_ListPrice
     //
     DataVW_ProductLocation_ListPrice                 = new StiText();
     DataVW_ProductLocation_ListPrice.CanGrow         = true;
     DataVW_ProductLocation_ListPrice.ClientRectangle = new RectangleD(9, 0, 1, 0.6);
     DataVW_ProductLocation_ListPrice.HorAlignment    = StiTextHorAlignment.Right;
     DataVW_ProductLocation_ListPrice.Name            = "DataVW_ProductLocation_ListPrice";
     DataVW_ProductLocation_ListPrice.GetValue       += new StiGetValueEventHandler(DataVW_ProductLocation_ListPrice__GetValue);
     DataVW_ProductLocation_ListPrice.VertAlignment   = StiVertAlignment.Center;
     DataVW_ProductLocation_ListPrice.Border          = new StiBorder(StiBorderSides.Right, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     DataVW_ProductLocation_ListPrice.Brush           = new StiSolidBrush(Color.Transparent);
     DataVW_ProductLocation_ListPrice.Font            = new Font("BPG Glaho Arial", 6F);
     DataVW_ProductLocation_ListPrice.Guid            = null;
     DataVW_ProductLocation_ListPrice.Interaction     = null;
     DataVW_ProductLocation_ListPrice.Margins         = new StiMargins(0, 0, 0, 0);
     DataVW_ProductLocation_ListPrice.TextBrush       = new StiSolidBrush(Color.Black);
     DataVW_ProductLocation_ListPrice.TextFormat      = new StiNumberFormatService(1, ",", 2, " ", 3, true, false, " ");
     DataVW_ProductLocation_ListPrice.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // Text1
     //
     Text1                 = new StiText();
     Text1.CanGrow         = true;
     Text1.ClientRectangle = new RectangleD(7.4, 0, 1.6, 0.6);
     Text1.Guid            = "5cfcbb441d534f4ba95c949ddd2c6da5";
     Text1.HorAlignment    = StiTextHorAlignment.Right;
     Text1.Name            = "Text1";
     Text1.GetValue       += new StiGetValueEventHandler(Text1__GetValue);
     Text1.Type            = StiSystemTextType.DataColumn;
     Text1.VertAlignment   = StiVertAlignment.Center;
     Text1.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Text1.Brush           = new StiSolidBrush(Color.Transparent);
     Text1.Font            = new Font("BPG Glaho Arial", 6F);
     Text1.Interaction     = null;
     Text1.Margins         = new StiMargins(0, 0, 0, 0);
     Text1.TextBrush       = new StiSolidBrush(Color.Black);
     Text1.TextFormat      = new StiPercentageFormatService(0, 0, ",", 2, " ", 3, "%", true, true, " ");
     Text1.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     DataVW_ProductLocation.DataRelationName = null;
     DataVW_ProductLocation.Guid             = null;
     DataVW_ProductLocation.Interaction      = null;
     DataVW_ProductLocation.MasterComponent  = null;
     Page1.ExcelSheetValue     = null;
     Page1.Interaction         = null;
     Page1.Margins             = new StiMargins(0.5, 0.5, 0.5, 0.5);
     Page1_Watermark           = new StiWatermark();
     Page1_Watermark.Font      = new Font("Arial", 100F);
     Page1_Watermark.Image     = null;
     Page1_Watermark.TextBrush = new StiSolidBrush(Color.FromArgb(50, 0, 0, 0));
     Page1.Rendering          += new EventHandler(Page1_Rendering);
     RptProducLocationPrice_PrinterSettings = new StiPrinterSettings();
     PrinterSettings                 = RptProducLocationPrice_PrinterSettings;
     Page1.Report                    = this;
     Page1.Watermark                 = Page1_Watermark;
     PageHeaderBand1.Page            = Page1;
     PageHeaderBand1.Parent          = Page1;
     Text4.Page                      = Page1;
     Text4.Parent                    = PageHeaderBand1;
     Image1.Page                     = Page1;
     Image1.Parent                   = PageHeaderBand1;
     PageFooterBand1.Page            = Page1;
     PageFooterBand1.Parent          = Page1;
     Text3.Page                      = Page1;
     Text3.Parent                    = PageFooterBand1;
     HeaderVW_ProductLocation.Page   = Page1;
     HeaderVW_ProductLocation.Parent = Page1;
     HeaderVW_ProductLocation_MedicamentName.Page   = Page1;
     HeaderVW_ProductLocation_MedicamentName.Parent = HeaderVW_ProductLocation;
     HeaderVW_ProductLocation_CountryName.Page      = Page1;
     HeaderVW_ProductLocation_CountryName.Parent    = HeaderVW_ProductLocation;
     HeaderVW_ProductLocation_ListPrice.Page        = Page1;
     HeaderVW_ProductLocation_ListPrice.Parent      = HeaderVW_ProductLocation;
     Text2.Page   = Page1;
     Text2.Parent = HeaderVW_ProductLocation;
     DataVW_ProductLocation.Page   = Page1;
     DataVW_ProductLocation.Parent = Page1;
     DataVW_ProductLocation_MedicamentName.Page   = Page1;
     DataVW_ProductLocation_MedicamentName.Parent = DataVW_ProductLocation;
     DataVW_ProductLocation_CountryName.Page      = Page1;
     DataVW_ProductLocation_CountryName.Parent    = DataVW_ProductLocation;
     DataVW_ProductLocation_ListPrice.Page        = Page1;
     DataVW_ProductLocation_ListPrice.Parent      = DataVW_ProductLocation;
     Text1.Page   = Page1;
     Text1.Parent = DataVW_ProductLocation;
     EndRender   += new EventHandler(RptProducLocationPriceWordsToEnd__EndRender);
     //
     // Add to PageHeaderBand1.Components
     //
     PageHeaderBand1.Components.Clear();
     PageHeaderBand1.Components.AddRange(new StiComponent[] {
         Text4,
         Image1
     });
     //
     // Add to PageFooterBand1.Components
     //
     PageFooterBand1.Components.Clear();
     PageFooterBand1.Components.AddRange(new StiComponent[] {
         Text3
     });
     //
     // Add to HeaderVW_ProductLocation.Components
     //
     HeaderVW_ProductLocation.Components.Clear();
     HeaderVW_ProductLocation.Components.AddRange(new StiComponent[] {
         HeaderVW_ProductLocation_MedicamentName,
         HeaderVW_ProductLocation_CountryName,
         HeaderVW_ProductLocation_ListPrice,
         Text2
     });
     //
     // Add to DataVW_ProductLocation.Components
     //
     DataVW_ProductLocation.Components.Clear();
     DataVW_ProductLocation.Components.AddRange(new StiComponent[] {
         DataVW_ProductLocation_MedicamentName,
         DataVW_ProductLocation_CountryName,
         DataVW_ProductLocation_ListPrice,
         Text1
     });
     //
     // Add to Page1.Components
     //
     Page1.Components.Clear();
     Page1.Components.AddRange(new StiComponent[] {
         PageHeaderBand1,
         PageFooterBand1,
         HeaderVW_ProductLocation,
         DataVW_ProductLocation
     });
     //
     // Add to Pages
     //
     Pages.Clear();
     Pages.AddRange(new[] {
         Page1
     });
     T_Detail.Columns.AddRange(new[] {
         new StiDataColumn("ProductID", "ProductID", "ProductID", typeof(int)),
         new StiDataColumn("ProductName", "ProductName", "ProductName", typeof(string)),
         new StiDataColumn("CountryName", "CountryName", "CountryName", typeof(string)),
         new StiDataColumn("Serie", "Serie", "Serie", typeof(string)),
         new StiDataColumn("UnitPrice", "UnitPrice", "UnitPrice", typeof(decimal)),
         new StiDataColumn("Discount", "Discount", "Discount", typeof(decimal))
     });
     DataSources.Add(T_Detail);
 }
Beispiel #12
0
 private void InitializeComponent()
 {
     VW_Country           = new VW_CountryDataSource();
     NeedsCompiling       = false;
     EngineVersion        = StiEngineVersion.EngineV2;
     ReferencedAssemblies = new[] {
         "System.Dll",
         "System.Drawing.Dll",
         "System.Windows.Forms.Dll",
         "System.Data.Dll",
         "System.Xml.Dll",
         "Stimulsoft.Controls.Dll",
         "Stimulsoft.Base.Dll",
         "Stimulsoft.Report.Dll"
     };
     ReportAlias = "Rpt Country";
     //
     // ReportChanged
     //
     ReportChanged = new DateTime(2009, 2, 7, 14, 30, 56, 0);
     //
     // ReportCreated
     //
     ReportCreated  = new DateTime(2008, 9, 2, 21, 7, 22, 0);
     ReportFile     = "D:\\User\\Documents\\Projects\\Apothex\\Source\\Class Library\\Apothex.Reporting\\Dictionary\\RptCountry.mrt";
     ReportGuid     = "af5c1e936cdf4e129cbdeae2455e3cea";
     ReportName     = "RptCountry";
     ReportUnit     = StiReportUnitType.Centimeters;
     ReportVersion  = "2008.2.300";
     ScriptLanguage = StiReportLanguageType.CSharp;
     //
     // Page1
     //
     Page1             = new StiPage();
     Page1.ColumnGaps  = 1;
     Page1.Columns     = 2;
     Page1.ColumnWidth = 9;
     Page1.Guid        = "cace94e76442472aa8acc7b42034809c";
     Page1.Name        = "Page1";
     Page1.PageHeight  = 29.7;
     Page1.PageWidth   = 21;
     Page1.PaperSize   = PaperKind.A4;
     Page1.Border      = new StiBorder(StiBorderSides.None, Color.Black, 2, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black), false);
     Page1.Brush       = new StiSolidBrush(Color.Transparent);
     //
     // ReportTitle
     //
     ReportTitle = new StiReportTitleBand();
     ReportTitle.ClientRectangle = new RectangleD(0, 0.4, 9, 0.8);
     ReportTitle.Name            = "ReportTitle";
     ReportTitle.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black), false);
     ReportTitle.Brush           = new StiSolidBrush(Color.Transparent);
     //
     // ReportTitleText
     //
     ReportTitleText = new StiText();
     ReportTitleText.ClientRectangle = new RectangleD(0, 0, 19, 0.8);
     ReportTitleText.HorAlignment    = StiTextHorAlignment.Center;
     ReportTitleText.Name            = "ReportTitleText";
     ReportTitleText.GetValue       += new StiGetValueEventHandler(ReportTitleText__GetValue);
     ReportTitleText.Type            = StiSystemTextType.Expression;
     ReportTitleText.VertAlignment   = StiVertAlignment.Center;
     ReportTitleText.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black), false);
     ReportTitleText.Brush           = new StiSolidBrush(Color.Transparent);
     ReportTitleText.Font            = new Font("BPG Glaho Arial", 12F, FontStyle.Bold);
     ReportTitleText.Guid            = null;
     ReportTitleText.Indicator       = null;
     ReportTitleText.Interaction     = null;
     ReportTitleText.Margins         = new StiMargins(0, 0, 0, 0);
     ReportTitleText.TextBrush       = new StiSolidBrush(Color.Black);
     ReportTitleText.TextOptions     = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     ReportTitle.Guid        = null;
     ReportTitle.Interaction = null;
     //
     // Header
     //
     Header = new StiHeaderBand();
     Header.ClientRectangle = new RectangleD(0, 2, 9, 0.8);
     Header.Name            = "Header";
     Header.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black), false);
     Header.Brush           = new StiSolidBrush(Color.Transparent);
     //
     // HeaderText1
     //
     HeaderText1 = new StiText();
     HeaderText1.ClientRectangle = new RectangleD(0, 0, 2, 0.8);
     HeaderText1.Name            = "HeaderText1";
     HeaderText1.GetValue       += new StiGetValueEventHandler(HeaderText1__GetValue);
     HeaderText1.Type            = StiSystemTextType.Expression;
     HeaderText1.VertAlignment   = StiVertAlignment.Center;
     HeaderText1.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black), false);
     HeaderText1.Brush           = new StiSolidBrush(Color.Transparent);
     HeaderText1.Font            = new Font("BPG Glaho Arial", 10F, FontStyle.Bold);
     HeaderText1.Guid            = null;
     HeaderText1.Indicator       = null;
     HeaderText1.Interaction     = null;
     HeaderText1.Margins         = new StiMargins(0, 0, 0, 0);
     HeaderText1.TextBrush       = new StiSolidBrush(Color.Black);
     HeaderText1.TextOptions     = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // HeaderText2
     //
     HeaderText2 = new StiText();
     HeaderText2.ClientRectangle = new RectangleD(2, 0, 7, 0.8);
     HeaderText2.Name            = "HeaderText2";
     HeaderText2.GetValue       += new StiGetValueEventHandler(HeaderText2__GetValue);
     HeaderText2.Type            = StiSystemTextType.Expression;
     HeaderText2.VertAlignment   = StiVertAlignment.Center;
     HeaderText2.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black), false);
     HeaderText2.Brush           = new StiSolidBrush(Color.Transparent);
     HeaderText2.Font            = new Font("BPG Glaho Arial", 10F, FontStyle.Bold);
     HeaderText2.Guid            = null;
     HeaderText2.Indicator       = null;
     HeaderText2.Interaction     = null;
     HeaderText2.Margins         = new StiMargins(0, 0, 0, 0);
     HeaderText2.TextBrush       = new StiSolidBrush(Color.Black);
     HeaderText2.TextOptions     = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     Header.Guid        = null;
     Header.Interaction = null;
     //
     // DataVW_Country
     //
     DataVW_Country = new StiDataBand();
     DataVW_Country.ClientRectangle = new RectangleD(0, 3.6, 9, 0.6);
     DataVW_Country.DataSourceName  = "VW_Country";
     DataVW_Country.Name            = "DataVW_Country";
     DataVW_Country.Sort            = new[] {
         "ASC",
         "CountryCode"
     };
     DataVW_Country.Border             = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black), false);
     DataVW_Country.Brush              = new StiSolidBrush(Color.Transparent);
     DataVW_Country.BusinessObjectGuid = null;
     //
     // DataText1
     //
     DataText1 = new StiText();
     DataText1.ClientRectangle = new RectangleD(0, 0, 2, 0.6);
     DataText1.GrowToHeight    = true;
     DataText1.Name            = "DataText1";
     DataText1.GetValue       += new StiGetValueEventHandler(DataText1__GetValue);
     DataText1.Type            = StiSystemTextType.Expression;
     DataText1.VertAlignment   = StiVertAlignment.Center;
     DataText1.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black), false);
     DataText1.Brush           = new StiSolidBrush(Color.Transparent);
     DataText1.Font            = new Font("BPG Glaho Arial", 10F);
     DataText1.Guid            = null;
     DataText1.Indicator       = null;
     DataText1.Interaction     = null;
     DataText1.Margins         = new StiMargins(0, 0, 0, 0);
     DataText1.TextBrush       = new StiSolidBrush(Color.Black);
     DataText1.TextOptions     = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // DataText2
     //
     DataText2                      = new StiText();
     DataText2.CanGrow              = true;
     DataText2.ClientRectangle      = new RectangleD(2, 0, 7, 0.6);
     DataText2.Name                 = "DataText2";
     DataText2.GetValue            += new StiGetValueEventHandler(DataText2__GetValue);
     DataText2.Type                 = StiSystemTextType.Expression;
     DataText2.VertAlignment        = StiVertAlignment.Center;
     DataText2.Border               = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black), false);
     DataText2.Brush                = new StiSolidBrush(Color.Transparent);
     DataText2.Font                 = new Font("BPG Glaho Arial", 10F);
     DataText2.Guid                 = null;
     DataText2.Indicator            = null;
     DataText2.Interaction          = null;
     DataText2.Margins              = new StiMargins(0, 0, 0, 0);
     DataText2.TextBrush            = new StiSolidBrush(Color.Black);
     DataText2.TextOptions          = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     DataVW_Country.Guid            = null;
     DataVW_Country.Interaction     = null;
     DataVW_Country.MasterComponent = null;
     //
     // Footer
     //
     Footer = new StiFooterBand();
     Footer.ClientRectangle     = new RectangleD(0, 5, 9, 0.6);
     Footer.Name                = "Footer";
     Footer.Border              = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black), false);
     Footer.Brush               = new StiSolidBrush(Color.Transparent);
     Footer.Guid                = null;
     Footer.Interaction         = null;
     Page1.ExcelSheetValue      = null;
     Page1.Interaction          = null;
     Page1.Margins              = new StiMargins(1, 1, 1, 1);
     Page1_Watermark            = new StiWatermark();
     Page1_Watermark.Font       = new Font("Arial", 100F);
     Page1_Watermark.Image      = null;
     Page1_Watermark.TextBrush  = new StiSolidBrush(Color.FromArgb(50, 0, 0, 0));
     RptCountry_PrinterSettings = new StiPrinterSettings();
     PrinterSettings            = RptCountry_PrinterSettings;
     Page1.Report               = this;
     Page1.Watermark            = Page1_Watermark;
     ReportTitle.Page           = Page1;
     ReportTitle.Parent         = Page1;
     ReportTitleText.Page       = Page1;
     ReportTitleText.Parent     = ReportTitle;
     Header.Page                = Page1;
     Header.Parent              = Page1;
     HeaderText1.Page           = Page1;
     HeaderText1.Parent         = Header;
     HeaderText2.Page           = Page1;
     HeaderText2.Parent         = Header;
     DataVW_Country.Page        = Page1;
     DataVW_Country.Parent      = Page1;
     DataText1.Page             = Page1;
     DataText1.Parent           = DataVW_Country;
     DataText2.Page             = Page1;
     DataText2.Parent           = DataVW_Country;
     Footer.Page                = Page1;
     Footer.Parent              = Page1;
     //
     // Add to ReportTitle.Components
     //
     ReportTitle.Components.Clear();
     ReportTitle.Components.AddRange(new StiComponent[] {
         ReportTitleText
     });
     //
     // Add to Header.Components
     //
     Header.Components.Clear();
     Header.Components.AddRange(new StiComponent[] {
         HeaderText1,
         HeaderText2
     });
     //
     // Add to DataVW_Country.Components
     //
     DataVW_Country.Components.Clear();
     DataVW_Country.Components.AddRange(new StiComponent[] {
         DataText1,
         DataText2
     });
     //
     // Add to Page1.Components
     //
     Page1.Components.Clear();
     Page1.Components.AddRange(new StiComponent[] {
         ReportTitle,
         Header,
         DataVW_Country,
         Footer
     });
     //
     // Add to Pages
     //
     Pages.Clear();
     Pages.AddRange(new[] {
         Page1
     });
     VW_Country.Columns.AddRange(new[] {
         new StiDataColumn("Approver", "Approver", "Approver", typeof(string)),
         new StiDataColumn("ApproverUserID", "ApproverUserID", "ApproverUserID", typeof(int)),
         new StiDataColumn("CountryCode", "CountryCode", "CountryCode", typeof(string)),
         new StiDataColumn("ModifiedDate", "ModifiedDate", "ModifiedDate", typeof(DateTime)),
         new StiDataColumn("ModifiedUserID", "ModifiedUserID", "ModifiedUserID", typeof(int)),
         new StiDataColumn("Modifier", "Modifier", "Modifier", typeof(string)),
         new StiDataColumn("Name", "Name", "Name", typeof(string)),
         new StiDataColumn("Status", "Status", "Status", typeof(byte))
     });
     DataSources.Add(VW_Country);
 }
        private void PrintDataGrid(DataGrid sender)
        {
            DataView  dataView = (DataView)sender.DataSource;
            StiReport report   = new StiReport();

            report.ScriptLanguage = StiReportLanguageType.CSharp;

            //Add data to datastore
            report.RegData("view", dataView);

            //Fill dictionary
            report.Dictionary.Synchronize();
            StiPage page = report.Pages.Items[0];

            //Create HeaderBand
            StiHeaderBand headerBand = new StiHeaderBand();

            headerBand.Height = 0.5f;
            headerBand.Name   = "HeaderBand";
            page.Components.Add(headerBand);

            //Create Dataaband
            StiDataBand dataBand = new StiDataBand();

            dataBand.DataSourceName = "view" + dataView.Table.TableName;
            dataBand.Height         = 0.5f;
            dataBand.Name           = "DataBand";
            page.Components.Add(dataBand);

            //Create texts
            Double pos         = 0;
            Double columnWidth = StiAlignValue.AlignToMinGrid(page.Width / dataView.Table.Columns.Count, 0.1, true);
            int    nameIndex   = 1;

            foreach (DataColumn column in dataView.Table.Columns)
            {
                //Create text on header
                StiText headerText = new StiText(new RectangleD(pos, 0, columnWidth, 0.5f));
                headerText.Text.Value   = column.Caption;
                headerText.HorAlignment = StiTextHorAlignment.Center;
                headerText.Name         = "HeaderText" + nameIndex.ToString();
                headerText.Brush        = new StiSolidBrush(Color.LightGreen);
                headerText.Border.Side  = StiBorderSides.All;
                headerBand.Components.Add(headerText);

                //Create text on Data Band
                StiText dataText = new StiText(new RectangleD(pos, 0, columnWidth, 0.5f));
                dataText.Text.Value  = "{view" + dataView.Table.TableName + "." + Stimulsoft.Report.CodeDom.StiCodeDomSerializator.ReplaceSymbols(column.ColumnName) + "}";
                dataText.Name        = "DataText" + nameIndex.ToString();
                dataText.Border.Side = StiBorderSides.All;

                //Add highlight
                StiCondition condition = new StiCondition();
                condition.BackColor  = Color.CornflowerBlue;
                condition.TextColor  = Color.Black;
                condition.Expression = "(Line & 1) == 1";
                condition.Item       = StiFilterItem.Expression;
                dataText.Conditions.Add(condition);

                dataBand.Components.Add(dataText);

                pos += columnWidth;

                nameIndex++;
            }
            //Create FooterBand
            StiFooterBand footerBand = new StiFooterBand();

            footerBand.Height = 0.5f;
            footerBand.Name   = "FooterBand";
            page.Components.Add(footerBand);

            //Create text on footer
            StiText footerText = new StiText(new RectangleD(0, 0, page.Width, 0.5f));

            footerText.Text.Value   = "Count - {Count()}";
            footerText.HorAlignment = StiTextHorAlignment.Right;
            footerText.Name         = "FooterText";
            footerText.Brush        = new StiSolidBrush(Color.LightGreen);
            footerBand.Components.Add(footerText);

            //Render without progress bar
            report.Render(false);
            report.Show();
        }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            StiReport report = new StiReport();

            //Add data to datastore
            report.RegData(dataSet1);

            //Fill dictionary
            report.Dictionary.Synchronize();

            StiPage page = report.Pages[0];

            //Create HeaderBand
            StiHeaderBand headerBand = new StiHeaderBand();

            headerBand.Height = 0.5;
            headerBand.Name   = "HeaderBand";
            page.Components.Add(headerBand);

            //Create text on header
            StiText headerText = new StiText(new RectangleD(0, 0, 5, 0.5));

            headerText.Text         = "CompanyName";
            headerText.HorAlignment = StiTextHorAlignment.Center;
            headerText.Name         = "HeaderText";
            headerText.Brush        = new StiSolidBrush(System.Drawing.Color.LightGreen);
            headerBand.Components.Add(headerText);

            //Create Databand
            StiDataBand dataBand = new StiDataBand();

            dataBand.DataSourceName = "Customers";
            dataBand.Height         = 0.5;
            dataBand.Name           = "DataBand";
            page.Components.Add(dataBand);

            //Create text
            StiText dataText = new StiText(new RectangleD(0, 0, 5, 0.5));

            dataText.Text = "{Line}.{Customers.CompanyName}";
            dataText.Name = "DataText";
            dataBand.Components.Add(dataText);

            //Create FooterBand
            StiFooterBand footerBand = new StiFooterBand();

            footerBand.Height = 0.5;
            footerBand.Name   = "FooterBand";
            page.Components.Add(footerBand);

            //Create text on footer
            StiText footerText = new StiText(new RectangleD(0, 0, 5, 0.5));

            footerText.Text         = "Count - {Count()}";
            footerText.HorAlignment = StiTextHorAlignment.Right;
            footerText.Name         = "FooterText";
            footerText.Brush        = new StiSolidBrush(System.Drawing.Color.LightGreen);
            footerBand.Components.Add(footerText);

            report.ShowWithWpf();
        }
        private void buttonCreate_Click(object sender, EventArgs e)
        {
            var report = new StiReport();

            // Add data to datastore
            var dataSet = StiJsonToDataSetConverterV2.GetDataSetFromFile(@"Data\Demo.json");

            report.RegData(dataSet);

            // Fill dictionary
            report.Dictionary.Synchronize();

            var page = report.Pages[0];

            // Create HeaderBand
            var headerBand = new StiHeaderBand();

            headerBand.Height = 0.5;
            headerBand.Name   = "HeaderBand";
            page.Components.Add(headerBand);

            // Create text on header
            var headerText = new StiText(new RectangleD(0, 0, 5, 0.5));

            headerText.Text         = "CompanyName";
            headerText.HorAlignment = StiTextHorAlignment.Center;
            headerText.Name         = "HeaderText";
            headerText.Brush        = new StiSolidBrush(System.Drawing.Color.LightGreen);
            headerBand.Components.Add(headerText);

            // Create Databand
            var dataBand = new StiDataBand();

            dataBand.DataSourceName = "Customers";
            dataBand.Height         = 0.5;
            dataBand.Name           = "DataBand";
            page.Components.Add(dataBand);

            // Create text
            var dataText = new StiText(new RectangleD(0, 0, 5, 0.5));

            dataText.Text = "{Line}.{Customers.CompanyName}";
            dataText.Name = "DataText";
            dataBand.Components.Add(dataText);

            // Create FooterBand
            var footerBand = new StiFooterBand();

            footerBand.Height = 0.5;
            footerBand.Name   = "FooterBand";
            page.Components.Add(footerBand);

            // Create text on footer
            var footerText = new StiText(new RectangleD(0, 0, 5, 0.5));

            footerText.Text         = "Count - {Count()}";
            footerText.HorAlignment = StiTextHorAlignment.Right;
            footerText.Name         = "FooterText";
            footerText.Brush        = new StiSolidBrush(System.Drawing.Color.LightGreen);
            footerBand.Components.Add(footerText);

            report.Show();
        }
 private void InitializeComponent()
 {
     FN_GetSalesOrderHeaderPurchaseTotal = new FN_GetSalesOrderHeaderPurchaseTotalDataSource();
     NeedsCompiling       = false;
     Text18_Sum1          = new StiSumDecimalFunctionService();
     Text18_Sum2          = new StiSumDecimalFunctionService();
     Text17_Sum           = new StiSumDecimalFunctionService();
     Text16_Sum           = new StiSumDecimalFunctionService();
     Text7_Sum1           = new StiSumDecimalFunctionService();
     Text7_Sum2           = new StiSumDecimalFunctionService();
     Text6_Sum            = new StiSumDecimalFunctionService();
     Text5_Sum            = new StiSumDecimalFunctionService();
     EngineVersion        = StiEngineVersion.EngineV2;
     ReferencedAssemblies = new[] {
         "System.Dll",
         "System.Drawing.Dll",
         "System.Windows.Forms.Dll",
         "System.Data.Dll",
         "System.Xml.Dll",
         "Stimulsoft.Controls.Dll",
         "Stimulsoft.Base.Dll",
         "Stimulsoft.Report.Dll"
     };
     ReportAlias  = "Rpt Sales Order Header Purchase Total";
     ReportAuthor = "Programmer.GE";
     //
     // ReportChanged
     //
     ReportChanged = new DateTime(2010, 2, 25, 21, 32, 48, 718);
     //
     // ReportCreated
     //
     ReportCreated     = new DateTime(2009, 8, 6, 21, 34, 3, 0);
     ReportDescription = "მოგების ჟურნალი (დაჯგუფებული)";
     ReportFile        = "D:\\My Documents\\Projects\\Apothex\\Source\\Class Library\\Apothex.Reporting\\Sales\\Rpt" +
                         "SalesOrderHeaderPurchaseTotal.mrt";
     ReportGuid     = "f49a941abd3949d8932cb0fdd662bc9e";
     ReportName     = "RptSalesOrderHeaderPurchaseTotal";
     ReportUnit     = StiReportUnitType.Centimeters;
     ScriptLanguage = StiReportLanguageType.CSharp;
     //
     // Page1
     //
     Page1            = new StiPage();
     Page1.Guid       = "5bf063ac2d254cd28a26e54f9ff09381";
     Page1.Name       = "Page1";
     Page1.PageHeight = 29.7;
     Page1.PageWidth  = 21;
     Page1.PaperSize  = PaperKind.A4;
     Page1.Border     = new StiBorder(StiBorderSides.None, Color.Black, 2, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Page1.Brush      = new StiSolidBrush(Color.Transparent);
     //
     // ReportTitleBand1
     //
     ReportTitleBand1 = new StiReportTitleBand();
     ReportTitleBand1.ClientRectangle = new RectangleD(0, 0.4, 19, 0.8);
     ReportTitleBand1.Name            = "ReportTitleBand1";
     ReportTitleBand1.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     ReportTitleBand1.Brush           = new StiSolidBrush(Color.Transparent);
     //
     // Text1
     //
     Text1 = new StiText();
     Text1.ClientRectangle        = new RectangleD(0, 0, 19, 0.8);
     Text1.HorAlignment           = StiTextHorAlignment.Center;
     Text1.Name                   = "Text1";
     Text1.GetValue              += new StiGetValueEventHandler(Text1__GetValue);
     Text1.Border                 = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Text1.Brush                  = new StiSolidBrush(Color.Transparent);
     Text1.Font                   = new Font("BPG Glaho Arial", 12F, FontStyle.Bold);
     Text1.Guid                   = null;
     Text1.Interaction            = null;
     Text1.Margins                = new StiMargins(0, 0, 0, 0);
     Text1.TextBrush              = new StiSolidBrush(Color.Black);
     Text1.TextOptions            = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     ReportTitleBand1.Guid        = null;
     ReportTitleBand1.Interaction = null;
     //
     // HeaderBand1
     //
     HeaderBand1 = new StiHeaderBand();
     HeaderBand1.ClientRectangle = new RectangleD(0, 2, 19, 0.6);
     HeaderBand1.Name            = "HeaderBand1";
     HeaderBand1.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     HeaderBand1.Brush           = new StiSolidBrush(Color.Transparent);
     //
     // Text8
     //
     Text8 = new StiText();
     Text8.ClientRectangle = new RectangleD(0, 0, 5.8, 0.6);
     Text8.HorAlignment    = StiTextHorAlignment.Center;
     Text8.Name            = "Text8";
     Text8.GetValue       += new StiGetValueEventHandler(Text8__GetValue);
     Text8.VertAlignment   = StiVertAlignment.Center;
     Text8.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Text8.Brush           = new StiSolidBrush(Color.Transparent);
     Text8.Font            = new Font("BPG Glaho Arial", 10F, FontStyle.Bold);
     Text8.Guid            = null;
     Text8.Interaction     = null;
     Text8.Margins         = new StiMargins(0, 0, 0, 0);
     Text8.TextBrush       = new StiSolidBrush(Color.Black);
     Text8.TextOptions     = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // Text9
     //
     Text9 = new StiText();
     Text9.ClientRectangle = new RectangleD(5.8, 0, 2, 0.6);
     Text9.Guid            = "f024598007b642c9b6f61c05578288bd";
     Text9.HorAlignment    = StiTextHorAlignment.Center;
     Text9.Name            = "Text9";
     Text9.GetValue       += new StiGetValueEventHandler(Text9__GetValue);
     Text9.VertAlignment   = StiVertAlignment.Center;
     Text9.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Text9.Brush           = new StiSolidBrush(Color.Transparent);
     Text9.Font            = new Font("BPG Glaho Arial", 10F, FontStyle.Bold);
     Text9.Interaction     = null;
     Text9.Margins         = new StiMargins(0, 0, 0, 0);
     Text9.TextBrush       = new StiSolidBrush(Color.Black);
     Text9.TextOptions     = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // Text10
     //
     Text10 = new StiText();
     Text10.ClientRectangle = new RectangleD(7.8, 0, 2.4, 0.6);
     Text10.Guid            = "39898374932e4457b57d3316a524f5cb";
     Text10.HorAlignment    = StiTextHorAlignment.Center;
     Text10.Name            = "Text10";
     Text10.GetValue       += new StiGetValueEventHandler(Text10__GetValue);
     Text10.VertAlignment   = StiVertAlignment.Center;
     Text10.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Text10.Brush           = new StiSolidBrush(Color.Transparent);
     Text10.Font            = new Font("BPG Glaho Arial", 10F, FontStyle.Bold);
     Text10.Interaction     = null;
     Text10.Margins         = new StiMargins(0, 0, 0, 0);
     Text10.TextBrush       = new StiSolidBrush(Color.Black);
     Text10.TextOptions     = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // Text11
     //
     Text11 = new StiText();
     Text11.ClientRectangle = new RectangleD(10.2, 0, 2.4, 0.6);
     Text11.Guid            = "95bb7db1a7624bec9498d8c9787dc960";
     Text11.HorAlignment    = StiTextHorAlignment.Center;
     Text11.Name            = "Text11";
     Text11.GetValue       += new StiGetValueEventHandler(Text11__GetValue);
     Text11.VertAlignment   = StiVertAlignment.Center;
     Text11.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Text11.Brush           = new StiSolidBrush(Color.Transparent);
     Text11.Font            = new Font("BPG Glaho Arial", 10F, FontStyle.Bold);
     Text11.Interaction     = null;
     Text11.Margins         = new StiMargins(0, 0, 0, 0);
     Text11.TextBrush       = new StiSolidBrush(Color.Black);
     Text11.TextOptions     = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // Text12
     //
     Text12 = new StiText();
     Text12.ClientRectangle = new RectangleD(7.8, 0, 2.4, 0.6);
     Text12.Guid            = "07044fbd4db348d8a3ea69548d8d1c72";
     Text12.HorAlignment    = StiTextHorAlignment.Center;
     Text12.Name            = "Text12";
     Text12.GetValue       += new StiGetValueEventHandler(Text12__GetValue);
     Text12.VertAlignment   = StiVertAlignment.Center;
     Text12.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Text12.Brush           = new StiSolidBrush(Color.Transparent);
     Text12.Font            = new Font("BPG Glaho Arial", 10F, FontStyle.Bold);
     Text12.Interaction     = null;
     Text12.Margins         = new StiMargins(0, 0, 0, 0);
     Text12.TextBrush       = new StiSolidBrush(Color.Black);
     Text12.TextOptions     = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // Text13
     //
     Text13 = new StiText();
     Text13.ClientRectangle = new RectangleD(10.2, 0, 2.4, 0.6);
     Text13.Guid            = "0974ed75540740f4af139745ad771e08";
     Text13.HorAlignment    = StiTextHorAlignment.Center;
     Text13.Name            = "Text13";
     Text13.GetValue       += new StiGetValueEventHandler(Text13__GetValue);
     Text13.VertAlignment   = StiVertAlignment.Center;
     Text13.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Text13.Brush           = new StiSolidBrush(Color.Transparent);
     Text13.Font            = new Font("BPG Glaho Arial", 10F, FontStyle.Bold);
     Text13.Interaction     = null;
     Text13.Margins         = new StiMargins(0, 0, 0, 0);
     Text13.TextBrush       = new StiSolidBrush(Color.Black);
     Text13.TextOptions     = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // Text14
     //
     Text14 = new StiText();
     Text14.ClientRectangle = new RectangleD(12.6, 0, 2.4, 0.6);
     Text14.Guid            = "f11d8ef223974cbeb4dd9d4055d584bc";
     Text14.HorAlignment    = StiTextHorAlignment.Center;
     Text14.Name            = "Text14";
     Text14.GetValue       += new StiGetValueEventHandler(Text14__GetValue);
     Text14.VertAlignment   = StiVertAlignment.Center;
     Text14.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Text14.Brush           = new StiSolidBrush(Color.Transparent);
     Text14.Font            = new Font("BPG Glaho Arial", 10F, FontStyle.Bold);
     Text14.Interaction     = null;
     Text14.Margins         = new StiMargins(0, 0, 0, 0);
     Text14.TextBrush       = new StiSolidBrush(Color.Black);
     Text14.TextOptions     = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // Text15
     //
     Text15 = new StiText();
     Text15.ClientRectangle  = new RectangleD(15, 0, 4, 0.6);
     Text15.Guid             = "bbef06e2a66d48beb97e857e1eedbaec";
     Text15.HorAlignment     = StiTextHorAlignment.Center;
     Text15.Name             = "Text15";
     Text15.GetValue        += new StiGetValueEventHandler(Text15__GetValue);
     Text15.VertAlignment    = StiVertAlignment.Center;
     Text15.Border           = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Text15.Brush            = new StiSolidBrush(Color.Transparent);
     Text15.Font             = new Font("BPG Glaho Arial", 10F, FontStyle.Bold);
     Text15.Interaction      = null;
     Text15.Margins          = new StiMargins(0, 0, 0, 0);
     Text15.TextBrush        = new StiSolidBrush(Color.Black);
     Text15.TextOptions      = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     HeaderBand1.Guid        = null;
     HeaderBand1.Interaction = null;
     //
     // GroupHeaderBand2
     //
     GroupHeaderBand2 = new StiGroupHeaderBand();
     GroupHeaderBand2.ClientRectangle = new RectangleD(0, 3.4, 19, 0.6);
     GroupHeaderBand2.GetValue       += new StiValueEventHandler(GroupHeaderBand2__GetValue);
     GroupHeaderBand2.Guid            = "d82d03aa1689442db9088bdf4fbd6f74";
     GroupHeaderBand2.Name            = "GroupHeaderBand2";
     GroupHeaderBand2.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     GroupHeaderBand2.Brush           = new StiSolidBrush(Color.Transparent);
     //
     // Text2
     //
     Text2 = new StiText();
     Text2.ClientRectangle = new RectangleD(0, 0, 5.8, 0.6);
     Text2.Guid            = "b4b9c81160034475a70f8e58952c143c";
     Text2.Name            = "Text2";
     Text2.GetValue       += new StiGetValueEventHandler(Text2__GetValue);
     Text2.VertAlignment   = StiVertAlignment.Center;
     Text2.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Text2.Brush           = new StiSolidBrush(Color.Transparent);
     Text2.Font            = new Font("BPG Glaho Arial", 10F);
     Text2.Interaction     = null;
     Text2.Margins         = new StiMargins(0, 0, 0, 0);
     Text2.TextBrush       = new StiSolidBrush(Color.Black);
     Text2.TextOptions     = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // Text3
     //
     Text3 = new StiText();
     Text3.ClientRectangle = new RectangleD(5.8, 0, 2, 0.6);
     Text3.Guid            = "edcd73415b85450bacde997ae60d04b4";
     Text3.HorAlignment    = StiTextHorAlignment.Center;
     Text3.Name            = "Text3";
     Text3.GetValue       += new StiGetValueEventHandler(Text3__GetValue);
     Text3.VertAlignment   = StiVertAlignment.Center;
     Text3.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Text3.Brush           = new StiSolidBrush(Color.Transparent);
     Text3.Font            = new Font("BPG Glaho Arial", 10F);
     Text3.Interaction     = null;
     Text3.Margins         = new StiMargins(0, 0, 0, 0);
     Text3.TextBrush       = new StiSolidBrush(Color.Black);
     Text3.TextFormat      = new StiDateFormatService("d", " ");
     Text3.TextOptions     = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // Text4
     //
     Text4 = new StiText();
     Text4.ClientRectangle = new RectangleD(15, 0, 4, 0.6);
     Text4.Name            = "Text4";
     Text4.GetValue       += new StiGetValueEventHandler(Text4__GetValue);
     Text4.VertAlignment   = StiVertAlignment.Center;
     Text4.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Text4.Brush           = new StiSolidBrush(Color.Transparent);
     Text4.Font            = new Font("BPG Glaho Arial", 10F);
     Text4.Guid            = null;
     Text4.Interaction     = null;
     Text4.Margins         = new StiMargins(0, 0, 0, 0);
     Text4.TextBrush       = new StiSolidBrush(Color.Black);
     Text4.TextOptions     = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // Text5
     //
     Text5 = new StiText();
     Text5.ClientRectangle = new RectangleD(7.8, 0, 2.4, 0.6);
     Text5.HorAlignment    = StiTextHorAlignment.Right;
     Text5.Name            = "Text5";
     //
     // Text5_Sum
     //
     Text5.GetValue     += new StiGetValueEventHandler(Text5__GetValue);
     Text5.VertAlignment = StiVertAlignment.Center;
     Text5.Border        = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Text5.Brush         = new StiSolidBrush(Color.Transparent);
     Text5.Font          = new Font("BPG Glaho Arial", 10F);
     Text5.Guid          = null;
     Text5.Interaction   = null;
     Text5.Margins       = new StiMargins(0, 0, 0, 0);
     Text5.TextBrush     = new StiSolidBrush(Color.Black);
     Text5.TextFormat    = new StiNumberFormatService(1, ",", 2, " ", 3, true, true, " ");
     Text5.TextOptions   = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // Text6
     //
     Text6 = new StiText();
     Text6.ClientRectangle = new RectangleD(10.2, 0, 2.4, 0.6);
     Text6.Guid            = "1f0c8f611f96466a9776c640bd6c1ba7";
     Text6.HorAlignment    = StiTextHorAlignment.Right;
     Text6.Name            = "Text6";
     //
     // Text6_Sum
     //
     Text6.GetValue     += new StiGetValueEventHandler(Text6__GetValue);
     Text6.VertAlignment = StiVertAlignment.Center;
     Text6.Border        = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Text6.Brush         = new StiSolidBrush(Color.Transparent);
     Text6.Font          = new Font("BPG Glaho Arial", 10F);
     Text6.Interaction   = null;
     Text6.Margins       = new StiMargins(0, 0, 0, 0);
     Text6.TextBrush     = new StiSolidBrush(Color.Black);
     Text6.TextFormat    = new StiNumberFormatService(1, ",", 2, " ", 3, true, true, " ");
     Text6.TextOptions   = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // Text7
     //
     Text7 = new StiText();
     Text7.ClientRectangle = new RectangleD(12.6, 0, 2.4, 0.6);
     Text7.Guid            = "e1d414bc48834ba0ae5c02772f452d98";
     Text7.HorAlignment    = StiTextHorAlignment.Right;
     Text7.Name            = "Text7";
     //
     // Text7_Sum1
     //
     //
     // Text7_Sum2
     //
     Text7.GetValue              += new StiGetValueEventHandler(Text7__GetValue);
     Text7.VertAlignment          = StiVertAlignment.Center;
     Text7.Border                 = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Text7.Brush                  = new StiSolidBrush(Color.Transparent);
     Text7.Font                   = new Font("BPG Glaho Arial", 10F);
     Text7.Interaction            = null;
     Text7.Margins                = new StiMargins(0, 0, 0, 0);
     Text7.TextBrush              = new StiSolidBrush(Color.Black);
     Text7.TextFormat             = new StiNumberFormatService(1, ",", 2, " ", 3, true, true, " ");
     Text7.TextOptions            = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     GroupHeaderBand2.Interaction = null;
     //
     // DataFN_GetSalesOrderHeaderPurchaseTotal
     //
     DataFN_GetSalesOrderHeaderPurchaseTotal = new StiDataBand();
     DataFN_GetSalesOrderHeaderPurchaseTotal.CalcInvisible   = true;
     DataFN_GetSalesOrderHeaderPurchaseTotal.ClientRectangle = new RectangleD(0, 4.8, 19, 0.8);
     DataFN_GetSalesOrderHeaderPurchaseTotal.DataSourceName  = "FN_GetSalesOrderHeaderPurchaseTotal";
     DataFN_GetSalesOrderHeaderPurchaseTotal.Enabled         = false;
     DataFN_GetSalesOrderHeaderPurchaseTotal.Name            = "DataFN_GetSalesOrderHeaderPurchaseTotal";
     DataFN_GetSalesOrderHeaderPurchaseTotal.Sort            = new[] {
         "ASC",
         "OrderDate",
         "ASC",
         "BranchName",
         "ASC",
         "PaymentMethodName"
     };
     DataFN_GetSalesOrderHeaderPurchaseTotal.Border           = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     DataFN_GetSalesOrderHeaderPurchaseTotal.Brush            = new StiSolidBrush(Color.Transparent);
     DataFN_GetSalesOrderHeaderPurchaseTotal.DataRelationName = null;
     DataFN_GetSalesOrderHeaderPurchaseTotal.Guid             = null;
     DataFN_GetSalesOrderHeaderPurchaseTotal.Interaction      = null;
     DataFN_GetSalesOrderHeaderPurchaseTotal.MasterComponent  = null;
     //
     // FooterBand1
     //
     FooterBand1 = new StiFooterBand();
     FooterBand1.ClientRectangle = new RectangleD(0, 6.4, 19, 0.6);
     FooterBand1.Name            = "FooterBand1";
     FooterBand1.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     FooterBand1.Brush           = new StiSolidBrush(Color.Transparent);
     //
     // Text16
     //
     Text16 = new StiText();
     Text16.ClientRectangle = new RectangleD(7.8, 0, 2.4, 0.6);
     Text16.HorAlignment    = StiTextHorAlignment.Right;
     Text16.Name            = "Text16";
     //
     // Text16_Sum
     //
     Text16.GetValue     += new StiGetValueEventHandler(Text16__GetValue);
     Text16.VertAlignment = StiVertAlignment.Center;
     Text16.Border        = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Text16.Brush         = new StiSolidBrush(Color.Transparent);
     Text16.Font          = new Font("BPG Glaho Arial", 10F);
     Text16.Guid          = null;
     Text16.Interaction   = null;
     Text16.Margins       = new StiMargins(0, 0, 0, 0);
     Text16.TextBrush     = new StiSolidBrush(Color.Black);
     Text16.TextFormat    = new StiNumberFormatService(1, ",", 2, " ", 3, true, true, " ");
     Text16.TextOptions   = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // Text17
     //
     Text17 = new StiText();
     Text17.ClientRectangle = new RectangleD(10.2, 0, 2.4, 0.6);
     Text17.Guid            = "f2dd3d749ca7442996cf2f1d37916060";
     Text17.HorAlignment    = StiTextHorAlignment.Right;
     Text17.Name            = "Text17";
     //
     // Text17_Sum
     //
     Text17.GetValue     += new StiGetValueEventHandler(Text17__GetValue);
     Text17.VertAlignment = StiVertAlignment.Center;
     Text17.Border        = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Text17.Brush         = new StiSolidBrush(Color.Transparent);
     Text17.Font          = new Font("BPG Glaho Arial", 10F);
     Text17.Interaction   = null;
     Text17.Margins       = new StiMargins(0, 0, 0, 0);
     Text17.TextBrush     = new StiSolidBrush(Color.Black);
     Text17.TextFormat    = new StiNumberFormatService(1, ",", 2, " ", 3, true, true, " ");
     Text17.TextOptions   = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // Text18
     //
     Text18 = new StiText();
     Text18.ClientRectangle = new RectangleD(12.6, 0, 2.4, 0.6);
     Text18.Guid            = "5c8ac7b53c0e4fb8a58a0269915321bf";
     Text18.HorAlignment    = StiTextHorAlignment.Right;
     Text18.Name            = "Text18";
     //
     // Text18_Sum1
     //
     //
     // Text18_Sum2
     //
     Text18.GetValue          += new StiGetValueEventHandler(Text18__GetValue);
     Text18.VertAlignment      = StiVertAlignment.Center;
     Text18.Border             = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Text18.Brush              = new StiSolidBrush(Color.Transparent);
     Text18.Font               = new Font("BPG Glaho Arial", 10F);
     Text18.Interaction        = null;
     Text18.Margins            = new StiMargins(0, 0, 0, 0);
     Text18.TextBrush          = new StiSolidBrush(Color.Black);
     Text18.TextFormat         = new StiNumberFormatService(1, ",", 2, " ", 3, true, true, " ");
     Text18.TextOptions        = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     FooterBand1.Guid          = null;
     FooterBand1.Interaction   = null;
     Page1.ExcelSheetValue     = null;
     Page1.Interaction         = null;
     Page1.Margins             = new StiMargins(1, 1, 1, 1);
     Page1_Watermark           = new StiWatermark();
     Page1_Watermark.Font      = new Font("Arial", 100F);
     Page1_Watermark.Image     = null;
     Page1_Watermark.TextBrush = new StiSolidBrush(Color.FromArgb(50, 0, 0, 0));
     RptSalesOrderHeaderPurchaseTotal_PrinterSettings = new StiPrinterSettings();
     PrinterSettings         = RptSalesOrderHeaderPurchaseTotal_PrinterSettings;
     Page1.Page              = Page1;
     Page1.Report            = this;
     Page1.Watermark         = Page1_Watermark;
     ReportTitleBand1.Page   = Page1;
     ReportTitleBand1.Parent = Page1;
     Text1.Page              = Page1;
     Text1.Parent            = ReportTitleBand1;
     HeaderBand1.Page        = Page1;
     HeaderBand1.Parent      = Page1;
     Text8.Page              = Page1;
     Text8.Parent            = HeaderBand1;
     Text9.Page              = Page1;
     Text9.Parent            = HeaderBand1;
     Text10.Page             = Page1;
     Text10.Parent           = HeaderBand1;
     Text11.Page             = Page1;
     Text11.Parent           = HeaderBand1;
     Text12.Page             = Page1;
     Text12.Parent           = HeaderBand1;
     Text13.Page             = Page1;
     Text13.Parent           = HeaderBand1;
     Text14.Page             = Page1;
     Text14.Parent           = HeaderBand1;
     Text15.Page             = Page1;
     Text15.Parent           = HeaderBand1;
     GroupHeaderBand2.Page   = Page1;
     GroupHeaderBand2.Parent = Page1;
     Text2.Page              = Page1;
     Text2.Parent            = GroupHeaderBand2;
     Text3.Page              = Page1;
     Text3.Parent            = GroupHeaderBand2;
     Text4.Page              = Page1;
     Text4.Parent            = GroupHeaderBand2;
     Text5.Page              = Page1;
     Text5.Parent            = GroupHeaderBand2;
     Text6.Page              = Page1;
     Text6.Parent            = GroupHeaderBand2;
     Text7.Page              = Page1;
     Text7.Parent            = GroupHeaderBand2;
     DataFN_GetSalesOrderHeaderPurchaseTotal.Page   = Page1;
     DataFN_GetSalesOrderHeaderPurchaseTotal.Parent = Page1;
     FooterBand1.Page              = Page1;
     FooterBand1.Parent            = Page1;
     Text16.Page                   = Page1;
     Text16.Parent                 = FooterBand1;
     Text17.Page                   = Page1;
     Text17.Parent                 = FooterBand1;
     Text18.Page                   = Page1;
     Text18.Parent                 = FooterBand1;
     GroupHeaderBand2.BeginRender += new EventHandler(GroupHeaderBand2__BeginRender);
     GroupHeaderBand2.EndRender   += new EventHandler(GroupHeaderBand2__EndRender);
     DataFN_GetSalesOrderHeaderPurchaseTotal.BeginRender += new EventHandler(DataFN_GetSalesOrderHeaderPurchaseTotal__BeginRender);
     DataFN_GetSalesOrderHeaderPurchaseTotal.EndRender   += new EventHandler(DataFN_GetSalesOrderHeaderPurchaseTotal__EndRender);
     GroupHeaderBand2.Rendering += new EventHandler(GroupHeaderBand2__Rendering);
     DataFN_GetSalesOrderHeaderPurchaseTotal.Rendering += new EventHandler(DataFN_GetSalesOrderHeaderPurchaseTotal__Rendering);
     AggregateFunctions = new object[] {
         Text5_Sum,
         Text6_Sum,
         Text7_Sum1,
         Text7_Sum2,
         Text16_Sum,
         Text17_Sum,
         Text18_Sum1,
         Text18_Sum2
     };
     //
     // Add to ReportTitleBand1.Components
     //
     ReportTitleBand1.Components.Clear();
     ReportTitleBand1.Components.AddRange(new StiComponent[] {
         Text1
     });
     //
     // Add to HeaderBand1.Components
     //
     HeaderBand1.Components.Clear();
     HeaderBand1.Components.AddRange(new StiComponent[] {
         Text8,
         Text9,
         Text10,
         Text11,
         Text12,
         Text13,
         Text14,
         Text15
     });
     //
     // Add to GroupHeaderBand2.Components
     //
     GroupHeaderBand2.Components.Clear();
     GroupHeaderBand2.Components.AddRange(new StiComponent[] {
         Text2,
         Text3,
         Text4,
         Text5,
         Text6,
         Text7
     });
     //
     // Add to FooterBand1.Components
     //
     FooterBand1.Components.Clear();
     FooterBand1.Components.AddRange(new StiComponent[] {
         Text16,
         Text17,
         Text18
     });
     //
     // Add to Page1.Components
     //
     Page1.Components.Clear();
     Page1.Components.AddRange(new StiComponent[] {
         ReportTitleBand1,
         HeaderBand1,
         GroupHeaderBand2,
         DataFN_GetSalesOrderHeaderPurchaseTotal,
         FooterBand1
     });
     //
     // Add to Pages
     //
     Pages.Clear();
     Pages.AddRange(new[] {
         Page1
     });
     FN_GetSalesOrderHeaderPurchaseTotal.Columns.AddRange(new[] {
         new StiDataColumn("SalesOrderID", "SalesOrderID", "SalesOrderID", typeof(int)),
         new StiDataColumn("BranchID", "BranchID", "BranchID", typeof(int)),
         new StiDataColumn("BranchName", "BranchName", "BranchName", typeof(string)),
         new StiDataColumn("OrderDate", "OrderDate", "OrderDate", typeof(DateTime)),
         new StiDataColumn("SalesSubTotal", "SalesSubTotal", "SalesSubTotal", typeof(decimal)),
         new StiDataColumn("SalesTaxAmt", "SalesTaxAmt", "SalesTaxAmt", typeof(decimal)),
         new StiDataColumn("SalesFreight", "SalesFreight", "SalesFreight", typeof(decimal)),
         new StiDataColumn("SalesTotalDue", "SalesTotalDue", "SalesTotalDue", typeof(decimal)),
         new StiDataColumn("PurchaseSubTotal", "PurchaseSubTotal", "PurchaseSubTotal", typeof(decimal)),
         new StiDataColumn("PurchaseTaxAmt", "PurchaseTaxAmt", "PurchaseTaxAmt", typeof(decimal)),
         new StiDataColumn("CurrencyCode", "CurrencyCode", "CurrencyCode", typeof(string)),
         new StiDataColumn("PaymentMethodName", "PaymentMethodName", "PaymentMethodName", typeof(string)),
         new StiDataColumn("Status", "Status", "Status", typeof(byte))
     });
     DataSources.Add(FN_GetSalesOrderHeaderPurchaseTotal);
 }
Beispiel #17
0
        protected override bool WfExecReport(Stimulsoft.Report.StiReport pReport)
        {
            //DataSet ds;
            vw_stpr500       stpr500Model;
            StringBuilder    sbSql = null;
            DataTable        dtSeaTb, dtSebTb;
            List <QueryInfo> queryInfoList;
            QueryInfo        queryModel;
            string           strQueryRange, strWhere;
            StringBuilder    sbQuerySingle = null;

            List <SqlParameter> sqlParmList;

            try
            {
                if (Vw_Stpr500 != null) //他窗引用時
                {
                    stpr500Model = Vw_Stpr500;
                }
                else
                {
                    stpr500Model = DrMaster.ToItem <vw_stpr500>();
                }

                queryInfoList = new List <QueryInfo>();
                #region range 處理
                if (!GlobalFn.varIsNull(stpr500Model.sha01))
                {
                    queryModel            = new QueryInfo();
                    queryModel.TableName  = "sha_tb";
                    queryModel.ColumnName = "sha01";
                    queryModel.ColumnType = TabMaster.DtSource.Columns["sha01"].DataType.Name;
                    queryModel.Value      = stpr500Model.sha01;
                    queryInfoList.Add(queryModel);
                }
                if (!GlobalFn.varIsNull(stpr500Model.sha03))
                {
                    queryModel            = new QueryInfo();
                    queryModel.TableName  = "sha_tb";
                    queryModel.ColumnName = "sha03";
                    queryModel.ColumnType = TabMaster.DtSource.Columns["sha03"].DataType.Name;
                    queryModel.Value      = stpr500Model.sha03;
                    queryInfoList.Add(queryModel);
                }
                sqlParmList   = new List <SqlParameter>();
                strQueryRange = BoMaster.WfGetQueryString(queryInfoList, out sqlParmList);
                #endregion

                #region single 處理
                sbQuerySingle = new StringBuilder();
                if (!GlobalFn.varIsNull(stpr500Model.sha02_s))
                {
                    sbQuerySingle.AppendLine("AND sha02>=@sha02_s");
                    sqlParmList.Add(new SqlParameter("@sha02_s", stpr500Model.sha02_s));
                }
                if (!GlobalFn.varIsNull(stpr500Model.sha02_e))
                {
                    sbQuerySingle.AppendLine("AND sha02<=@sha02_e");
                    sqlParmList.Add(new SqlParameter("@sha02_e", stpr500Model.sha02_e));
                }
                #endregion

                strWhere = strQueryRange + " " + sbQuerySingle.ToString();
                var strSecurity = WfGetSecurityString();        //取得權限字串
                if (!GlobalFn.varIsNull(strSecurity))
                {
                    strWhere += strSecurity;
                }

                //取得單頭
                sbSql = new StringBuilder();
                sbSql.AppendLine("SELECT sha_tb.*,");
                sbSql.AppendLine("  sca03 AS sha03_c,");
                sbSql.AppendLine("  bec02 AS sha04_c,");
                sbSql.AppendLine("  beb02 AS sha05_c,");
                sbSql.AppendLine("  bab02 AS sha01_c,");
                sbSql.AppendLine("  bea04,");
                sbSql.AppendLine("  bea05,");
                sbSql.AppendLine("  bea06");
                sbSql.AppendLine("FROM sha_tb");
                sbSql.AppendLine("  LEFT JOIN sca_tb ON sha03=sca01");
                sbSql.AppendLine("  LEFT JOIN bec_tb ON sha04=bec01");
                sbSql.AppendLine("  LEFT JOIN beb_tb ON sha05=beb01");
                sbSql.AppendLine("  LEFT JOIN baa_tb ON 1=1");
                sbSql.AppendLine("  LEFT JOIN bab_tb ON substring(sha01,1,baa06)=bab01");
                sbSql.AppendLine("  LEFT JOIN bea_tb ON beacomp=shacomp");
                sbSql.AppendLine("WHERE 1=1");
                sbSql.AppendLine("  AND shaconf='Y'");
                dtSeaTb           = BoMaster.OfGetDataTable(string.Concat(sbSql.ToString(), strWhere), sqlParmList.ToArray());
                dtSeaTb.TableName = "Master";

                if (dtSeaTb == null || dtSeaTb.Rows.Count == 0)
                {
                    WfShowErrorMsg("查無資料,請重新過濾條件!");
                    return(false);
                }

                //取得明細
                sbSql = new StringBuilder();
                sbSql.AppendLine("SELECT * FROM shb_tb");
                sbSql.AppendLine("WHERE EXISTS(");
                sbSql.AppendLine("  SELECT 1 FROM  sha_tb");
                sbSql.AppendLine("  WHERE sha01=shb01");
                sbSql.AppendLine(strWhere);
                sbSql.AppendLine(")");
                dtSebTb           = BoMaster.OfGetDataTable(sbSql.ToString(), sqlParmList.ToArray());
                dtSebTb.TableName = "Detail";

                pReport.RegData(dtSeaTb);
                pReport.RegData(dtSebTb);
                pReport.CacheAllData = true;
                //處理排序
                StiDataBand stiDataBand1 = (StiDataBand)pReport.GetComponents()["DataBand1"];
                switch (stpr500Model.order_by)
                {
                case "1":    //1.依出貨日期
                    stiDataBand1.Sort = new string[] { "ASC", "sha02" };
                    break;

                case "2":    //2.依客戶
                    stiDataBand1.Sort = new string[] { "ASC", "sha03" };
                    break;
                }
                //處理跳頁
                StiFooterBand footerBand1 = (StiFooterBand)pReport.GetComponents()["FooterBand1"];
                if (stpr500Model.jump_yn.ToUpper() == "Y")
                {
                    footerBand1.NewPageAfter    = true;
                    footerBand1.ResetPageNumber = true;
                }
                else
                {
                    footerBand1.NewPageAfter    = false;
                    footerBand1.ResetPageNumber = false;
                }

                //pReport.Compile();
                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #18
0
        public void OnRunningAccountReviewShenavarReport(Entity reportEntity, Stimulsoft.Report.StiReport report, Dictionary <string, object> parameters)
        {
            var dbHelper = CoreComponent.Instance.MainDbHelper;

            EntityList accountReview = new EntityList();

            var test = report.DataSources;

            var query = string.Format("");

            DataTable shenavarReportDataTable = new DataTable("ReportTable");

            var reportParameterAccountReview = new Guid?();

            if (parameters["AccountReview"] != null)
            {
                reportParameterAccountReview = Guid.Parse(parameters["AccountReview"].ToString());
            }

            var shenavarType = parameters["ShenavarType"];

            shenavarReportDataTable.Columns.Add("ShenavarName");
            shenavarReportDataTable.Columns.Add("DebtorAmount_Shenavar");
            shenavarReportDataTable.Columns.Add("CreditorAmount_Shenavar");
            shenavarReportDataTable.Columns.Add("AccountCode");
            shenavarReportDataTable.Columns.Add("FarsiAccountReviewType_Shenavar");
            shenavarReportDataTable.Columns.Add("RemainingDebtorAmount_Shenavar", typeof(decimal));
            shenavarReportDataTable.Columns.Add("RemainingCreditorAmount_Shenavar", typeof(decimal));
            shenavarReportDataTable.Columns.Add("FarsiShenavarType");
            shenavarReportDataTable.Columns.Add("AccountReviewName_Shenavar");

            for (int i = 0; i < acc.AccountReview1.Entities.Count; i++)
            {
                Entity accountReviewEntity = acc.AccountReview1.Entities[i];

                var accountReview_Shenavar = accountReviewEntity.GetFieldValue <Guid?>("AccountReview_Shenavar");

                if (reportParameterAccountReview != null)
                {
                    if (shenavarType as string == "Person")
                    {
                        if (accountReview_Shenavar == reportParameterAccountReview)
                        {
                            if (accountReviewEntity.GetFieldValue <string>("ShenavarType") == "Person")
                            {
                                accountReview.Entities.Add(accountReviewEntity);
                            }
                        }
                    }

                    else if (shenavarType as string == "CostCenter")
                    {
                        if (accountReview_Shenavar == reportParameterAccountReview)
                        {
                            if (accountReviewEntity.GetFieldValue <string>("ShenavarType") == "CostCenter")
                            {
                                accountReview.Entities.Add(accountReviewEntity);
                            }
                        }
                    }

                    else if (shenavarType as string == "Project")
                    {
                        if (accountReview_Shenavar == reportParameterAccountReview)
                        {
                            if (accountReviewEntity.GetFieldValue <string>("ShenavarType") == "Project")
                            {
                                accountReview.Entities.Add(accountReviewEntity);
                            }
                        }
                    }
                }
            }

            foreach (var entity in accountReview.Entities)
            {
                var row = shenavarReportDataTable.NewRow();

                row["ShenavarName"] = entity.GetFieldValue <string>("ShenavarName");
                row["RemainingDebtorAmount_Shenavar"]   = entity.GetFieldValue <decimal>("RemainingDebtorAmount_Shenavar");
                row["RemainingCreditorAmount_Shenavar"] = entity.GetFieldValue <decimal>("RemainingCreditorAmount_Shenavar");
                row["FarsiAccountReviewType_Shenavar"]  = entity.GetFieldValue <string>("FarsiAccountReviewType_Shenavar");
                row["FarsiShenavarType"]          = entity.GetFieldValue <string>("FarsiShenavarType");
                row["AccountReviewName_Shenavar"] = entity.GetFieldValue <string>("AccountReviewName_Shenavar");

                shenavarReportDataTable.Rows.Add(row);
            }

            report.Dictionary.DataSources.Clear();

            report.RegData("DataSource", shenavarReportDataTable);
            report.Dictionary.Synchronize();

            StiDataBand dataBand1 = (StiDataBand)report.GetComponentByName("DataBand1");

            dataBand1.DataSourceName = "ReportTable";
        }
Beispiel #19
0
        protected override bool WfExecReport(Stimulsoft.Report.StiReport pReport)
        {
            //DataSet ds;
            vw_manr210    manr210Model;
            StringBuilder sbSql   = null;
            string        sqlBody = "";
            DataTable     dtMaster;
            List <YR.ERP.DAL.YRModel.Reports.Man.Manr210.Master> masterList;
            List <QueryInfo> queryInfoList;
            QueryInfo        queryModel;
            string           strQueryRange, strWhere;
            StringBuilder    sbQuerySingle = null;

            List <SqlParameter> sqlParmList;

            try
            {
                if (Vw_Manr210 != null) //他窗引用時
                {
                    manr210Model = Vw_Manr210;
                }
                else
                {
                    manr210Model = DrMaster.ToItem <vw_manr210>();
                }

                queryInfoList = new List <QueryInfo>();
                #region range 處理
                if (!GlobalFn.varIsNull(manr210Model.mea01))
                {
                    queryModel            = new QueryInfo();
                    queryModel.TableName  = "mea_tb";
                    queryModel.ColumnName = "mea01";
                    queryModel.ColumnType = TabMaster.DtSource.Columns["mea01"].DataType.Name;
                    queryModel.Value      = manr210Model.mea01;
                    queryInfoList.Add(queryModel);
                }
                if (!GlobalFn.varIsNull(manr210Model.mea03))
                {
                    queryModel            = new QueryInfo();
                    queryModel.TableName  = "mea_tb";
                    queryModel.ColumnName = "mea03";
                    queryModel.ColumnType = TabMaster.DtSource.Columns["mea03"].DataType.Name;
                    queryModel.Value      = manr210Model.mea03;
                    queryInfoList.Add(queryModel);
                }

                if (!GlobalFn.varIsNull(manr210Model.mea20))
                {
                    queryModel            = new QueryInfo();
                    queryModel.TableName  = "mea_tb";
                    queryModel.ColumnName = "mea20";
                    queryModel.ColumnType = TabMaster.DtSource.Columns["mea20"].DataType.Name;
                    queryModel.Value      = manr210Model.mea03;
                    queryInfoList.Add(queryModel);
                }
                sqlParmList   = new List <SqlParameter>();
                strQueryRange = BoMaster.WfGetQueryString(queryInfoList, out sqlParmList);
                #endregion

                #region single 處理
                sbQuerySingle = new StringBuilder();
                if (!GlobalFn.varIsNull(manr210Model.mea02_s))
                {
                    sbQuerySingle.AppendLine("AND mea02>=@mea02_s");
                    sqlParmList.Add(new SqlParameter("@mea02_s", manr210Model.mea02_s));
                }
                if (!GlobalFn.varIsNull(manr210Model.mea02_e))
                {
                    sbQuerySingle.AppendLine("AND mea02<=@mea02_e");
                    sqlParmList.Add(new SqlParameter("@mea02_e", manr210Model.mea02_e));
                }
                #endregion

                strWhere = strQueryRange + " " + sbQuerySingle.ToString();
                var strSecurity = WfGetSecurityString();        //取得權限字串
                if (!GlobalFn.varIsNull(strSecurity))
                {
                    strWhere += strSecurity;
                }

                //取得單頭
                sqlBody            = @"SELECT 
                                mea00,mea01,mea02,mea03,mea04,mea05,
                                mea06,mea07,mea08,mea09,mea10,
                                mea11,mea12,mea13,mea14,mea14t,
                                mea15,mea16,mea17,mea18,mea19,
                                mea20,mea21,mea22,mea23,mea24,
                                mea25,mea26,mea27,mea28,mea29,
                                bab02 as mea01_c,
                                pca02 as mea03_c,
                                bec02 as  mea04_c,beb02 as mea05_c,
                                bef03 as mea11_c,pbb02 as mea12_c,
                                ica_main.ica03 as ica03_main,
                                '' as mea13_str,'' as mea14_str,'' as mea14t_str,
                                '' as mea22_str,
                                bej_main.bej03 as bej03_main,
                                meb02,meb03,meb04,meb05,meb06,
                                meb07,
                                ica_detail.ica03 as ica03_detail,
                                bej_detail.bej03 as bej03_detail,
                                '' as meb05_str
                            FROM mea_tb                                
                                LEFT JOIN meb_tb On mea01=meb01
	                            LEFT JOIN pca_tb ON mea03=pca01	--廠商
	                            LEFT JOIN bec_tb ON mea04=bec01	--員工
	                            LEFT JOIN beb_tb ON mea05=beb01	--部門
	                            LEFT JOIN bef_tb ON mea11=bef02 AND bef01='1'	--收付款條件
	                            LEFT JOIN pbb_tb ON mea12=pbb01	--採購取價原則
	                            LEFT JOIN baa_tb ON 1=1	
	                            LEFT JOIN bab_tb ON substring(mea01,1,baa06)=bab01
                                LEFT JOIN ica_tb ica_main ON mea20=ica_main.ica01
                                LEFT JOIN bej_tb bej_main ON mea23=bej_main.bej01
                                LEFT JOIN ica_tb ica_detail ON meb03=ica_detail.ica01
                                LEFT JOIN bej_tb bej_detail ON meb06=bej_detail.bej01
                            WHERE 1=1 
                                AND meaconf='Y'
                                AND mea00='2'
                           ";
                dtMaster           = BoMaster.OfGetDataTable(string.Concat(sqlBody, strWhere), sqlParmList.ToArray());
                dtMaster.TableName = "Master";

                if (dtMaster == null || dtMaster.Rows.Count == 0)
                {
                    WfShowErrorMsg("查無資料,請重新過濾條件!");
                    return(false);
                }

                masterList = dtMaster.ToList <Master>();
                foreach (Master masterModel in masterList)
                {
                    masterModel.mea22_str = string.Format("{0:N" + masterModel.bej03_main + "}", masterModel.mea22);   //主件數量
                    masterModel.meb05_str = string.Format("{0:N" + masterModel.bej03_detail + "}", masterModel.meb05); //子件數量

                    var bekModel = BoBas.OfGetBekModel(masterModel.mea10);
                    masterModel.mea13_str  = string.Format("{0:N" + bekModel.bek03 + "}", masterModel.mea13);
                    masterModel.mea14_str  = string.Format("{0:N" + bekModel.bek04 + "}", masterModel.mea14);
                    masterModel.mea14t_str = string.Format("{0:N" + bekModel.bek04 + "}", masterModel.mea14t);
                }

                pReport.RegData(dtMaster);
                pReport.RegData("Master", masterList);
                pReport.CacheAllData = true;
                //處理排序
                StiDataBand stiDataBand1 = (StiDataBand)pReport.GetComponents()["DataBand1"];
                switch (manr210Model.order_by)
                {
                case "1":    //1.依託工日期
                    stiDataBand1.Sort = new string[] { "ASC", "mea02" };
                    break;

                case "2":    //2.依廠商
                    stiDataBand1.Sort = new string[] { "ASC", "mea03" };
                    break;
                }
                //處理跳頁
                StiGroupFooterBand grouperBand1 = (StiGroupFooterBand)pReport.GetComponents()["GroupFooterBand1"];
                if (manr210Model.jump_yn.ToUpper() == "Y")
                {
                    grouperBand1.NewPageAfter    = true;
                    grouperBand1.ResetPageNumber = true;
                }
                else
                {
                    grouperBand1.NewPageAfter    = false;
                    grouperBand1.ResetPageNumber = false;
                }

                pReport.Compile();
                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        private void ShowReport()
        {
            StiReport report = new StiReport();

            float columnsWidth = 0;

            DataTable table = new DataTable("ReportData");

            for (int i = 0; i < dgvList.Columns.Count; i++)
            {
                table.Columns.Add(dgvList.Columns[i].Name, dgvList.Columns[i].ValueType);
                columnsWidth += dgvList.Columns[i].Width;
            }

            for (int i = 0; i < dgvList.Rows.Count; i++)
            {
                DataRow row = table.NewRow();
                for (int j = 0; j < dgvList.Columns.Count; j++)
                {
                    row[dgvList.Columns[j].Name] = dgvList[j, i].Value;
                }
                table.Rows.Add(row);
            }

            report.RegData(table);
            report.Dictionary.Synchronize();

            StiPage page = report.Pages[0];

            StiReportTitleBand titleBand = new StiReportTitleBand();

            titleBand.Height = 1.0;
            titleBand.Name   = "TitleBand";
            page.Components.Add(titleBand);

            StiText titleText = new StiText(new RectangleD(0, 0, page.Width, 1));

            titleText.Name         = "TitleText";
            titleText.Text         = Text + " " + pickPlan.Value.ToShortDateString();
            titleText.Width        = page.Width;
            titleText.HorAlignment = StiTextHorAlignment.Center;
            titleText.Font         = new Font("Arial", 10);
            titleBand.Components.Add(titleText);

            //Create HeaderBand
            StiHeaderBand headerBand = new StiHeaderBand();

            headerBand.Height = 0.5;
            headerBand.Name   = "HeaderBand";
            page.Components.Add(headerBand);


            float bandWidth     = (float)page.Width;
            float multiplier    = bandWidth / columnsWidth;
            float previousWidth = 0;

            //Create text on header
            for (int i = 0; i < dgvList.Columns.Count; i++)
            {
                StiText headerText = new StiText(new RectangleD(previousWidth, 0, dgvList.Columns[i].Width * multiplier, 0.5));
                headerText.Text         = dgvList.Columns[i].HeaderText;
                headerText.HorAlignment = StiTextHorAlignment.Center;
                headerText.Name         = "HeaderText" + i.ToString();
                headerText.Border       = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid);
                headerText.Brush        = new StiSolidBrush(Color.LightGreen);
                headerBand.Components.Add(headerText);

                previousWidth += dgvList.Columns[i].Width * multiplier;
            }



            //Create Databand
            StiDataBand dataBand = new StiDataBand();

            dataBand.DataSourceName = "ReportData";
            dataBand.Height         = 0.5;
            dataBand.Name           = "DataBand";
            page.Components.Add(dataBand);

            previousWidth = 0;

            //Create text
            for (int i = 0; i < dgvList.Columns.Count; i++)
            {
                RectangleD rectangle = new RectangleD(previousWidth, 0, dgvList.Columns[i].Width * multiplier, 1);
                StiText    dataText  = new StiText(rectangle);
                dataText.Format = dgvList.Columns[i].DefaultCellStyle.Format;
                dataText.Text   = "{ReportData." + dgvList.Columns[i].Name + "}";
                dataText.Name   = "DataText" + i.ToString();

                dataText.Border = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid);

                dataBand.Components.Add(dataText);
                previousWidth += dgvList.Columns[i].Width * multiplier;
            }

            //Create FooterBand
            StiFooterBand footerBand = new StiFooterBand();

            footerBand.Height = 0.5;
            footerBand.Name   = "FooterBand";
            page.Components.Add(footerBand);

            //Create text on footer
            StiText footerText = new StiText(new RectangleD(0, 0, 5, 0.5));

            footerText.Text         = "Всего - {Count()} строк";
            footerText.HorAlignment = StiTextHorAlignment.Right;
            footerText.Name         = "FooterText";
            footerText.Brush        = new StiSolidBrush(Color.LightGreen);
            footerBand.Components.Add(footerText);

            report.Save("D:\\report.mrt");
            report.Show();
        }
Beispiel #21
0
        protected override bool WfExecReport(Stimulsoft.Report.StiReport pReport)
        {
            //DataSet ds;
            vw_stpr410       stpr410Model;
            StringBuilder    sbSql = null;
            string           sqlBody = "";
            DataTable        dtSgaTb, dtShaTb;
            List <QueryInfo> queryInfoList;
            QueryInfo        queryModel;
            string           strQueryRange, strWhere;
            StringBuilder    sbQuerySingle = null;

            List <SqlParameter> sqlParmList;
            List <MasterA>      resultList = null;

            try
            {
                stpr410Model = DrMaster.ToItem <vw_stpr410>();
                resultList   = new List <MasterA>();
                #region 處理銷售
                if (stpr410Model.sale_type == "0" || stpr410Model.sale_type == "1")
                {
                    queryInfoList = new List <QueryInfo>();
                    #region range 處理
                    if (!GlobalFn.varIsNull(stpr410Model.sga03))
                    {
                        queryModel            = new QueryInfo();
                        queryModel.TableName  = "sga_tb";
                        queryModel.ColumnName = "sga03";
                        queryModel.ColumnType = TabMaster.DtSource.Columns["sga03"].DataType.Name;
                        queryModel.Value      = stpr410Model.sga03;
                        queryInfoList.Add(queryModel);
                    }
                    if (!GlobalFn.varIsNull(stpr410Model.sga04))
                    {
                        queryModel            = new QueryInfo();
                        queryModel.TableName  = "sga_tb";
                        queryModel.ColumnName = "sga04";
                        queryModel.ColumnType = TabMaster.DtSource.Columns["sga04"].DataType.Name;
                        queryModel.Value      = stpr410Model.sga04;
                        queryInfoList.Add(queryModel);
                    }
                    if (!GlobalFn.varIsNull(stpr410Model.sga05))
                    {
                        queryModel            = new QueryInfo();
                        queryModel.TableName  = "sga_tb";
                        queryModel.ColumnName = "sga05";
                        queryModel.ColumnType = TabMaster.DtSource.Columns["sga05"].DataType.Name;
                        queryModel.Value      = stpr410Model.sga05;
                        queryInfoList.Add(queryModel);
                    }
                    sqlParmList   = new List <SqlParameter>();
                    strQueryRange = BoMaster.WfGetQueryString(queryInfoList, out sqlParmList);
                    #endregion

                    #region single 處理
                    sbQuerySingle = new StringBuilder();
                    if (!GlobalFn.varIsNull(stpr410Model.sga02_s))
                    {
                        sbQuerySingle.AppendLine("AND sga02>=@sga02_s");
                        sqlParmList.Add(new SqlParameter("@sga02_s", stpr410Model.sga02_s));
                    }
                    if (!GlobalFn.varIsNull(stpr410Model.sga02_e))
                    {
                        sbQuerySingle.AppendLine("AND sga02<=@sga02_e");
                        sqlParmList.Add(new SqlParameter("@sga02_e", stpr410Model.sga02_e));
                    }

                    if (stpr410Model.confirm_type == "1")
                    {
                        sbQuerySingle.AppendLine("AND sgaconf ='Y'");
                    }
                    else if (stpr410Model.confirm_type == "2")
                    {
                        sbQuerySingle.AppendLine("AND ISNULL(sgaconf,'') <>'Y'");
                    }
                    #endregion

                    strWhere = strQueryRange + " " + sbQuerySingle.ToString();
                    var strSecurity = WfGetSecurityString();        //取得權限字串
                    if (!GlobalFn.varIsNull(strSecurity))
                    {
                        strWhere += strSecurity;
                    }

                    //取得單頭
                    sqlBody = @"
                              SELECT 
                                '銷貨' AS sale_type,
                                sga01,sga02,sga03,sca03 as sga03_c ,
                                sgb02,sga04,bec02 AS sga04_c,sga05,beb03 AS sga05_c,
                                sga10,sga21,
                                sgb03,sgb04,sgb05,'' as sgb05_str,sgb06,
                                bej03,
                                0.0 as price,'' as price_string,
                                sgb10,'' as sgb10_string,
                                sgb10t,'' as sgb10t_string,
                                sgb16
                              FROM sga_tb
                                    LEFT JOIN sgb_tb ON sga01=sgb01
                                    LEFT JOIN sca_tb ON sga03=sca01
                                    LEFT JOIN bec_tb ON sga04=bec01
                                    LEFT JOIN beb_tb ON sga05=beb01
                                    LEFT JOIN bej_tb ON sgb06=bej01
                              WHERE  sgb01 IS NOT NULL
                                ";

                    dtSgaTb           = BoMaster.OfGetDataTable(string.Concat(sqlBody, strWhere), sqlParmList.ToArray());
                    dtSgaTb.TableName = "Master";
                    if (dtSgaTb != null)
                    {
                        resultList.AddRange(dtSgaTb.ToList <YR.ERP.DAL.YRModel.Reports.Stp.Stpr410.MasterA>());
                    }
                }
                #endregion

                #region 處理退貨/折讓
                if (stpr410Model.sale_type == "0" || stpr410Model.sale_type == "2")
                {
                    queryInfoList = new List <QueryInfo>();
                    #region range 處理
                    if (!GlobalFn.varIsNull(stpr410Model.sga03))
                    {
                        queryModel            = new QueryInfo();
                        queryModel.TableName  = "sha_tb";
                        queryModel.ColumnName = "sha03";
                        queryModel.ColumnType = TabMaster.DtSource.Columns["sga03"].DataType.Name;
                        queryModel.Value      = stpr410Model.sga03;
                        queryInfoList.Add(queryModel);
                    }
                    if (!GlobalFn.varIsNull(stpr410Model.sga04))
                    {
                        queryModel            = new QueryInfo();
                        queryModel.TableName  = "sha_tb";
                        queryModel.ColumnName = "sha04";
                        queryModel.ColumnType = TabMaster.DtSource.Columns["sga04"].DataType.Name;
                        queryModel.Value      = stpr410Model.sga04;
                        queryInfoList.Add(queryModel);
                    }
                    if (!GlobalFn.varIsNull(stpr410Model.sga05))
                    {
                        queryModel            = new QueryInfo();
                        queryModel.TableName  = "sha_tb";
                        queryModel.ColumnName = "sha05";
                        queryModel.ColumnType = TabMaster.DtSource.Columns["sga05"].DataType.Name;
                        queryModel.Value      = stpr410Model.sga05;
                        queryInfoList.Add(queryModel);
                    }
                    sqlParmList   = new List <SqlParameter>();
                    strQueryRange = BoMaster.WfGetQueryString(queryInfoList, out sqlParmList);
                    #endregion

                    #region single 處理
                    sbQuerySingle = new StringBuilder();
                    if (!GlobalFn.varIsNull(stpr410Model.sga02_s))
                    {
                        sbQuerySingle.AppendLine("AND sha02>=@sha02_s");
                        sqlParmList.Add(new SqlParameter("@sha02_s", stpr410Model.sga02_s));
                    }
                    if (!GlobalFn.varIsNull(stpr410Model.sga02_e))
                    {
                        sbQuerySingle.AppendLine("AND sha02<=@sha02_e");
                        sqlParmList.Add(new SqlParameter("@sha02_e", stpr410Model.sga02_e));
                    }

                    if (stpr410Model.confirm_type == "1")
                    {
                        sbQuerySingle.AppendLine("AND shaconf ='Y'");
                    }
                    else if (stpr410Model.confirm_type == "2")
                    {
                        sbQuerySingle.AppendLine("AND ISNULL(shaconf,'') <>'Y'");
                    }
                    #endregion

                    strWhere = strQueryRange + " " + sbQuerySingle.ToString();
                    var strSecurity = WfGetSecurityString();        //取得權限字串
                    if (!GlobalFn.varIsNull(strSecurity))
                    {
                        strWhere += strSecurity;
                    }

                    //取得單頭
                    sqlBody = @"
                              SELECT 
                                CASE WHEN shb17='1' THEN '銷退' ELSE '折讓' END AS sale_type,
                                sha01 AS sga01,sha02 AS sga02,sha03 AS sga03,sca03 as sga03_c ,
                                shb02 AS sgb02,sha04 AS sga04,bec02 AS sga04_c,sha05 AS sga05,beb03 AS sga05_c,
                                sha10 AS sga10,shb19 AS sga21,
                                shb03 AS sgb03,shb04 AS sgb04,shb05 AS sgb05,'' as sgb05_str,shb06 AS sgb06,
                                bej03,
                                0.0 as price,'' as price_string,
                                -1*shb10 AS sgb10,'' as sgb10_string,
                                -1*shb10t AS sgb10t,'' as sgb10t_string,
                                shb16 AS sgb16
                              FROM sha_tb
                                    LEFT JOIN shb_tb ON sha01=shb01
                                    LEFT JOIN sca_tb ON sha03=sca01
                                    LEFT JOIN bec_tb ON sha04=bec01
                                    LEFT JOIN beb_tb ON sha05=beb01
                                    LEFT JOIN bej_tb ON shb06=bej01
                              WHERE  shb01 IS NOT NULL
                                ";

                    dtSgaTb           = BoMaster.OfGetDataTable(string.Concat(sqlBody, strWhere), sqlParmList.ToArray());
                    dtSgaTb.TableName = "Master";
                    if (dtSgaTb != null)
                    {
                        resultList.AddRange(dtSgaTb.ToList <YR.ERP.DAL.YRModel.Reports.Stp.Stpr410.MasterA>());
                    }
                }
                #endregion

                if (resultList == null || resultList.Count == 0)
                {
                    WfShowErrorMsg("查無資料,請重新過濾條件!");
                    return(false);
                }

                foreach (MasterA masterModel in resultList)
                {
                    var bekModel = BoBas.OfGetBekModel(masterModel.sga10);
                    //處理單價
                    if (masterModel.sgb05 > 0)
                    {
                        masterModel.price = Math.Round((masterModel.sgb10 / masterModel.sgb05), Convert.ToInt16(bekModel.bek03), MidpointRounding.AwayFromZero);
                    }
                    else
                    {
                        masterModel.price = masterModel.sgb10;
                    }

                    masterModel.price_string  = string.Format("{0:N" + bekModel.bek03 + "}", masterModel.price);
                    masterModel.sgb10_string  = string.Format("{0:N" + bekModel.bek04 + "}", masterModel.sgb10);
                    masterModel.sgb10t_string = string.Format("{0:N" + bekModel.bek04 + "}", masterModel.sgb10t);
                    //數量處理
                    masterModel.sgb05_str = string.Format("{0:N" + masterModel.bej03 + "}", masterModel.sgb05);//數量
                }

                pReport.RegData("master", resultList);
                pReport.CacheAllData = true;
                //處理排序--這裡利用group來達到

                StiGroupHeaderBand stiGroupHeaderBand1 = (StiGroupHeaderBand)pReport.GetComponents()["GroupHeaderBand1"];
                StiDataBand        StiDataBand1        = (StiDataBand)pReport.GetComponents()["DataBand1"];
                switch (stpr410Model.order_by)
                {
                case "1":    //1.依出庫日期
                    stiGroupHeaderBand1.Condition.Value = "{Master.sga02}";
                    StiDataBand1.Sort = new string[6] {
                        "ASC",
                        "sga02",
                        "ASC",
                        "sga01",
                        "ASC",
                        "sgb02",
                    };
                    break;

                case "2":    //2.依客戶
                    stiGroupHeaderBand1.Condition.Value = "{Master.sga03}";
                    StiDataBand1.Sort = new string[6] {
                        "ASC",
                        "sga03",
                        "ASC",
                        "sga01",
                        "ASC",
                        "sgb02",
                    };
                    break;

                case "3":    //3.依部門
                    stiGroupHeaderBand1.Condition.Value = "{Master.sga05}";
                    StiDataBand1.Sort = new string[6] {
                        "ASC",
                        "sga05",
                        "ASC",
                        "sga01",
                        "ASC",
                        "sgb02",
                    };
                    break;

                case "4":    //4.依業務
                    stiGroupHeaderBand1.Condition.Value = "{Master.sga04}";
                    StiDataBand1.Sort = new string[6] {
                        "ASC",
                        "sga04",
                        "ASC",
                        "sga01",
                        "ASC",
                        "sgb02",
                    };
                    break;
                }
                //處理跳頁
                StiGroupFooterBand footerBand1 = (StiGroupFooterBand)pReport.GetComponents()["GroupFooterBand1"];
                if (stpr410Model.jump_yn.ToUpper() == "Y")
                {
                    footerBand1.NewPageAfter    = true;
                    footerBand1.ResetPageNumber = true;
                }
                else
                {
                    footerBand1.NewPageAfter    = false;
                    footerBand1.ResetPageNumber = false;
                }

                pReport.Compile();
                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #22
0
        protected override bool WfExecReport(Stimulsoft.Report.StiReport pReport)
        {
            //DataSet ds;
            vw_manr311    manr311Model;
            StringBuilder sbSql   = null;
            string        sqlBody = "";
            DataTable     dtMaster;
            List <YR.ERP.DAL.YRModel.Reports.Man.Manr311.Master> masterList;
            List <QueryInfo> queryInfoList;
            QueryInfo        queryModel;
            string           strQueryRange, strWhere;
            StringBuilder    sbQuerySingle = null;

            List <SqlParameter> sqlParmList;

            try
            {
                if (Vw_Manr311 != null) //他窗引用時
                {
                    manr311Model = Vw_Manr311;
                }
                else
                {
                    manr311Model = DrMaster.ToItem <vw_manr311>();
                }

                queryInfoList = new List <QueryInfo>();
                #region range 處理
                if (!GlobalFn.varIsNull(manr311Model.mfa01))
                {
                    queryModel            = new QueryInfo();
                    queryModel.TableName  = "mfa_tb";
                    queryModel.ColumnName = "mfa01";
                    queryModel.ColumnType = TabMaster.DtSource.Columns["mfa01"].DataType.Name;
                    queryModel.Value      = manr311Model.mfa01;
                    queryInfoList.Add(queryModel);
                }
                if (!GlobalFn.varIsNull(manr311Model.mfa03))
                {
                    queryModel            = new QueryInfo();
                    queryModel.TableName  = "mfa_tb";
                    queryModel.ColumnName = "mfa03";
                    queryModel.ColumnType = TabMaster.DtSource.Columns["mfa03"].DataType.Name;
                    queryModel.Value      = manr311Model.mfa03;
                    queryInfoList.Add(queryModel);
                }
                sqlParmList = new List <SqlParameter>();

                if (!GlobalFn.varIsNull(manr311Model.mfa06))
                {
                    queryModel            = new QueryInfo();
                    queryModel.TableName  = "mfa_tb";
                    queryModel.ColumnName = "mfa06";
                    queryModel.ColumnType = TabMaster.DtSource.Columns["mfa06"].DataType.Name;
                    queryModel.Value      = manr311Model.mfa06;
                    queryInfoList.Add(queryModel);
                }
                sqlParmList   = new List <SqlParameter>();
                strQueryRange = BoMaster.WfGetQueryString(queryInfoList, out sqlParmList);
                #endregion

                #region single 處理
                sbQuerySingle = new StringBuilder();
                if (!GlobalFn.varIsNull(manr311Model.mfa02_s))
                {
                    sbQuerySingle.AppendLine("AND mfa02>=@mfa02_s");
                    sqlParmList.Add(new SqlParameter("@mfa02_s", manr311Model.mfa02_s));
                }
                if (!GlobalFn.varIsNull(manr311Model.mfa02_e))
                {
                    sbQuerySingle.AppendLine("AND mfa02<=@mfa02_e");
                    sqlParmList.Add(new SqlParameter("@mfa02_e", manr311Model.mfa02_e));
                }
                #endregion

                strWhere = strQueryRange + " " + sbQuerySingle.ToString();
                var strSecurity = WfGetSecurityString();        //取得權限字串
                if (!GlobalFn.varIsNull(strSecurity))
                {
                    strWhere += strSecurity;
                }

                //取得單頭
                sqlBody            = @"SELECT 
	                            mfa00,mfa01,mfa02,mfa03,mfa04,mfa05,
	                            mfa06,mfa07,mfa08,
                                bab02 as mfa01_c,
                                pca02 as mfa03_c,
	                            bec02 as mfa04_c,beb02 as mfa05_c,
	                            mfb02,mfb03,mfb04,mfb05,mfb06,
	                            mfb07,mfb09,
                                ica.ica03 as ica03,
                                bej.bej03 as bej03,
                                '' as mfb05_str,
                                pcb03,pcb04,pcb06,pcb07
                            FROM mfa_tb   
                                LEFT JOIN mfb_tb On mfa01=mfb01
	                            LEFT JOIN baa_tb ON 1=1	
	                            LEFT JOIN bab_tb ON substring(mfa01,1,baa06)=bab01
	                            LEFT JOIN pca_tb ON mfa03=pca01	--廠商
	                            LEFT JOIN bec_tb ON mfa04=bec01	--員工
	                            LEFT JOIN beb_tb ON mfa05=beb01	--部門
                                LEFT JOIN ica_tb ica ON mfb03=ica.ica01
                                LEFT JOIN bej_tb bej ON mfb06=bej.bej01
                                LEFT JOIN pcb_tb ON mfa03=pcb01 and mfa07=pcb02
                            WHERE 1=1 
                                AND mfaconf='Y'
                                AND mfa00='2'
                           ";
                dtMaster           = BoMaster.OfGetDataTable(string.Concat(sqlBody, strWhere), sqlParmList.ToArray());
                dtMaster.TableName = "Master";

                if (dtMaster == null || dtMaster.Rows.Count == 0)
                {
                    WfShowErrorMsg("查無資料,請重新過濾條件!");
                    return(false);
                }

                masterList = dtMaster.ToList <Master>();
                foreach (Master masterModel in masterList)
                {
                    masterModel.mfb05_str = string.Format("{0:N" + masterModel.bej03 + "}", masterModel.mfb05);//子件數量
                }

                pReport.RegData(dtMaster);
                pReport.RegData("Master", masterList);
                pReport.CacheAllData = true;
                //處理排序
                StiDataBand stiDataBand1 = (StiDataBand)pReport.GetComponents()["DataBand1"];
                switch (manr311Model.order_by)
                {
                case "1":    //1.依出庫日期
                    stiDataBand1.Sort = new string[] { "ASC", "mfa02" };
                    break;

                case "2":    //2.依廠商
                    stiDataBand1.Sort = new string[] { "ASC", "mfa03" };
                    break;
                }
                //處理跳頁
                StiGroupFooterBand grouperBand1 = (StiGroupFooterBand)pReport.GetComponents()["GroupFooterBand1"];
                if (manr311Model.jump_yn.ToUpper() == "Y")
                {
                    grouperBand1.NewPageAfter    = true;
                    grouperBand1.ResetPageNumber = true;
                }
                else
                {
                    grouperBand1.NewPageAfter    = false;
                    grouperBand1.ResetPageNumber = false;
                }

                pReport.Compile();
                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #23
0
 public static StiReport GenerateReportFromDataTable(System.Data.DataTable dataTable, string reportHeader, StiPageOrientation orientation)
 {
     if ((dataTable == null) || (dataTable.Rows.get_Count() == 0))
     {
         throw new System.ApplicationException("Не сформирован входящий набор данных.");
     }
     StiReport report = new StiReport();
     report.RegData("data", (System.Data.DataTable) dataTable);
     report.Dictionary.Synchronize();
     report.Dictionary.DataSources[0].Name = "data";
     report.Dictionary.DataSources[0].Alias = "data";
     StiReportTitleBand titleBand = new StiReportTitleBand {
         Height = 2.0,
         Name = "TitleBand"
     };
     StiText component = new StiText(new RectangleD(0.0, 0.0, 30.0, 1.0), reportHeader) {
         DockStyle = StiDockStyle.Top,
         HorAlignment = StiTextHorAlignment.Center,
         Name = "TextHeader",
         Font = (System.Drawing.Font) new System.Drawing.Font("Arial", 12f, System.Drawing.FontStyle.Regular),
         Editable = true
     };
     titleBand.Components.Add(component);
     StiDataBand dataBand = new StiDataBand {
         DataSourceName = "data",
         Height = 1.0,
         Name = "DataBand"
     };
     double x = 0.0;
     double y = 0.0;
     double height = 1.0;
     System.Data.DataView view = new System.Data.DataView(dataTable);
     view.set_Sort("OrderColumn");
     int num4 = 0;
     foreach (System.Data.DataRow row in view.ToTable("OutputTable").Rows)
     {
         if (System.Convert.ToBoolean(row.get_Item("PrintColumn")))
         {
             double width = System.Convert.ToDouble(row.get_Item("WidthColumn"));
             component = CreateHeaderStiText("TextHeader" + ((int) num4), row.get_Item("HeaderColumn").ToString(), x, 1.0, width, 1.0);
             StiText dataText = CreateDataStiText("TextData" + ((int) num4), row.get_Item("DataColumn").ToString(), System.Convert.ToBoolean(row.get_Item("AlignColumn")), x, y, width, height);
             AddStitexts(component, dataText, ref titleBand, ref dataBand, ref x, width);
         }
         num4 = (int) (num4 + 1);
     }
     report.Pages[0].Components.Add(titleBand);
     report.Pages[0].Components.Add(dataBand);
     report.Pages[0].Orientation = orientation;
     report.Pages[0].Margins = new StiMargins(0.5, 0.5, 0.5, 0.5);
     return report;
 }
Beispiel #24
0
 private void InitializeComponent()
 {
     VW_SalesOrderHeader = new VW_SalesOrderHeaderDataSource();
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyName", "MyCompanyName", typeof(string), "", false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyTaxCode", "MyCompanyTaxCode", typeof(string), "", false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyDirectorName", "MyCompanyDirectorName", typeof(string), "", false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyCountryCode", "MyCompanyCountryCode", typeof(string), "", false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyCountryName", "MyCompanyCountryName", typeof(string), "", false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyCity", "MyCompanyCity", typeof(string), "", false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyPostalCode", "MyCompanyPostalCode", typeof(string), "", false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyAddress", "MyCompanyAddress", typeof(string), "", false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyPhone", "MyCompanyPhone", typeof(string), "", false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyFax", "MyCompanyFax", typeof(string), "", false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyBankName", "MyCompanyBankName", typeof(string), "", false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyBankCode", "MyCompanyBankCode", typeof(string), "", false, false));
     Dictionary.Variables.Add(new StiVariable("", "MyCompanyBankAccountNumber", "MyCompanyBankAccountNumber", typeof(string), "", false, false));
     NeedsCompiling    = false;
     Text1_Sum         = new StiSumDecimalFunctionService();
     FooterText1_Count = new StiCountFunctionService();
     // Variables init
     // Variables init
     MyCompanyName              = "";
     MyCompanyTaxCode           = "";
     MyCompanyDirectorName      = "";
     MyCompanyCountryCode       = "";
     MyCompanyCountryName       = "";
     MyCompanyCity              = "";
     MyCompanyPostalCode        = "";
     MyCompanyAddress           = "";
     MyCompanyPhone             = "";
     MyCompanyFax               = "";
     MyCompanyBankName          = "";
     MyCompanyBankCode          = "";
     MyCompanyBankAccountNumber = "";
     EngineVersion              = StiEngineVersion.EngineV2;
     ReferencedAssemblies       = new[] {
         "System.Dll",
         "System.Drawing.Dll",
         "System.Windows.Forms.Dll",
         "System.Data.Dll",
         "System.Xml.Dll",
         "Stimulsoft.Controls.Dll",
         "Stimulsoft.Base.Dll",
         "Stimulsoft.Report.Dll"
     };
     ReportAlias  = "Rpt Sales Order Header";
     ReportAuthor = "Programmer.GE";
     //
     // ReportChanged
     //
     ReportChanged = new DateTime(2009, 6, 17, 11, 6, 30, 0);
     //
     // ReportCreated
     //
     ReportCreated     = new DateTime(2009, 2, 8, 17, 26, 28, 0);
     ReportDescription = "გაყიდვების რეპორტი";
     ReportGuid        = "2f64cd76b33a4817bb677636d7597eee";
     ReportName        = "RptSalesOrderHeader";
     ReportUnit        = StiReportUnitType.Centimeters;
     ScriptLanguage    = StiReportLanguageType.CSharp;
     //
     // Page1
     //
     Page1            = new StiPage();
     Page1.Guid       = "08a406f7186b4a67b5f7a96a78aa664a";
     Page1.Name       = "Page1";
     Page1.PageHeight = 29.7;
     Page1.PageWidth  = 21;
     Page1.Border     = new StiBorder(StiBorderSides.None, Color.Black, 2, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Page1.Brush      = new StiSolidBrush(Color.Transparent);
     //
     // ReportTitle
     //
     ReportTitle = new StiReportTitleBand();
     ReportTitle.ClientRectangle = new RectangleD(0, 0.4, 19, 0.8);
     ReportTitle.Name            = "ReportTitle";
     ReportTitle.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     ReportTitle.Brush           = new StiSolidBrush(Color.Transparent);
     //
     // ReportTitleText
     //
     ReportTitleText = new StiText();
     ReportTitleText.ClientRectangle = new RectangleD(0, 0, 19, 0.8);
     ReportTitleText.HorAlignment    = StiTextHorAlignment.Center;
     ReportTitleText.Name            = "ReportTitleText";
     ReportTitleText.GetValue       += new StiGetValueEventHandler(ReportTitleText__GetValue);
     ReportTitleText.Type            = StiSystemTextType.Expression;
     ReportTitleText.VertAlignment   = StiVertAlignment.Center;
     ReportTitleText.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     ReportTitleText.Brush           = new StiSolidBrush(Color.Transparent);
     ReportTitleText.Font            = new Font("BPG Glaho Arial", 12F, FontStyle.Bold);
     ReportTitleText.Guid            = null;
     ReportTitleText.Interaction     = null;
     ReportTitleText.Margins         = new StiMargins(0, 0, 0, 0);
     ReportTitleText.TextBrush       = new StiSolidBrush(Color.Black);
     ReportTitleText.TextOptions     = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     ReportTitle.Guid        = null;
     ReportTitle.Interaction = null;
     //
     // Header
     //
     Header = new StiHeaderBand();
     Header.ClientRectangle = new RectangleD(0, 2, 19, 0.8);
     Header.Name            = "Header";
     Header.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Header.Brush           = new StiSolidBrush(Color.Transparent);
     //
     // HeaderText1
     //
     HeaderText1                 = new StiText();
     HeaderText1.CanGrow         = true;
     HeaderText1.ClientRectangle = new RectangleD(0, 0, 2.8, 0.8);
     HeaderText1.HorAlignment    = StiTextHorAlignment.Center;
     HeaderText1.Name            = "HeaderText1";
     HeaderText1.GetValue       += new StiGetValueEventHandler(HeaderText1__GetValue);
     HeaderText1.Type            = StiSystemTextType.Expression;
     HeaderText1.VertAlignment   = StiVertAlignment.Center;
     HeaderText1.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     HeaderText1.Brush           = new StiSolidBrush(Color.Transparent);
     HeaderText1.Font            = new Font("BPG Glaho Arial", 10F, FontStyle.Bold);
     HeaderText1.Guid            = null;
     HeaderText1.Interaction     = null;
     HeaderText1.Margins         = new StiMargins(0, 0, 0, 0);
     HeaderText1.TextBrush       = new StiSolidBrush(Color.Black);
     HeaderText1.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // HeaderText2
     //
     HeaderText2                 = new StiText();
     HeaderText2.CanGrow         = true;
     HeaderText2.ClientRectangle = new RectangleD(2.8, 0, 2, 0.8);
     HeaderText2.HorAlignment    = StiTextHorAlignment.Center;
     HeaderText2.Name            = "HeaderText2";
     HeaderText2.GetValue       += new StiGetValueEventHandler(HeaderText2__GetValue);
     HeaderText2.Type            = StiSystemTextType.Expression;
     HeaderText2.VertAlignment   = StiVertAlignment.Center;
     HeaderText2.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     HeaderText2.Brush           = new StiSolidBrush(Color.Transparent);
     HeaderText2.Font            = new Font("BPG Glaho Arial", 10F, FontStyle.Bold);
     HeaderText2.Guid            = null;
     HeaderText2.Interaction     = null;
     HeaderText2.Margins         = new StiMargins(0, 0, 0, 0);
     HeaderText2.TextBrush       = new StiSolidBrush(Color.Black);
     HeaderText2.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // HeaderText3
     //
     HeaderText3                 = new StiText();
     HeaderText3.CanGrow         = true;
     HeaderText3.ClientRectangle = new RectangleD(4.8, 0, 6.4, 0.8);
     HeaderText3.HorAlignment    = StiTextHorAlignment.Center;
     HeaderText3.Name            = "HeaderText3";
     HeaderText3.GetValue       += new StiGetValueEventHandler(HeaderText3__GetValue);
     HeaderText3.Type            = StiSystemTextType.Expression;
     HeaderText3.VertAlignment   = StiVertAlignment.Center;
     HeaderText3.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     HeaderText3.Brush           = new StiSolidBrush(Color.Transparent);
     HeaderText3.Font            = new Font("BPG Glaho Arial", 10F, FontStyle.Bold);
     HeaderText3.Guid            = null;
     HeaderText3.Interaction     = null;
     HeaderText3.Margins         = new StiMargins(0, 0, 0, 0);
     HeaderText3.TextBrush       = new StiSolidBrush(Color.Black);
     HeaderText3.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // HeaderText4
     //
     HeaderText4                 = new StiText();
     HeaderText4.CanGrow         = true;
     HeaderText4.ClientRectangle = new RectangleD(11.2, 0, 2.8, 0.8);
     HeaderText4.HorAlignment    = StiTextHorAlignment.Center;
     HeaderText4.Name            = "HeaderText4";
     HeaderText4.GetValue       += new StiGetValueEventHandler(HeaderText4__GetValue);
     HeaderText4.Type            = StiSystemTextType.Expression;
     HeaderText4.VertAlignment   = StiVertAlignment.Center;
     HeaderText4.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     HeaderText4.Brush           = new StiSolidBrush(Color.Transparent);
     HeaderText4.Font            = new Font("BPG Glaho Arial", 10F, FontStyle.Bold);
     HeaderText4.Guid            = null;
     HeaderText4.Interaction     = null;
     HeaderText4.Margins         = new StiMargins(0, 0, 0, 0);
     HeaderText4.TextBrush       = new StiSolidBrush(Color.Black);
     HeaderText4.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // HeaderText5
     //
     HeaderText5                 = new StiText();
     HeaderText5.CanGrow         = true;
     HeaderText5.ClientRectangle = new RectangleD(14, 0, 1.6, 0.8);
     HeaderText5.HorAlignment    = StiTextHorAlignment.Center;
     HeaderText5.Name            = "HeaderText5";
     HeaderText5.GetValue       += new StiGetValueEventHandler(HeaderText5__GetValue);
     HeaderText5.Type            = StiSystemTextType.Expression;
     HeaderText5.VertAlignment   = StiVertAlignment.Center;
     HeaderText5.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     HeaderText5.Brush           = new StiSolidBrush(Color.Transparent);
     HeaderText5.Font            = new Font("BPG Glaho Arial", 10F, FontStyle.Bold);
     HeaderText5.Guid            = null;
     HeaderText5.Interaction     = null;
     HeaderText5.Margins         = new StiMargins(0, 0, 0, 0);
     HeaderText5.TextBrush       = new StiSolidBrush(Color.Black);
     HeaderText5.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // HeaderText6
     //
     HeaderText6                 = new StiText();
     HeaderText6.CanGrow         = true;
     HeaderText6.ClientRectangle = new RectangleD(15.6, 0, 3.4, 0.8);
     HeaderText6.HorAlignment    = StiTextHorAlignment.Center;
     HeaderText6.Name            = "HeaderText6";
     HeaderText6.GetValue       += new StiGetValueEventHandler(HeaderText6__GetValue);
     HeaderText6.Type            = StiSystemTextType.Expression;
     HeaderText6.VertAlignment   = StiVertAlignment.Center;
     HeaderText6.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     HeaderText6.Brush           = new StiSolidBrush(Color.Transparent);
     HeaderText6.Font            = new Font("BPG Glaho Arial", 10F, FontStyle.Bold);
     HeaderText6.Guid            = null;
     HeaderText6.Interaction     = null;
     HeaderText6.Margins         = new StiMargins(0, 0, 0, 0);
     HeaderText6.TextBrush       = new StiSolidBrush(Color.Black);
     HeaderText6.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     Header.Guid                 = null;
     Header.Interaction          = null;
     //
     // GroupHeader0
     //
     GroupHeader0 = new StiGroupHeaderBand();
     GroupHeader0.ClientRectangle = new RectangleD(0, 3.6, 19, 0.8);
     GroupHeader0.GetValue       += new StiValueEventHandler(GroupHeader0__GetValue);
     GroupHeader0.Name            = "GroupHeader0";
     GroupHeader0.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     GroupHeader0.Brush           = new StiSolidBrush(Color.Transparent);
     //
     // GroupHeaderText0
     //
     GroupHeaderText0                 = new StiText();
     GroupHeaderText0.CanGrow         = true;
     GroupHeaderText0.ClientRectangle = new RectangleD(0, 0, 19, 0.8);
     GroupHeaderText0.Name            = "GroupHeaderText0";
     GroupHeaderText0.GetValue       += new StiGetValueEventHandler(GroupHeaderText0__GetValue);
     GroupHeaderText0.VertAlignment   = StiVertAlignment.Center;
     GroupHeaderText0.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     GroupHeaderText0.Brush           = new StiSolidBrush(Color.Transparent);
     GroupHeaderText0.Font            = new Font("BPG Glaho Arial", 10F, FontStyle.Bold);
     GroupHeaderText0.Guid            = null;
     GroupHeaderText0.Interaction     = null;
     GroupHeaderText0.Margins         = new StiMargins(0, 0, 0, 0);
     GroupHeaderText0.TextBrush       = new StiSolidBrush(Color.Black);
     GroupHeaderText0.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     GroupHeader0.Guid                = null;
     GroupHeader0.Interaction         = null;
     //
     // Data
     //
     Data = new StiDataBand();
     Data.ClientRectangle = new RectangleD(0, 5.2, 19, 0.6);
     Data.DataSourceName  = "VW_SalesOrderHeader";
     Data.Name            = "Data";
     Data.Sort            = new[] {
         "ASC",
         "BranchName",
         "ASC",
         "OrderDate"
     };
     Data.Border = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Data.Brush  = new StiSolidBrush(Color.Transparent);
     //
     // DataText1
     //
     DataText1 = new StiText();
     DataText1.ClientRectangle = new RectangleD(0, 0, 2.2, 0.6);
     DataText1.Name            = "DataText1";
     DataText1.GetValue       += new StiGetValueEventHandler(DataText1__GetValue);
     DataText1.VertAlignment   = StiVertAlignment.Center;
     DataText1.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     DataText1.Brush           = new StiSolidBrush(Color.Transparent);
     DataText1.Font            = new Font("BPG Glaho Arial", 10F);
     DataText1.Guid            = null;
     DataText1.Interaction     = null;
     DataText1.Margins         = new StiMargins(0, 0, 0, 0);
     DataText1.TextBrush       = new StiSolidBrush(Color.Black);
     DataText1.TextOptions     = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // DataText2
     //
     DataText2 = new StiText();
     DataText2.ClientRectangle = new RectangleD(2.2, 0, 3.2, 0.6);
     DataText2.Name            = "DataText2";
     DataText2.GetValue       += new StiGetValueEventHandler(DataText2__GetValue);
     DataText2.VertAlignment   = StiVertAlignment.Center;
     DataText2.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     DataText2.Brush           = new StiSolidBrush(Color.Transparent);
     DataText2.Font            = new Font("BPG Glaho Arial", 10F);
     DataText2.Guid            = null;
     DataText2.Interaction     = null;
     DataText2.Margins         = new StiMargins(0, 0, 0, 0);
     DataText2.TextBrush       = new StiSolidBrush(Color.Black);
     DataText2.TextFormat      = new StiCustomFormatService("G");
     DataText2.TextOptions     = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // DataText3
     //
     DataText3 = new StiText();
     DataText3.ClientRectangle = new RectangleD(5.4, 0, 5.8, 0.6);
     DataText3.Name            = "DataText3";
     DataText3.GetValue       += new StiGetValueEventHandler(DataText3__GetValue);
     DataText3.Type            = StiSystemTextType.Expression;
     DataText3.VertAlignment   = StiVertAlignment.Center;
     DataText3.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     DataText3.Brush           = new StiSolidBrush(Color.Transparent);
     DataText3.Font            = new Font("BPG Glaho Arial", 10F);
     DataText3.Guid            = null;
     DataText3.Interaction     = null;
     DataText3.Margins         = new StiMargins(0, 0, 0, 0);
     DataText3.TextBrush       = new StiSolidBrush(Color.Black);
     DataText3.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // DataText4
     //
     DataText4 = new StiText();
     DataText4.ClientRectangle = new RectangleD(11.2, 0, 2.8, 0.6);
     DataText4.HorAlignment    = StiTextHorAlignment.Right;
     DataText4.Name            = "DataText4";
     DataText4.GetValue       += new StiGetValueEventHandler(DataText4__GetValue);
     DataText4.VertAlignment   = StiVertAlignment.Center;
     DataText4.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     DataText4.Brush           = new StiSolidBrush(Color.Transparent);
     DataText4.Font            = new Font("BPG Glaho Arial", 10F);
     DataText4.Guid            = null;
     DataText4.Interaction     = null;
     DataText4.Margins         = new StiMargins(0, 0, 0, 0);
     DataText4.TextBrush       = new StiSolidBrush(Color.Black);
     DataText4.TextFormat      = new StiNumberFormatService(1, ",", 2, " ", 3, true, true, " ");
     DataText4.TextOptions     = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // DataText5
     //
     DataText5 = new StiText();
     DataText5.ClientRectangle = new RectangleD(14, 0, 1.6, 0.6);
     DataText5.HorAlignment    = StiTextHorAlignment.Center;
     DataText5.Name            = "DataText5";
     DataText5.GetValue       += new StiGetValueEventHandler(DataText5__GetValue);
     DataText5.VertAlignment   = StiVertAlignment.Center;
     DataText5.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     DataText5.Brush           = new StiSolidBrush(Color.Transparent);
     DataText5.Font            = new Font("BPG Glaho Arial", 10F);
     DataText5.Guid            = null;
     DataText5.Interaction     = null;
     DataText5.Margins         = new StiMargins(0, 0, 0, 0);
     DataText5.TextBrush       = new StiSolidBrush(Color.Black);
     DataText5.TextOptions     = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // DataText6
     //
     DataText6 = new StiText();
     DataText6.ClientRectangle = new RectangleD(15.6, 0, 3.4, 0.6);
     DataText6.Name            = "DataText6";
     DataText6.GetValue       += new StiGetValueEventHandler(DataText6__GetValue);
     DataText6.VertAlignment   = StiVertAlignment.Center;
     DataText6.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     DataText6.Brush           = new StiSolidBrush(Color.Transparent);
     DataText6.Font            = new Font("BPG Glaho Arial", 10F);
     DataText6.Guid            = null;
     DataText6.Interaction     = null;
     DataText6.Margins         = new StiMargins(0, 0, 0, 0);
     DataText6.TextBrush       = new StiSolidBrush(Color.Black);
     DataText6.TextOptions     = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     Data.Guid            = null;
     Data.Interaction     = null;
     Data.MasterComponent = null;
     //
     // GroupFooter0
     //
     GroupFooter0 = new StiGroupFooterBand();
     GroupFooter0.ClientRectangle = new RectangleD(0, 6.6, 19, 0.4);
     GroupFooter0.Name            = "GroupFooter0";
     GroupFooter0.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     GroupFooter0.Brush           = new StiSolidBrush(Color.Transparent);
     GroupFooter0.Guid            = null;
     GroupFooter0.Interaction     = null;
     //
     // Footer
     //
     Footer = new StiFooterBand();
     Footer.ClientRectangle = new RectangleD(0, 7.8, 19, 0.6);
     Footer.Name            = "Footer";
     Footer.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Footer.Brush           = new StiSolidBrush(Color.Transparent);
     //
     // FooterText1
     //
     FooterText1                 = new StiText();
     FooterText1.CanGrow         = true;
     FooterText1.ClientRectangle = new RectangleD(0, 0, 2.2, 0.6);
     FooterText1.HorAlignment    = StiTextHorAlignment.Center;
     FooterText1.Name            = "FooterText1";
     //
     // FooterText1_Count
     //
     FooterText1.GetValue     += new StiGetValueEventHandler(FooterText1__GetValue);
     FooterText1.Type          = StiSystemTextType.Expression;
     FooterText1.VertAlignment = StiVertAlignment.Center;
     FooterText1.Border        = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     FooterText1.Brush         = new StiSolidBrush(Color.Transparent);
     FooterText1.Font          = new Font("BPG Glaho Arial", 10F, FontStyle.Bold);
     FooterText1.Guid          = null;
     FooterText1.Interaction   = null;
     FooterText1.Margins       = new StiMargins(0, 0, 0, 0);
     FooterText1.TextBrush     = new StiSolidBrush(Color.Black);
     FooterText1.TextOptions   = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // Text1
     //
     Text1 = new StiText();
     Text1.ClientRectangle = new RectangleD(11.2, 0, 2.8, 0.6);
     Text1.HorAlignment    = StiTextHorAlignment.Right;
     Text1.Name            = "Text1";
     //
     // Text1_Sum
     //
     Text1.GetValue                     += new StiGetValueEventHandler(Text1__GetValue);
     Text1.Type                          = StiSystemTextType.Totals;
     Text1.Border                        = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Text1.Brush                         = new StiSolidBrush(Color.Transparent);
     Text1.Font                          = new Font("BPG Glaho Arial", 10F, FontStyle.Bold);
     Text1.Guid                          = null;
     Text1.Interaction                   = null;
     Text1.Margins                       = new StiMargins(0, 0, 0, 0);
     Text1.TextBrush                     = new StiSolidBrush(Color.Black);
     Text1.TextFormat                    = new StiNumberFormatService(1, ",", 2, " ", 3, true, true, " ");
     Text1.TextOptions                   = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     Footer.Guid                         = null;
     Footer.Interaction                  = null;
     Page1.ExcelSheetValue               = null;
     Page1.Interaction                   = null;
     Page1.Margins                       = new StiMargins(1, 1, 1, 1);
     Page1_Watermark                     = new StiWatermark();
     Page1_Watermark.Font                = new Font("Arial", 100F);
     Page1_Watermark.Image               = null;
     Page1_Watermark.TextBrush           = new StiSolidBrush(Color.FromArgb(50, 0, 0, 0));
     RptSalesOrderHeader_PrinterSettings = new StiPrinterSettings();
     PrinterSettings                     = RptSalesOrderHeader_PrinterSettings;
     Page1.Page                          = Page1;
     Page1.Report                        = this;
     Page1.Watermark                     = Page1_Watermark;
     ReportTitle.Page                    = Page1;
     ReportTitle.Parent                  = Page1;
     ReportTitleText.Page                = Page1;
     ReportTitleText.Parent              = ReportTitle;
     Header.Page                         = Page1;
     Header.Parent                       = Page1;
     HeaderText1.Page                    = Page1;
     HeaderText1.Parent                  = Header;
     HeaderText2.Page                    = Page1;
     HeaderText2.Parent                  = Header;
     HeaderText3.Page                    = Page1;
     HeaderText3.Parent                  = Header;
     HeaderText4.Page                    = Page1;
     HeaderText4.Parent                  = Header;
     HeaderText5.Page                    = Page1;
     HeaderText5.Parent                  = Header;
     HeaderText6.Page                    = Page1;
     HeaderText6.Parent                  = Header;
     GroupHeader0.Page                   = Page1;
     GroupHeader0.Parent                 = Page1;
     GroupHeaderText0.Page               = Page1;
     GroupHeaderText0.Parent             = GroupHeader0;
     Data.Page           = Page1;
     Data.Parent         = Page1;
     DataText1.Page      = Page1;
     DataText1.Parent    = Data;
     DataText2.Page      = Page1;
     DataText2.Parent    = Data;
     DataText3.Page      = Page1;
     DataText3.Parent    = Data;
     DataText4.Page      = Page1;
     DataText4.Parent    = Data;
     DataText5.Page      = Page1;
     DataText5.Parent    = Data;
     DataText6.Page      = Page1;
     DataText6.Parent    = Data;
     GroupFooter0.Page   = Page1;
     GroupFooter0.Parent = Page1;
     Footer.Page         = Page1;
     Footer.Parent       = Page1;
     FooterText1.Page    = Page1;
     FooterText1.Parent  = Footer;
     Text1.Page          = Page1;
     Text1.Parent        = Footer;
     Data.BeginRender   += new EventHandler(Data__BeginRender);
     Data.EndRender     += new EventHandler(Data__EndRender);
     Data.Rendering     += new EventHandler(Data__Rendering);
     AggregateFunctions  = new object[] {
         FooterText1_Count,
         Text1_Sum
     };
     //
     // Add to ReportTitle.Components
     //
     ReportTitle.Components.Clear();
     ReportTitle.Components.AddRange(new StiComponent[] {
         ReportTitleText
     });
     //
     // Add to Header.Components
     //
     Header.Components.Clear();
     Header.Components.AddRange(new StiComponent[] {
         HeaderText1,
         HeaderText2,
         HeaderText3,
         HeaderText4,
         HeaderText5,
         HeaderText6
     });
     //
     // Add to GroupHeader0.Components
     //
     GroupHeader0.Components.Clear();
     GroupHeader0.Components.AddRange(new StiComponent[] {
         GroupHeaderText0
     });
     //
     // Add to Data.Components
     //
     Data.Components.Clear();
     Data.Components.AddRange(new StiComponent[] {
         DataText1,
         DataText2,
         DataText3,
         DataText4,
         DataText5,
         DataText6
     });
     //
     // Add to Footer.Components
     //
     Footer.Components.Clear();
     Footer.Components.AddRange(new StiComponent[] {
         FooterText1,
         Text1
     });
     //
     // Add to Page1.Components
     //
     Page1.Components.Clear();
     Page1.Components.AddRange(new StiComponent[] {
         ReportTitle,
         Header,
         GroupHeader0,
         Data,
         GroupFooter0,
         Footer
     });
     //
     // Add to Pages
     //
     Pages.Clear();
     Pages.AddRange(new[] {
         Page1
     });
     VW_SalesOrderHeader.Columns.AddRange(new[] {
         new StiDataColumn("SalesOrderID", "SalesOrderID", "SalesOrderID", typeof(int)),
         new StiDataColumn("BranchID", "BranchID", "BranchID", typeof(int)),
         new StiDataColumn("BranchName", "BranchName", "BranchName", typeof(string)),
         new StiDataColumn("OrderDate", "OrderDate", "OrderDate", typeof(DateTime)),
         new StiDataColumn("OverheadNumber", "OverheadNumber", "OverheadNumber", typeof(string)),
         new StiDataColumn("CustomerID", "CustomerID", "CustomerID", typeof(int)),
         new StiDataColumn("CustomerName", "CustomerName", "CustomerName", typeof(string)),
         new StiDataColumn("SubTotal", "SubTotal", "SubTotal", typeof(decimal)),
         new StiDataColumn("TaxAmt", "TaxAmt", "TaxAmt", typeof(decimal)),
         new StiDataColumn("Freight", "Freight", "Freight", typeof(decimal)),
         new StiDataColumn("TotalDue", "TotalDue", "TotalDue", typeof(decimal)),
         new StiDataColumn("CurrencyCode", "CurrencyCode", "CurrencyCode", typeof(string)),
         new StiDataColumn("CurrencyRateID", "CurrencyRateID", "CurrencyRateID", typeof(int)),
         new StiDataColumn("PaymentMethodID", "PaymentMethodID", "PaymentMethodID", typeof(int)),
         new StiDataColumn("PaymentMethodName", "PaymentMethodName", "PaymentMethodName", typeof(string)),
         new StiDataColumn("RevisionNumber", "RevisionNumber", "RevisionNumber", typeof(byte)),
         new StiDataColumn("Status", "Status", "Status", typeof(byte)),
         new StiDataColumn("ModifiedUserID", "ModifiedUserID", "ModifiedUserID", typeof(int)),
         new StiDataColumn("Modifier", "Modifier", "Modifier", typeof(string)),
         new StiDataColumn("ModifiedDate", "ModifiedDate", "ModifiedDate", typeof(DateTime)),
         new StiDataColumn("ApproverUserID", "ApproverUserID", "ApproverUserID", typeof(int)),
         new StiDataColumn("Approver", "Approver", "Approver", typeof(string))
     });
     DataSources.Add(VW_SalesOrderHeader);
 }
Beispiel #25
0
        protected override bool WfExecReport(Stimulsoft.Report.StiReport pReport)
        {
            //DataSet ds;
            vw_invr410       invr410Model;
            StringBuilder    sbSql   = null;
            string           sqlBody = "";
            DataTable        dtIlaTb;
            List <QueryInfo> queryInfoList;
            QueryInfo        queryModel;
            string           strQueryRange, strWhere;
            StringBuilder    sbQuerySingle = null;

            List <SqlParameter> sqlParmList;
            List <Master>       resultList = null;

            try
            {
                invr410Model  = DrMaster.ToItem <vw_invr410>();
                resultList    = new List <Master>();
                queryInfoList = new List <QueryInfo>();
                #region range 處理
                if (!GlobalFn.varIsNull(invr410Model.ila03))
                {
                    queryModel            = new QueryInfo();
                    queryModel.TableName  = "ila_tb";
                    queryModel.ColumnName = "ila03";
                    queryModel.ColumnType = TabMaster.DtSource.Columns["ila03"].DataType.Name;
                    queryModel.Value      = invr410Model.ila03;
                    queryInfoList.Add(queryModel);
                }
                if (!GlobalFn.varIsNull(invr410Model.ila04))
                {
                    queryModel            = new QueryInfo();
                    queryModel.TableName  = "ila_tb";
                    queryModel.ColumnName = "ila04";
                    queryModel.ColumnType = TabMaster.DtSource.Columns["ila04"].DataType.Name;
                    queryModel.Value      = invr410Model.ila04;
                    queryInfoList.Add(queryModel);
                }
                if (!GlobalFn.varIsNull(invr410Model.ila05))
                {
                    queryModel            = new QueryInfo();
                    queryModel.TableName  = "ila_tb";
                    queryModel.ColumnName = "ila05";
                    queryModel.ColumnType = TabMaster.DtSource.Columns["ila05"].DataType.Name;
                    queryModel.Value      = invr410Model.ila05;
                    queryInfoList.Add(queryModel);
                }
                sqlParmList   = new List <SqlParameter>();
                strQueryRange = BoMaster.WfGetQueryString(queryInfoList, out sqlParmList);
                #endregion

                #region single 處理
                sbQuerySingle = new StringBuilder();
                if (!GlobalFn.varIsNull(invr410Model.ila02_s))
                {
                    sbQuerySingle.AppendLine("AND ila02>=@ila02_s");
                    sqlParmList.Add(new SqlParameter("@ila02_s", invr410Model.ila02_s));
                }
                if (!GlobalFn.varIsNull(invr410Model.ila02_e))
                {
                    sbQuerySingle.AppendLine("AND ila02<=@ila02_e");
                    sqlParmList.Add(new SqlParameter("@ila02_e", invr410Model.ila02_e));
                }

                if (invr410Model.conf_yn != "0")
                {
                    if (invr410Model.conf_yn == "1")
                    {
                        sbQuerySingle.AppendLine("AND ilaconf = 'Y'");
                    }
                    if (invr410Model.conf_yn == "2")
                    {
                        sbQuerySingle.AppendLine("AND ilaconf = 'N'");
                    }
                }

                if (invr410Model.close_yn != "0")
                {
                    if (invr410Model.close_yn == "1")//未結案
                    {
                        sbQuerySingle.AppendLine("AND (ilb05-ilb15) >0 ");
                    }
                    if (invr410Model.close_yn == "2")//已結案
                    {
                        sbQuerySingle.AppendLine("AND (ilb05-ilb15) <=0  ");
                    }
                }
                #endregion

                strWhere = strQueryRange + " " + sbQuerySingle.ToString();
                var strSecurity = WfGetSecurityString();        //取得權限字串
                if (!GlobalFn.varIsNull(strSecurity))
                {
                    strWhere += strSecurity;
                }

                //取得單頭
                sqlBody = @"
                              SELECT 
                                ila01,ila02,ila03,sca03 as ila03_c ,
                                ilb02,ila04,bec02 AS ila04_c,ila05,beb03 AS ila05_c,
                                ilb03,ilb04,ilb05,'' as ilb05_str,ilb06,
                                bej03,ilb11,
                                ilb15,'' as ilb15_str,
                                ilb16
                              FROM ila_tb
                                    LEFT JOIN ilb_tb ON ila01=ilb01
                                    LEFT JOIN sca_tb ON ila03=sca01
                                    LEFT JOIN bec_tb ON ila04=bec01
                                    LEFT JOIN beb_tb ON ila05=beb01
                                    LEFT JOIN bej_tb ON ilb06=bej01
                              WHERE ilaconf='Y'
                                AND ilb01 IS NOT NULL
                                ";

                dtIlaTb           = BoMaster.OfGetDataTable(string.Concat(sqlBody, strWhere), sqlParmList.ToArray());
                dtIlaTb.TableName = "Master";
                if (dtIlaTb != null)
                {
                    resultList.AddRange(dtIlaTb.ToList <Master>());
                }

                if (resultList == null || resultList.Count == 0)
                {
                    WfShowErrorMsg("查無資料,請重新過濾條件!");
                    return(false);
                }

                foreach (Master masterModel in resultList)
                {
                    //數量處理
                    masterModel.ilb05_str = string.Format("{0:N" + masterModel.bej03 + "}", masterModel.ilb05); //數量
                    masterModel.ilb15_str = string.Format("{0:N" + masterModel.bej03 + "}", masterModel.ilb15); //數量
                }

                pReport.RegData("master", resultList);
                pReport.CacheAllData = true;
                //處理排序--這裡利用group來達到
                StiGroupHeaderBand stiGroupHeaderBand1 = (StiGroupHeaderBand)pReport.GetComponents()["GroupHeaderBand1"];
                switch (invr410Model.order_by)
                {
                case "1":    //1.依出庫日期
                    stiGroupHeaderBand1.Condition.Value = "{Master.ila02}";
                    break;

                case "2":    //2.依客戶
                    stiGroupHeaderBand1.Condition.Value = "{Master.ila03}";
                    break;

                case "3":    //3.依部門
                    stiGroupHeaderBand1.Condition.Value = "{Master.ila05}";
                    break;

                case "4":    //4.依業務
                    stiGroupHeaderBand1.Condition.Value = "{Master.ila04}";
                    break;

                case "5":    //4.依出庫倉
                    stiGroupHeaderBand1.Condition.Value = "{Master.ila11}";
                    break;
                }
                //處理跳頁

                StiDataBand dataBand1 = (StiDataBand)pReport.GetComponents()["DataBand1"];
                if (invr410Model.jump_yn.ToUpper() == "Y")
                {
                    dataBand1.NewPageAfter    = true;
                    dataBand1.ResetPageNumber = true;
                }
                else
                {
                    dataBand1.NewPageAfter    = false;
                    dataBand1.ResetPageNumber = false;
                }

                pReport.Compile();
                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #26
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DataSet data = new DataSet();

            data.ReadXmlSchema(Server.MapPath(@"Data\Demo.xsd"));
            data.ReadXml(Server.MapPath(@"Data\Demo.xml"));

            StiReport report = new StiReport();

            report.RegData(data);

            //Fill dictionary
            report.Dictionary.Synchronize();

            StiPage page = report.Pages[0];

            //Create HeaderBand
            StiHeaderBand headerBand = new StiHeaderBand();

            headerBand.Height = 0.5;
            headerBand.Name   = "HeaderBand";
            page.Components.Add(headerBand);

            //Create text on header
            StiText headerText = new StiText(new RectangleD(0, 0, 5, 0.5));

            headerText.Text         = "CompanyName";
            headerText.HorAlignment = StiTextHorAlignment.Center;
            headerText.Name         = "HeaderText";
            headerText.Brush        = new StiSolidBrush(System.Drawing.Color.LightGreen);
            headerBand.Components.Add(headerText);

            //Create Databand
            StiDataBand dataBand = new StiDataBand();

            dataBand.DataSourceName = "Customers";
            dataBand.Height         = 0.5;
            dataBand.Name           = "DataBand";
            page.Components.Add(dataBand);

            //Create text
            StiText dataText = new StiText(new RectangleD(0, 0, 5, 0.5));

            dataText.Text = "{Line}.{Customers.CompanyName}";
            dataText.Name = "DataText";
            dataBand.Components.Add(dataText);

            //Create FooterBand
            StiFooterBand footerBand = new StiFooterBand();

            footerBand.Height = 0.5;
            footerBand.Name   = "FooterBand";
            page.Components.Add(footerBand);

            //Create text on footer
            StiText footerText = new StiText(new RectangleD(0, 0, 5, 0.5));

            footerText.Text         = "Count - {Count()}";
            footerText.HorAlignment = StiTextHorAlignment.Right;
            footerText.Name         = "FooterText";
            footerText.Brush        = new StiSolidBrush(System.Drawing.Color.LightGreen);
            footerBand.Components.Add(footerText);

            StiWebViewer1.Report = report;
        }
Beispiel #27
0
        private void SortBands(StiPage input)
        {
            int counterPageHeader  = 1000;
            int counterPageFooter  = 2000;
            int counterHeader      = 3000;
            int counterGroupHeader = 4000;
            int counterData        = 5000;
            int counterDetail      = 6000;
            int counterGroupFooter = 7000;
            int counterFooter      = 8000;
            int counterOther       = 10000;

            StiDataBand masterDataBand = null;

            Dictionary <int, StiComponent> dict = new Dictionary <int, StiComponent>();
            List <int> keys = new List <int>();

            foreach (StiComponent comp in input.Components)
            {
                int counter = 0;
                if (comp is StiPageHeaderBand)
                {
                    counter = counterPageHeader++;
                }
                if (comp is StiPageFooterBand)
                {
                    counter = counterPageFooter++;
                }
                if (comp is StiGroupHeaderBand)
                {
                    counter = counterGroupHeader++;
                }
                else if (comp is StiGroupFooterBand)
                {
                    counter = counterGroupFooter++;
                }
                else if (comp is StiHeaderBand)
                {
                    counter = counterHeader++;
                }
                else if (comp is StiFooterBand)
                {
                    counter = counterFooter++;
                }
                else if (comp is StiDataBand)
                {
                    counter        = counterData++;
                    masterDataBand = comp as StiDataBand;
                }
                else if (comp is StiPage)
                {
                    counter = counterDetail++;
                }
                else if (comp is StiChildBand)
                {
                    counter = counterData++;
                }
                else
                {
                    counter = counterOther++;
                }

                dict.Add(counter, comp);
                keys.Add(counter);
            }

            keys.Sort();

            StiComponentsCollection comps = new StiComponentsCollection(input);

            foreach (int key in keys)
            {
                StiComponent comp = dict[key];
                if (comp is StiPage)
                {
                    StiPage cont = comp as StiPage;
                    foreach (StiComponent comp2 in cont.Components)
                    {
                        StiDataBand band = comp2 as StiDataBand;
                        if ((band != null) && (band.MasterComponent == null))
                        {
                            band.MasterComponent = masterDataBand;
                        }
                        comps.Add(comp2);
                    }
                }
                else
                {
                    comps.Add(comp);
                }
            }
            input.Components = comps;
        }
Beispiel #28
0
 internal static void AddStitexts(StiText headerText, StiText dataText, ref StiReportTitleBand titleBand, ref StiDataBand dataBand, ref double x, double width)
 {
     titleBand.Components.Add(headerText);
     dataBand.Components.Add(dataText);
     x = (double) (x + width);
 }
Beispiel #29
0
 private void InitializeComponent()
 {
     SP_GetRequestHeader       = new SP_GetRequestHeaderDataSource();
     SP_GetRequestDetail       = new SP_GetRequestDetailDataSource();
     ParentSP_GetRequestHeader = new StiDataRelation("SP_GetRequestHeader_SP_GetRequestDetail", "SP_GetRequestHeader", "SP_GetRequestHeader", SP_GetRequestHeader, SP_GetRequestDetail, new[] {
         "RequestID"
     }, new[] {
         "RequestID"
     });
     NeedsCompiling       = false;
     EngineVersion        = StiEngineVersion.EngineV2;
     ReferencedAssemblies = new[] {
         "System.Dll",
         "System.Drawing.Dll",
         "System.Windows.Forms.Dll",
         "System.Data.Dll",
         "System.Xml.Dll",
         "Stimulsoft.Controls.Dll",
         "Stimulsoft.Base.Dll",
         "Stimulsoft.Report.Dll"
     };
     ReportAlias  = "RptRequestDetail";
     ReportAuthor = "Programmer.GE";
     //
     // ReportChanged
     //
     ReportChanged = new DateTime(2010, 4, 30, 19, 58, 27, 845);
     //
     // ReportCreated
     //
     ReportCreated     = new DateTime(2010, 3, 4, 16, 2, 4, 0);
     ReportDescription = "პროდუქციის შეკვეთა";
     ReportFile        = "D:\\User\\Documents\\Projects\\Apothex\\Source\\Class Library\\Apothex.Reporting\\Product" +
                         "ion\\RptRequestDetail.mrt";
     ReportGuid     = "39889ce012f240ecbc7962a86ff663a7";
     ReportName     = "RptRequestDetail";
     ReportUnit     = StiReportUnitType.Centimeters;
     ScriptLanguage = StiReportLanguageType.CSharp;
     //
     // Page1
     //
     Page1            = new StiPage();
     Page1.Guid       = "5d26ae79894e4dcebbc2212ba7686670";
     Page1.Name       = "Page1";
     Page1.PageHeight = 29.7;
     Page1.PageWidth  = 21;
     Page1.PaperSize  = PaperKind.A4;
     Page1.Border     = new StiBorder(StiBorderSides.None, Color.Black, 2, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Page1.Brush      = new StiSolidBrush(Color.Transparent);
     //
     // DataSP_GetRequestHeader
     //
     DataSP_GetRequestHeader = new StiDataBand();
     DataSP_GetRequestHeader.ClientRectangle    = new RectangleD(0, 0.4, 19, 0.6);
     DataSP_GetRequestHeader.DataSourceName     = "SP_GetRequestHeader";
     DataSP_GetRequestHeader.Name               = "DataSP_GetRequestHeader";
     DataSP_GetRequestHeader.Sort               = new String[0];
     DataSP_GetRequestHeader.Border             = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     DataSP_GetRequestHeader.Brush              = new StiSolidBrush(Color.Transparent);
     DataSP_GetRequestHeader.BusinessObjectGuid = null;
     //
     // Text2
     //
     Text2 = new StiText();
     Text2.ClientRectangle                   = new RectangleD(0, 0, 19, 0.6);
     Text2.HorAlignment                      = StiTextHorAlignment.Center;
     Text2.Name                              = "Text2";
     Text2.GetValue                         += new StiGetValueEventHandler(Text2__GetValue);
     Text2.VertAlignment                     = StiVertAlignment.Center;
     Text2.Border                            = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     Text2.Brush                             = new StiSolidBrush(Color.Transparent);
     Text2.Font                              = new Font("BPG Glaho Arial", 10F);
     Text2.Guid                              = null;
     Text2.Interaction                       = null;
     Text2.Margins                           = new StiMargins(0, 0, 0, 0);
     Text2.TextBrush                         = new StiSolidBrush(Color.Black);
     Text2.TextOptions                       = new StiTextOptions(false, false, false, 0F, HotkeyPrefix.None, StringTrimming.None);
     DataSP_GetRequestHeader.Guid            = null;
     DataSP_GetRequestHeader.Interaction     = null;
     DataSP_GetRequestHeader.MasterComponent = null;
     //
     // HeaderSP_GetRequestDetail
     //
     HeaderSP_GetRequestDetail = new StiHeaderBand();
     HeaderSP_GetRequestDetail.ClientRectangle = new RectangleD(0, 1.8, 19, 0.6);
     HeaderSP_GetRequestDetail.Name            = "HeaderSP_GetRequestDetail";
     HeaderSP_GetRequestDetail.Border          = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     HeaderSP_GetRequestDetail.Brush           = new StiSolidBrush(Color.Transparent);
     //
     // HeaderSP_GetRequestDetail_OrdinalNumber
     //
     HeaderSP_GetRequestDetail_OrdinalNumber = new StiText();
     HeaderSP_GetRequestDetail_OrdinalNumber.ClientRectangle = new RectangleD(0, 0, 0.8, 0.6);
     HeaderSP_GetRequestDetail_OrdinalNumber.HorAlignment    = StiTextHorAlignment.Center;
     HeaderSP_GetRequestDetail_OrdinalNumber.Name            = "HeaderSP_GetRequestDetail_OrdinalNumber";
     HeaderSP_GetRequestDetail_OrdinalNumber.GetValue       += new StiGetValueEventHandler(HeaderSP_GetRequestDetail_OrdinalNumber__GetValue);
     HeaderSP_GetRequestDetail_OrdinalNumber.VertAlignment   = StiVertAlignment.Center;
     HeaderSP_GetRequestDetail_OrdinalNumber.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     HeaderSP_GetRequestDetail_OrdinalNumber.Brush           = new StiSolidBrush(Color.Transparent);
     HeaderSP_GetRequestDetail_OrdinalNumber.Font            = new Font("BPG Glaho Arial", 10F, FontStyle.Bold);
     HeaderSP_GetRequestDetail_OrdinalNumber.Guid            = null;
     HeaderSP_GetRequestDetail_OrdinalNumber.Interaction     = null;
     HeaderSP_GetRequestDetail_OrdinalNumber.Margins         = new StiMargins(0, 0, 0, 0);
     HeaderSP_GetRequestDetail_OrdinalNumber.TextBrush       = new StiSolidBrush(Color.Black);
     HeaderSP_GetRequestDetail_OrdinalNumber.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // HeaderSP_GetRequestDetail_MedicamentName
     //
     HeaderSP_GetRequestDetail_MedicamentName = new StiText();
     HeaderSP_GetRequestDetail_MedicamentName.ClientRectangle = new RectangleD(0.8, 0, 6, 0.6);
     HeaderSP_GetRequestDetail_MedicamentName.HorAlignment    = StiTextHorAlignment.Center;
     HeaderSP_GetRequestDetail_MedicamentName.Name            = "HeaderSP_GetRequestDetail_MedicamentName";
     HeaderSP_GetRequestDetail_MedicamentName.GetValue       += new StiGetValueEventHandler(HeaderSP_GetRequestDetail_MedicamentName__GetValue);
     HeaderSP_GetRequestDetail_MedicamentName.VertAlignment   = StiVertAlignment.Center;
     HeaderSP_GetRequestDetail_MedicamentName.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     HeaderSP_GetRequestDetail_MedicamentName.Brush           = new StiSolidBrush(Color.Transparent);
     HeaderSP_GetRequestDetail_MedicamentName.Font            = new Font("BPG Glaho Arial", 10F, FontStyle.Bold);
     HeaderSP_GetRequestDetail_MedicamentName.Guid            = null;
     HeaderSP_GetRequestDetail_MedicamentName.Interaction     = null;
     HeaderSP_GetRequestDetail_MedicamentName.Margins         = new StiMargins(0, 0, 0, 0);
     HeaderSP_GetRequestDetail_MedicamentName.TextBrush       = new StiSolidBrush(Color.Black);
     HeaderSP_GetRequestDetail_MedicamentName.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // HeaderSP_GetRequestDetail_RequestQty
     //
     HeaderSP_GetRequestDetail_RequestQty = new StiText();
     HeaderSP_GetRequestDetail_RequestQty.ClientRectangle = new RectangleD(6.8, 0, 1.4, 0.6);
     HeaderSP_GetRequestDetail_RequestQty.HorAlignment    = StiTextHorAlignment.Center;
     HeaderSP_GetRequestDetail_RequestQty.Name            = "HeaderSP_GetRequestDetail_RequestQty";
     HeaderSP_GetRequestDetail_RequestQty.GetValue       += new StiGetValueEventHandler(HeaderSP_GetRequestDetail_RequestQty__GetValue);
     HeaderSP_GetRequestDetail_RequestQty.VertAlignment   = StiVertAlignment.Center;
     HeaderSP_GetRequestDetail_RequestQty.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     HeaderSP_GetRequestDetail_RequestQty.Brush           = new StiSolidBrush(Color.Transparent);
     HeaderSP_GetRequestDetail_RequestQty.Font            = new Font("BPG Glaho Arial", 10F, FontStyle.Bold);
     HeaderSP_GetRequestDetail_RequestQty.Guid            = null;
     HeaderSP_GetRequestDetail_RequestQty.Interaction     = null;
     HeaderSP_GetRequestDetail_RequestQty.Margins         = new StiMargins(0, 0, 0, 0);
     HeaderSP_GetRequestDetail_RequestQty.TextBrush       = new StiSolidBrush(Color.Black);
     HeaderSP_GetRequestDetail_RequestQty.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // HeaderSP_GetRequestDetail_CountryName1
     //
     HeaderSP_GetRequestDetail_CountryName1 = new StiText();
     HeaderSP_GetRequestDetail_CountryName1.ClientRectangle = new RectangleD(8.2, 0, 2.8, 0.6);
     HeaderSP_GetRequestDetail_CountryName1.HorAlignment    = StiTextHorAlignment.Center;
     HeaderSP_GetRequestDetail_CountryName1.Name            = "HeaderSP_GetRequestDetail_CountryName1";
     HeaderSP_GetRequestDetail_CountryName1.GetValue       += new StiGetValueEventHandler(HeaderSP_GetRequestDetail_CountryName1__GetValue);
     HeaderSP_GetRequestDetail_CountryName1.VertAlignment   = StiVertAlignment.Center;
     HeaderSP_GetRequestDetail_CountryName1.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     HeaderSP_GetRequestDetail_CountryName1.Brush           = new StiSolidBrush(Color.Transparent);
     HeaderSP_GetRequestDetail_CountryName1.Font            = new Font("BPG Glaho Arial", 10F, FontStyle.Bold);
     HeaderSP_GetRequestDetail_CountryName1.Guid            = null;
     HeaderSP_GetRequestDetail_CountryName1.Interaction     = null;
     HeaderSP_GetRequestDetail_CountryName1.Margins         = new StiMargins(0, 0, 0, 0);
     HeaderSP_GetRequestDetail_CountryName1.TextBrush       = new StiSolidBrush(Color.Black);
     HeaderSP_GetRequestDetail_CountryName1.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // HeaderSP_GetRequestDetail_CountryName2
     //
     HeaderSP_GetRequestDetail_CountryName2 = new StiText();
     HeaderSP_GetRequestDetail_CountryName2.ClientRectangle = new RectangleD(11, 0, 2.8, 0.6);
     HeaderSP_GetRequestDetail_CountryName2.HorAlignment    = StiTextHorAlignment.Center;
     HeaderSP_GetRequestDetail_CountryName2.Name            = "HeaderSP_GetRequestDetail_CountryName2";
     HeaderSP_GetRequestDetail_CountryName2.GetValue       += new StiGetValueEventHandler(HeaderSP_GetRequestDetail_CountryName2__GetValue);
     HeaderSP_GetRequestDetail_CountryName2.VertAlignment   = StiVertAlignment.Center;
     HeaderSP_GetRequestDetail_CountryName2.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     HeaderSP_GetRequestDetail_CountryName2.Brush           = new StiSolidBrush(Color.Transparent);
     HeaderSP_GetRequestDetail_CountryName2.Font            = new Font("BPG Glaho Arial", 10F, FontStyle.Bold);
     HeaderSP_GetRequestDetail_CountryName2.Guid            = null;
     HeaderSP_GetRequestDetail_CountryName2.Interaction     = null;
     HeaderSP_GetRequestDetail_CountryName2.Margins         = new StiMargins(0, 0, 0, 0);
     HeaderSP_GetRequestDetail_CountryName2.TextBrush       = new StiSolidBrush(Color.Black);
     HeaderSP_GetRequestDetail_CountryName2.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // HeaderSP_GetRequestDetail_BrandName1
     //
     HeaderSP_GetRequestDetail_BrandName1 = new StiText();
     HeaderSP_GetRequestDetail_BrandName1.ClientRectangle = new RectangleD(13.8, 0, 2.6, 0.6);
     HeaderSP_GetRequestDetail_BrandName1.HorAlignment    = StiTextHorAlignment.Center;
     HeaderSP_GetRequestDetail_BrandName1.Name            = "HeaderSP_GetRequestDetail_BrandName1";
     HeaderSP_GetRequestDetail_BrandName1.GetValue       += new StiGetValueEventHandler(HeaderSP_GetRequestDetail_BrandName1__GetValue);
     HeaderSP_GetRequestDetail_BrandName1.VertAlignment   = StiVertAlignment.Center;
     HeaderSP_GetRequestDetail_BrandName1.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     HeaderSP_GetRequestDetail_BrandName1.Brush           = new StiSolidBrush(Color.Transparent);
     HeaderSP_GetRequestDetail_BrandName1.Font            = new Font("BPG Glaho Arial", 10F, FontStyle.Bold);
     HeaderSP_GetRequestDetail_BrandName1.Guid            = null;
     HeaderSP_GetRequestDetail_BrandName1.Interaction     = null;
     HeaderSP_GetRequestDetail_BrandName1.Margins         = new StiMargins(0, 0, 0, 0);
     HeaderSP_GetRequestDetail_BrandName1.TextBrush       = new StiSolidBrush(Color.Black);
     HeaderSP_GetRequestDetail_BrandName1.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // HeaderSP_GetRequestDetail_BrandName2
     //
     HeaderSP_GetRequestDetail_BrandName2 = new StiText();
     HeaderSP_GetRequestDetail_BrandName2.ClientRectangle = new RectangleD(16.4, 0, 2.6, 0.6);
     HeaderSP_GetRequestDetail_BrandName2.HorAlignment    = StiTextHorAlignment.Center;
     HeaderSP_GetRequestDetail_BrandName2.Name            = "HeaderSP_GetRequestDetail_BrandName2";
     HeaderSP_GetRequestDetail_BrandName2.GetValue       += new StiGetValueEventHandler(HeaderSP_GetRequestDetail_BrandName2__GetValue);
     HeaderSP_GetRequestDetail_BrandName2.VertAlignment   = StiVertAlignment.Center;
     HeaderSP_GetRequestDetail_BrandName2.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     HeaderSP_GetRequestDetail_BrandName2.Brush           = new StiSolidBrush(Color.Transparent);
     HeaderSP_GetRequestDetail_BrandName2.Font            = new Font("BPG Glaho Arial", 10F, FontStyle.Bold);
     HeaderSP_GetRequestDetail_BrandName2.Guid            = null;
     HeaderSP_GetRequestDetail_BrandName2.Interaction     = null;
     HeaderSP_GetRequestDetail_BrandName2.Margins         = new StiMargins(0, 0, 0, 0);
     HeaderSP_GetRequestDetail_BrandName2.TextBrush       = new StiSolidBrush(Color.Black);
     HeaderSP_GetRequestDetail_BrandName2.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     HeaderSP_GetRequestDetail.Guid        = null;
     HeaderSP_GetRequestDetail.Interaction = null;
     //
     // DataSP_GetRequestDetail
     //
     DataSP_GetRequestDetail = new StiDataBand();
     DataSP_GetRequestDetail.ClientRectangle  = new RectangleD(0, 3.2, 19, 0.6);
     DataSP_GetRequestDetail.DataRelationName = "SP_GetRequestHeader_SP_GetRequestDetail";
     DataSP_GetRequestDetail.DataSourceName   = "SP_GetRequestDetail";
     DataSP_GetRequestDetail.Name             = "DataSP_GetRequestDetail";
     DataSP_GetRequestDetail.Sort             = new[] {
         "ASC",
         "OrdinalNumber"
     };
     DataSP_GetRequestDetail.Border             = new StiBorder(StiBorderSides.None, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     DataSP_GetRequestDetail.Brush              = new StiSolidBrush(Color.Transparent);
     DataSP_GetRequestDetail.BusinessObjectGuid = null;
     //
     // DataSP_GetRequestDetail_MedicamentName
     //
     DataSP_GetRequestDetail_MedicamentName                 = new StiText();
     DataSP_GetRequestDetail_MedicamentName.CanGrow         = true;
     DataSP_GetRequestDetail_MedicamentName.ClientRectangle = new RectangleD(0.8, 0, 6, 0.6);
     DataSP_GetRequestDetail_MedicamentName.GrowToHeight    = true;
     DataSP_GetRequestDetail_MedicamentName.Name            = "DataSP_GetRequestDetail_MedicamentName";
     DataSP_GetRequestDetail_MedicamentName.GetValue       += new StiGetValueEventHandler(DataSP_GetRequestDetail_MedicamentName__GetValue);
     DataSP_GetRequestDetail_MedicamentName.VertAlignment   = StiVertAlignment.Center;
     DataSP_GetRequestDetail_MedicamentName.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     DataSP_GetRequestDetail_MedicamentName.Brush           = new StiSolidBrush(Color.Transparent);
     DataSP_GetRequestDetail_MedicamentName.Font            = new Font("BPG Glaho Arial", 8F);
     DataSP_GetRequestDetail_MedicamentName.Guid            = null;
     DataSP_GetRequestDetail_MedicamentName.Interaction     = null;
     DataSP_GetRequestDetail_MedicamentName.Margins         = new StiMargins(0, 0, 0, 0);
     DataSP_GetRequestDetail_MedicamentName.TextBrush       = new StiSolidBrush(Color.Black);
     DataSP_GetRequestDetail_MedicamentName.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // DataSP_GetRequestDetail_OrdinalNumber
     //
     DataSP_GetRequestDetail_OrdinalNumber                 = new StiText();
     DataSP_GetRequestDetail_OrdinalNumber.CanGrow         = true;
     DataSP_GetRequestDetail_OrdinalNumber.ClientRectangle = new RectangleD(0, 0, 0.8, 0.6);
     DataSP_GetRequestDetail_OrdinalNumber.GrowToHeight    = true;
     DataSP_GetRequestDetail_OrdinalNumber.Name            = "DataSP_GetRequestDetail_OrdinalNumber";
     DataSP_GetRequestDetail_OrdinalNumber.GetValue       += new StiGetValueEventHandler(DataSP_GetRequestDetail_OrdinalNumber__GetValue);
     DataSP_GetRequestDetail_OrdinalNumber.VertAlignment   = StiVertAlignment.Center;
     DataSP_GetRequestDetail_OrdinalNumber.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     DataSP_GetRequestDetail_OrdinalNumber.Brush           = new StiSolidBrush(Color.Transparent);
     DataSP_GetRequestDetail_OrdinalNumber.Font            = new Font("BPG Glaho Arial", 8F);
     DataSP_GetRequestDetail_OrdinalNumber.Guid            = null;
     DataSP_GetRequestDetail_OrdinalNumber.Interaction     = null;
     DataSP_GetRequestDetail_OrdinalNumber.Margins         = new StiMargins(0, 0, 0, 0);
     DataSP_GetRequestDetail_OrdinalNumber.TextBrush       = new StiSolidBrush(Color.Black);
     DataSP_GetRequestDetail_OrdinalNumber.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // DataSP_GetRequestDetail_RequestQty
     //
     DataSP_GetRequestDetail_RequestQty                 = new StiText();
     DataSP_GetRequestDetail_RequestQty.CanGrow         = true;
     DataSP_GetRequestDetail_RequestQty.ClientRectangle = new RectangleD(6.8, 0, 1.4, 0.6);
     DataSP_GetRequestDetail_RequestQty.GrowToHeight    = true;
     DataSP_GetRequestDetail_RequestQty.HorAlignment    = StiTextHorAlignment.Right;
     DataSP_GetRequestDetail_RequestQty.Name            = "DataSP_GetRequestDetail_RequestQty";
     DataSP_GetRequestDetail_RequestQty.GetValue       += new StiGetValueEventHandler(DataSP_GetRequestDetail_RequestQty__GetValue);
     DataSP_GetRequestDetail_RequestQty.VertAlignment   = StiVertAlignment.Center;
     DataSP_GetRequestDetail_RequestQty.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     DataSP_GetRequestDetail_RequestQty.Brush           = new StiSolidBrush(Color.Transparent);
     DataSP_GetRequestDetail_RequestQty.Font            = new Font("BPG Glaho Arial", 8F);
     DataSP_GetRequestDetail_RequestQty.Guid            = null;
     DataSP_GetRequestDetail_RequestQty.Interaction     = null;
     DataSP_GetRequestDetail_RequestQty.Margins         = new StiMargins(0, 0, 0, 0);
     DataSP_GetRequestDetail_RequestQty.TextBrush       = new StiSolidBrush(Color.Black);
     DataSP_GetRequestDetail_RequestQty.TextFormat      = new StiNumberFormatService(1, ",", 4, " ", 3, true, false, " ");
     DataSP_GetRequestDetail_RequestQty.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // DataSP_GetRequestDetail_CountryName1
     //
     DataSP_GetRequestDetail_CountryName1                 = new StiText();
     DataSP_GetRequestDetail_CountryName1.CanGrow         = true;
     DataSP_GetRequestDetail_CountryName1.ClientRectangle = new RectangleD(8.2, 0, 2.8, 0.6);
     DataSP_GetRequestDetail_CountryName1.GrowToHeight    = true;
     DataSP_GetRequestDetail_CountryName1.Name            = "DataSP_GetRequestDetail_CountryName1";
     DataSP_GetRequestDetail_CountryName1.GetValue       += new StiGetValueEventHandler(DataSP_GetRequestDetail_CountryName1__GetValue);
     DataSP_GetRequestDetail_CountryName1.VertAlignment   = StiVertAlignment.Center;
     DataSP_GetRequestDetail_CountryName1.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     DataSP_GetRequestDetail_CountryName1.Brush           = new StiSolidBrush(Color.Transparent);
     DataSP_GetRequestDetail_CountryName1.Font            = new Font("BPG Glaho Arial", 8F);
     DataSP_GetRequestDetail_CountryName1.Guid            = null;
     DataSP_GetRequestDetail_CountryName1.Interaction     = null;
     DataSP_GetRequestDetail_CountryName1.Margins         = new StiMargins(0, 0, 0, 0);
     DataSP_GetRequestDetail_CountryName1.TextBrush       = new StiSolidBrush(Color.Black);
     DataSP_GetRequestDetail_CountryName1.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // DataSP_GetRequestDetail_CountryName2
     //
     DataSP_GetRequestDetail_CountryName2                 = new StiText();
     DataSP_GetRequestDetail_CountryName2.CanGrow         = true;
     DataSP_GetRequestDetail_CountryName2.ClientRectangle = new RectangleD(11, 0, 2.8, 0.6);
     DataSP_GetRequestDetail_CountryName2.GrowToHeight    = true;
     DataSP_GetRequestDetail_CountryName2.Name            = "DataSP_GetRequestDetail_CountryName2";
     DataSP_GetRequestDetail_CountryName2.GetValue       += new StiGetValueEventHandler(DataSP_GetRequestDetail_CountryName2__GetValue);
     DataSP_GetRequestDetail_CountryName2.VertAlignment   = StiVertAlignment.Center;
     DataSP_GetRequestDetail_CountryName2.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     DataSP_GetRequestDetail_CountryName2.Brush           = new StiSolidBrush(Color.Transparent);
     DataSP_GetRequestDetail_CountryName2.Font            = new Font("BPG Glaho Arial", 8F);
     DataSP_GetRequestDetail_CountryName2.Guid            = null;
     DataSP_GetRequestDetail_CountryName2.Interaction     = null;
     DataSP_GetRequestDetail_CountryName2.Margins         = new StiMargins(0, 0, 0, 0);
     DataSP_GetRequestDetail_CountryName2.TextBrush       = new StiSolidBrush(Color.Black);
     DataSP_GetRequestDetail_CountryName2.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // DataSP_GetRequestDetail_BrandName1
     //
     DataSP_GetRequestDetail_BrandName1                 = new StiText();
     DataSP_GetRequestDetail_BrandName1.CanGrow         = true;
     DataSP_GetRequestDetail_BrandName1.ClientRectangle = new RectangleD(13.8, 0, 2.6, 0.6);
     DataSP_GetRequestDetail_BrandName1.Name            = "DataSP_GetRequestDetail_BrandName1";
     DataSP_GetRequestDetail_BrandName1.GetValue       += new StiGetValueEventHandler(DataSP_GetRequestDetail_BrandName1__GetValue);
     DataSP_GetRequestDetail_BrandName1.VertAlignment   = StiVertAlignment.Center;
     DataSP_GetRequestDetail_BrandName1.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     DataSP_GetRequestDetail_BrandName1.Brush           = new StiSolidBrush(Color.Transparent);
     DataSP_GetRequestDetail_BrandName1.Font            = new Font("BPG Glaho Arial", 8F);
     DataSP_GetRequestDetail_BrandName1.Guid            = null;
     DataSP_GetRequestDetail_BrandName1.Interaction     = null;
     DataSP_GetRequestDetail_BrandName1.Margins         = new StiMargins(0, 0, 0, 0);
     DataSP_GetRequestDetail_BrandName1.TextBrush       = new StiSolidBrush(Color.Black);
     DataSP_GetRequestDetail_BrandName1.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     //
     // DataSP_GetRequestDetail_BrandName2
     //
     DataSP_GetRequestDetail_BrandName2                 = new StiText();
     DataSP_GetRequestDetail_BrandName2.CanGrow         = true;
     DataSP_GetRequestDetail_BrandName2.ClientRectangle = new RectangleD(16.4, 0, 2.6, 0.6);
     DataSP_GetRequestDetail_BrandName2.GrowToHeight    = true;
     DataSP_GetRequestDetail_BrandName2.Name            = "DataSP_GetRequestDetail_BrandName2";
     DataSP_GetRequestDetail_BrandName2.VertAlignment   = StiVertAlignment.Center;
     DataSP_GetRequestDetail_BrandName2.Border          = new StiBorder(StiBorderSides.All, Color.Black, 1, StiPenStyle.Solid, false, 4, new StiSolidBrush(Color.Black));
     DataSP_GetRequestDetail_BrandName2.Brush           = new StiSolidBrush(Color.Transparent);
     DataSP_GetRequestDetail_BrandName2.Font            = new Font("BPG Glaho Arial", 8F);
     DataSP_GetRequestDetail_BrandName2.Guid            = null;
     DataSP_GetRequestDetail_BrandName2.Interaction     = null;
     DataSP_GetRequestDetail_BrandName2.Margins         = new StiMargins(0, 0, 0, 0);
     DataSP_GetRequestDetail_BrandName2.TextBrush       = new StiSolidBrush(Color.Black);
     DataSP_GetRequestDetail_BrandName2.TextOptions     = new StiTextOptions(false, false, true, 0F, HotkeyPrefix.None, StringTrimming.None);
     DataSP_GetRequestDetail.Guid        = null;
     DataSP_GetRequestDetail.Interaction = null;
     Page1.ExcelSheetValue            = null;
     Page1.Interaction                = null;
     Page1.Margins                    = new StiMargins(1, 1, 1, 1);
     Page1_Watermark                  = new StiWatermark();
     Page1_Watermark.Font             = new Font("Arial", 100F);
     Page1_Watermark.Image            = null;
     Page1_Watermark.TextBrush        = new StiSolidBrush(Color.FromArgb(50, 0, 0, 0));
     RptRequestDetail_PrinterSettings = new StiPrinterSettings();
     PrinterSettings                  = RptRequestDetail_PrinterSettings;
     Page1.Report    = this;
     Page1.Watermark = Page1_Watermark;
     DataSP_GetRequestHeader.Page   = Page1;
     DataSP_GetRequestHeader.Parent = Page1;
     Text2.Page   = Page1;
     Text2.Parent = DataSP_GetRequestHeader;
     HeaderSP_GetRequestDetail.Page                  = Page1;
     HeaderSP_GetRequestDetail.Parent                = Page1;
     HeaderSP_GetRequestDetail_OrdinalNumber.Page    = Page1;
     HeaderSP_GetRequestDetail_OrdinalNumber.Parent  = HeaderSP_GetRequestDetail;
     HeaderSP_GetRequestDetail_MedicamentName.Page   = Page1;
     HeaderSP_GetRequestDetail_MedicamentName.Parent = HeaderSP_GetRequestDetail;
     HeaderSP_GetRequestDetail_RequestQty.Page       = Page1;
     HeaderSP_GetRequestDetail_RequestQty.Parent     = HeaderSP_GetRequestDetail;
     HeaderSP_GetRequestDetail_CountryName1.Page     = Page1;
     HeaderSP_GetRequestDetail_CountryName1.Parent   = HeaderSP_GetRequestDetail;
     HeaderSP_GetRequestDetail_CountryName2.Page     = Page1;
     HeaderSP_GetRequestDetail_CountryName2.Parent   = HeaderSP_GetRequestDetail;
     HeaderSP_GetRequestDetail_BrandName1.Page       = Page1;
     HeaderSP_GetRequestDetail_BrandName1.Parent     = HeaderSP_GetRequestDetail;
     HeaderSP_GetRequestDetail_BrandName2.Page       = Page1;
     HeaderSP_GetRequestDetail_BrandName2.Parent     = HeaderSP_GetRequestDetail;
     DataSP_GetRequestDetail.MasterComponent         = DataSP_GetRequestHeader;
     DataSP_GetRequestDetail.Page   = Page1;
     DataSP_GetRequestDetail.Parent = Page1;
     DataSP_GetRequestDetail_MedicamentName.Page   = Page1;
     DataSP_GetRequestDetail_MedicamentName.Parent = DataSP_GetRequestDetail;
     DataSP_GetRequestDetail_OrdinalNumber.Page    = Page1;
     DataSP_GetRequestDetail_OrdinalNumber.Parent  = DataSP_GetRequestDetail;
     DataSP_GetRequestDetail_RequestQty.Page       = Page1;
     DataSP_GetRequestDetail_RequestQty.Parent     = DataSP_GetRequestDetail;
     DataSP_GetRequestDetail_CountryName1.Page     = Page1;
     DataSP_GetRequestDetail_CountryName1.Parent   = DataSP_GetRequestDetail;
     DataSP_GetRequestDetail_CountryName2.Page     = Page1;
     DataSP_GetRequestDetail_CountryName2.Parent   = DataSP_GetRequestDetail;
     DataSP_GetRequestDetail_BrandName1.Page       = Page1;
     DataSP_GetRequestDetail_BrandName1.Parent     = DataSP_GetRequestDetail;
     DataSP_GetRequestDetail_BrandName2.Page       = Page1;
     DataSP_GetRequestDetail_BrandName2.Parent     = DataSP_GetRequestDetail;
     //
     // Add to DataSP_GetRequestHeader.Components
     //
     DataSP_GetRequestHeader.Components.Clear();
     DataSP_GetRequestHeader.Components.AddRange(new StiComponent[] {
         Text2
     });
     //
     // Add to HeaderSP_GetRequestDetail.Components
     //
     HeaderSP_GetRequestDetail.Components.Clear();
     HeaderSP_GetRequestDetail.Components.AddRange(new StiComponent[] {
         HeaderSP_GetRequestDetail_OrdinalNumber,
         HeaderSP_GetRequestDetail_MedicamentName,
         HeaderSP_GetRequestDetail_RequestQty,
         HeaderSP_GetRequestDetail_CountryName1,
         HeaderSP_GetRequestDetail_CountryName2,
         HeaderSP_GetRequestDetail_BrandName1,
         HeaderSP_GetRequestDetail_BrandName2
     });
     //
     // Add to DataSP_GetRequestDetail.Components
     //
     DataSP_GetRequestDetail.Components.Clear();
     DataSP_GetRequestDetail.Components.AddRange(new StiComponent[] {
         DataSP_GetRequestDetail_MedicamentName,
         DataSP_GetRequestDetail_OrdinalNumber,
         DataSP_GetRequestDetail_RequestQty,
         DataSP_GetRequestDetail_CountryName1,
         DataSP_GetRequestDetail_CountryName2,
         DataSP_GetRequestDetail_BrandName1,
         DataSP_GetRequestDetail_BrandName2
     });
     //
     // Add to Page1.Components
     //
     Page1.Components.Clear();
     Page1.Components.AddRange(new StiComponent[] {
         DataSP_GetRequestHeader,
         HeaderSP_GetRequestDetail,
         DataSP_GetRequestDetail
     });
     //
     // Add to Pages
     //
     Pages.Clear();
     Pages.AddRange(new[] {
         Page1
     });
     Dictionary.Relations.Add(ParentSP_GetRequestHeader);
     SP_GetRequestDetail.Columns.AddRange(new[] {
         new StiDataColumn("RequestID", "RequestID", "RequestID", typeof(int)),
         new StiDataColumn("RequestDetailID", "RequestDetailID", "RequestDetailID", typeof(int)),
         new StiDataColumn("MedicamentID", "MedicamentID", "MedicamentID", typeof(int)),
         new StiDataColumn("MedicamentName", "MedicamentName", "MedicamentName", typeof(string)),
         new StiDataColumn("RequestQty", "RequestQty", "RequestQty", typeof(decimal)),
         new StiDataColumn("CountryCode1", "CountryCode1", "CountryCode1", typeof(string)),
         new StiDataColumn("CountryName1", "CountryName1", "CountryName1", typeof(string)),
         new StiDataColumn("CountryCode2", "CountryCode2", "CountryCode2", typeof(string)),
         new StiDataColumn("CountryName2", "CountryName2", "CountryName2", typeof(string)),
         new StiDataColumn("BrandID", "BrandID", "BrandID", typeof(int)),
         new StiDataColumn("BrandName", "BrandName", "BrandName", typeof(string)),
         new StiDataColumn("OrdinalNumber", "OrdinalNumber", "OrdinalNumber", typeof(short)),
         new StiDataColumn("Action", "Action", "Action", typeof(int))
     });
     DataSources.Add(SP_GetRequestDetail);
     SP_GetRequestHeader.Columns.AddRange(new[] {
         new StiDataColumn("RequestID", "RequestID", "RequestID", typeof(int)),
         new StiDataColumn("BranchID", "BranchID", "BranchID", typeof(int)),
         new StiDataColumn("BranchName", "BranchName", "BranchName", typeof(string)),
         new StiDataColumn("RequestDate", "RequestDate", "RequestDate", typeof(DateTime)),
         new StiDataColumn("Status", "Status", "Status", typeof(byte)),
         new StiDataColumn("ModifierID", "ModifierID", "ModifierID", typeof(int)),
         new StiDataColumn("Modifier", "Modifier", "Modifier", typeof(string)),
         new StiDataColumn("ModifiedDate", "ModifiedDate", "ModifiedDate", typeof(DateTime)),
         new StiDataColumn("ApproverID", "ApproverID", "ApproverID", typeof(int)),
         new StiDataColumn("Approver", "Approver", "Approver", typeof(string))
     });
     DataSources.Add(SP_GetRequestHeader);
 }
Beispiel #30
0
        private void PrintDataGrid(DataGrid sender)
        {
            StiReport report = new StiReport();

            report.ScriptLanguage = StiReportLanguageType.CSharp;

            //Add data to datastore
            report.RegData("MyList", list);

            //Fill dictionary
            report.Dictionary.Synchronize();
            StiPage page = report.Pages.Items[0];

            //Create HeaderBand
            StiHeaderBand headerBand = new StiHeaderBand();

            headerBand.Name = "HeaderBand";
            page.Components.Add(headerBand);

            //Create Dataaband
            StiDataBand dataBand = new StiDataBand();

            dataBand.DataSourceName = "MyList";
            dataBand.Height         = 0.5f;
            dataBand.Name           = "DataBand";
            page.Components.Add(dataBand);

            StiDataSource dataSource = report.Dictionary.DataSources[0];

            //Create texts
            Double pos         = 0;
            Double columnWidth = StiAlignValue.AlignToMinGrid(page.Width / dataSource.Columns.Count, 0.1, true);
            int    nameIndex   = 1;

            foreach (StiDataColumn column in dataSource.Columns)
            {
                if (column.Name == "_ID" || column.Name == "_Current")
                {
                    continue;
                }

                //Create text on header
                StiText headerText = new StiText(new RectangleD(pos, 0, columnWidth, 0.5f));
                headerText.Text.Value   = column.Name;
                headerText.HorAlignment = StiTextHorAlignment.Center;
                headerText.Name         = "HeaderText" + nameIndex.ToString();
                headerText.Brush        = new StiSolidBrush(Color.LightGreen);
                headerText.Border.Side  = StiBorderSides.All;
                headerBand.Components.Add(headerText);

                //Create text on Data Band
                StiText dataText = new StiText(new RectangleD(pos, 0, columnWidth, 0.5f));
                dataText.Text.Value  = "{MyList." + column.Name + "}";
                dataText.Name        = "DataText" + nameIndex.ToString();
                dataText.Border.Side = StiBorderSides.All;

                dataBand.Components.Add(dataText);

                pos += columnWidth;

                nameIndex++;
            }
            //Create FooterBand
            StiFooterBand footerBand = new StiFooterBand();

            footerBand.Height = 0.5f;
            footerBand.Name   = "FooterBand";
            page.Components.Add(footerBand);

            //Create text on footer
            StiText footerText = new StiText(new RectangleD(0, 0, page.Width, 0.5f));

            footerText.Text.Value   = "Count - {Count()}";
            footerText.HorAlignment = StiTextHorAlignment.Right;
            footerText.Name         = "FooterText";
            footerText.Brush        = new StiSolidBrush(Color.LightGreen);
            footerBand.Components.Add(footerText);

            //Render without progress bar
            report.Render(false);

            report.Show();

            //For checking created report you can uncomment this line
            //report.Design();
        }
Beispiel #31
0
        private void CreateReport(DataTable table, DataGridView dgv, string title, string subtitle)
        {
            StiReport          report      = new StiReport();
            StiDataTableSource sourceTable = new StiDataTableSource("DS", "DS", "DS");

            report.Dictionary.DataSources.Add(sourceTable);
            report.RegData("DS", "DS", table);
            sourceTable.SynchronizeColumns();


            StiPage page = report.Pages.Items[0];

            page.Orientation = StiPageOrientation.Landscape;
            double pageW = page.Width;
            double pageH = page.Height;

            //============заголовок
            StiText headerReport = new StiText(new RectangleD(new PointD(0, 0), new SizeD(pageW, 0.6)),
                                               "Заголовок1");

            headerReport.Font         = new Font("Arial", 10, FontStyle.Bold);
            headerReport.HorAlignment = StiTextHorAlignment.Center;
            headerReport.Text         = "История обработок";

            StiText subtitleReport = new StiText(new RectangleD(new PointD(0, 0.6), new SizeD(pageW, 0.4)),
                                                 "Подзаголовок1");

            subtitleReport.Font         = new Font("Arial", 10, FontStyle.Regular);
            subtitleReport.HorAlignment = StiTextHorAlignment.Center;
            subtitleReport.Text         = subtitle;

            PointD BrandLoc = new PointD(0, 0.4);

            //хедер рапорта
            StiReportTitleBand headerPage = new StiReportTitleBand(new RectangleD(BrandLoc, new SizeD(pageW, 1.2)));

            page.Components.Add(headerPage);
            headerPage.Components.Add(headerReport);
            headerPage.Components.Add(subtitleReport);


            //хедер таблицы
            BrandLoc = new PointD(0, 1.2);
            StiHeaderBand headerTable = new StiHeaderBand(new RectangleD(BrandLoc, new SizeD(pageW, 0.6)));

            page.Components.Add(headerTable);

            //область данных
            PointD      BrandDataLoc = new PointD(0, 1.8);
            StiDataBand BrandData    = new StiDataBand(new RectangleD(BrandDataLoc, new SizeD(pageW, 0.4)));

            page.Components.Add(BrandData);
            BrandData.DataSourceName = "DS";

            StiPageFooterBand FooterBand = new StiPageFooterBand();

            page.Components.Add(FooterBand);
            FooterBand.Height = 0.6;

            StiText FooterNameTxt = new StiText(new RectangleD(0, 0, pageW, 0.6));

            FooterNameTxt.Text                       = title;
            FooterNameTxt.ShrinkFontToFit            = true;
            FooterNameTxt.HorAlignment               = StiTextHorAlignment.Right;
            FooterNameTxt.ShrinkFontToFitMinimumSize = 8;


            StiText FooterTxt = new StiText(new RectangleD(0, 0, 1, 0.6));

            FooterTxt.Text                       = "Лист {PageNumber}";
            FooterTxt.ShrinkFontToFit            = true;
            FooterTxt.ShrinkFontToFitMinimumSize = 8;
            FooterBand.Components.Add(FooterNameTxt);
            FooterBand.Components.Add(FooterTxt);

            StiText TimeText = new StiText(new RectangleD(-0.2, -0.4, 3, 0.6));

            TimeText.Text                       = "{Time}";
            TimeText.ShrinkFontToFit            = true;
            TimeText.ShrinkFontToFitMinimumSize = 8;
            page.Components.Add(TimeText);

            double numWidth = .5;

            double Wkoef = pageW / GetColumnWidth(table, dgv);
            double prevX = 0; //numWidth;

            //StiText headerNum = new StiText(new RectangleD(BrandLoc.X, 0, numWidth, 0.4));
            //headerNum.Border.Side = StiBorderSides.All;
            //headerNum.Border.Size = 1.5;
            //headerNum.Text = "N п/п";
            //headerNum.Font = new Font("Arial", 8, FontStyle.Bold);
            //headerNum.HorAlignment = StiTextHorAlignment.Center;
            //headerNum.ShrinkFontToFit = true;
            //headerNum.ShrinkFontToFitMinimumSize = 8;
            //headerTable.Components.Add(headerNum);

            //StiText dataNum = new StiText(new RectangleD(BrandLoc.X, 0, numWidth, 0.4));
            //dataNum.Border.Side = StiBorderSides.All;
            //dataNum.ShrinkFontToFit = true;
            //dataNum.ShrinkFontToFitMinimumSize = 8;
            //dataNum.Text = "{Line}";
            //dataNum.HorAlignment = StiTextHorAlignment.Right;
            //dataNum.Font = new Font("Arial", 8, FontStyle.Regular);
            //BrandData.Components.Add(dataNum);

            foreach (DataColumn column in table.Columns) //добалвляем в область заголовка и в область данных
            {
                string             colName   = column.ColumnName;
                DataGridViewColumn dgvColumn = dgv.Columns[colName];

                StiText headerTXT = new StiText(new RectangleD(BrandLoc.X + prevX, 0,
                                                               dgvColumn.Width * Wkoef, 0.4));
                headerTXT.Border.Side                = StiBorderSides.All;
                headerTXT.Border.Size                = 1.5;
                headerTXT.Text                       = dgvColumn.HeaderText;
                headerTXT.Font                       = new Font("Arial", 8, FontStyle.Bold);
                headerTXT.HorAlignment               = StiTextHorAlignment.Center;
                headerTXT.ShrinkFontToFit            = true;
                headerTXT.ShrinkFontToFitMinimumSize = 8;

                headerTable.Components.Add(headerTXT);
                StiText dataTXT = new StiText(new RectangleD(BrandLoc.X + prevX, 0,
                                                             dgvColumn.Width * Wkoef, 0.4));
                dataTXT.Border.Side                = StiBorderSides.All;
                dataTXT.ShrinkFontToFit            = true;
                dataTXT.ShrinkFontToFitMinimumSize = 8;
                dataTXT.Font = new Font("Arial", 8, FontStyle.Regular);

                if (column.DataType == typeof(bool))
                {
                    dataTXT.Text = "{IIF(DS." + colName + ", \"+\", \"\")}";
                }
                else
                {
                    dataTXT.Text = "{DS." + colName + "}";
                }

                if (column.DataType == typeof(DateTime))
                {
                    string dateFormat = "dd.MM.yyyy HH:mm";
                    dataTXT.TextFormat = new StiDateFormatService(dateFormat, "");
                }

                if (column.DataType == typeof(double))
                {
                    dataTXT.TextFormat = new StiNumberFormatService(1, ".", 1, ",", 3, true, true, " ");
                }


                switch (dgvColumn.DefaultCellStyle.Alignment)
                {
                case DataGridViewContentAlignment.BottomCenter:
                case DataGridViewContentAlignment.MiddleCenter:
                case DataGridViewContentAlignment.TopCenter:
                    dataTXT.HorAlignment = StiTextHorAlignment.Center;
                    break;

                case DataGridViewContentAlignment.BottomLeft:
                case DataGridViewContentAlignment.MiddleLeft:
                case DataGridViewContentAlignment.TopLeft:
                    dataTXT.HorAlignment = StiTextHorAlignment.Left;
                    break;

                case DataGridViewContentAlignment.BottomRight:
                case DataGridViewContentAlignment.MiddleRight:
                case DataGridViewContentAlignment.TopRight:
                    dataTXT.HorAlignment = StiTextHorAlignment.Right;
                    break;
                }

                BrandData.Components.Add(dataTXT);

                prevX += dgvColumn.Width * Wkoef;
            }

            report.Show();
        }
        private void StimulsoftWindow_OnLoaded(object sender, RoutedEventArgs e)
        {
            StiReport report = new StiReport();

            // Add data to datastore
            report.RegData(DataTable);

            // Fill dictionary
            report.Dictionary.Synchronize();

            var page = report.Pages[0];

            //Create HeaderBand
            var headerBand = new StiHeaderBand {
                Height = 0.5, Name = "HeaderBand"
            };

            page.Components.Add(headerBand);

            //Create Databand
            var dataBand = new StiDataBand
            {
                DataSourceName = "result",
                Height         = 0.5,
                Name           = "DataBand"
            };

            page.Components.Add(dataBand);
            var width = page.Width / DataTable.Columns.Count;

            foreach (DataColumn column in DataTable.Columns)
            {
                //Create text on header
                var headerText = new StiText(new RectangleD(0, 0, width, 0.5))
                {
                    Text          = column.ColumnName,
                    HorAlignment  = StiTextHorAlignment.Center,
                    Brush         = new StiSolidBrush(Color.Gainsboro),
                    Dockable      = true,
                    DockStyle     = StiDockStyle.Left,
                    CanShrink     = true,
                    CanGrow       = true,
                    VertAlignment = StiVertAlignment.Center
                };
                headerBand.Components.Add(headerText);

                //Create text
                var dataText = new StiText(new RectangleD(0, 0, width, 0.5))
                {
                    Text          = "{result." + column.ColumnName + "}",
                    Dockable      = true,
                    DockStyle     = StiDockStyle.Left,
                    VertAlignment = StiVertAlignment.Center,
                    CanShrink     = true,
                    CanGrow       = true,
                };
                dataBand.Components.Add(dataText);
            }

            Viewer.Report = report;
            report.Compile();
            report.Render(true);
        }
Beispiel #33
0
        private void print_Click(object sender, EventArgs e)
        {
            StiReport report = new StiReport();

            report.ScriptLanguage = StiReportLanguageType.CSharp;

            //Add data to datastore
            report.RegData("MyList", model);

            //Fill dictionary
            report.Dictionary.Synchronize();
            StiPage page = report.Pages.Items[0];

            page.Orientation = StiPageOrientation.Landscape;
            //Create HeaderBand
            StiHeaderBand headerBand = new StiHeaderBand();

            headerBand.Name = "HeaderBand";
            page.Components.Add(headerBand);

            //Create Dataaband
            StiDataBand dataBand = new StiDataBand();

            dataBand.DataSourceName = "MyList";
            dataBand.Height         = 0.5f;
            dataBand.Name           = "DataBand";
            page.Components.Add(dataBand);

            StiDataSource dataSource = report.Dictionary.DataSources[0];

            //Create texts
            Double pos          = 0;
            Double columnWidth  = StiAlignValue.AlignToMinGrid((page.Width * 3 * 1.1) / 44, 0.1, true);
            Double AddressWidth = StiAlignValue.AlignToMinGrid((page.Width) / 4, 0.1, true);
            int    nameIndex    = 1;

            foreach (StiDataColumn column in dataSource.Columns)
            {
                if (column.Name == "mantagheName" || column.Name == "Senn" || column.Name == "_ID" || column.Name == "_Current" || column.Name == "checkbox" || column.Name == "codegrid" || column.Name == "datetime" || column.Name == "Address1" || column.Name == "Address2" || column.Name == "Address3")
                {
                    continue;
                }

                //Create text on header
                StiText headerText = null;
                if (column.Name == "Address")
                {
                    headerText = new StiText(new RectangleD(pos, 0, AddressWidth, 0.5f));
                }
                else
                {
                    headerText = new StiText(new RectangleD(pos, 0, columnWidth, 0.5f));
                }

                headerText.WordWrap = false;
                string val = bringPersionName(column.Name);
                headerText.Text.Value = val;//

                headerText.HorAlignment  = StiTextHorAlignment.Center;
                headerText.VertAlignment = StiVertAlignment.Center;
                headerText.Name          = "HeaderText" + nameIndex.ToString();
                headerText.Brush         = new StiSolidBrush(Color.LightGreen);
                headerText.Border.Side   = StiBorderSides.All;
                headerBand.Components.Add(headerText);

                //Create text on Data Band
                StiText dataText = null;
                if (column.Name == "Address")
                {
                    dataText = new StiText(new RectangleD(pos, 0, AddressWidth, 0.5f));
                }
                else
                {
                    dataText = new StiText(new RectangleD(pos, 0, columnWidth, 0.5f));
                }


                dataText.WordWrap = false;
                if (column.Name != "Address" || column.Name != "phones")
                {
                    dataText.HorAlignment = StiTextHorAlignment.Center;
                }
                dataText.VertAlignment = StiVertAlignment.Center;
                dataText.Text.Value    = "{MyList." + column.Name + "}";
                dataText.Name          = "DataText" + nameIndex.ToString();
                dataText.Border.Side   = StiBorderSides.All;
                dataText.RightToLeft   = true;

                //Add highlight
                //dataText.HighlightCondition.Brush = new StiSolidBrush(Color.CornflowerBlue);
                //dataText.HighlightCondition.TextBrush = new StiSolidBrush(Color.Black);
                //dataText.HighlightCondition.Condition.Value = "(Line & 1) == 1";

                //uncomment this line for VB.Net
                //dataText.HighlightCondition.Condition.Value = "(Line And 1) = 1";

                dataBand.Components.Add(dataText);

                pos += columnWidth;

                nameIndex++;
            }
            //Create FooterBand
            StiFooterBand footerBand = new StiFooterBand();

            footerBand.Height = 0.5f;
            footerBand.Name   = "FooterBand";
            page.Components.Add(footerBand);

            //Create text on footer
            StiText footerText = new StiText(new RectangleD(0, 0, page.Width, 0.5f));

            footerText.Text.Value   = "Count - {Count()}";
            footerText.HorAlignment = StiTextHorAlignment.Right;
            footerText.Name         = "FooterText";
            footerText.Brush        = new StiSolidBrush(Color.LightGreen);
            footerBand.Components.Add(footerText);

            //Render without progress bar
            report.Render(false);

            report.Show();

            //For checking created report you can uncomment this line
            //report.Design();
        }