예제 #1
0
        public static SubreportType AddSubreport(string pName, string vReportName_WithoutFileExtn, ReportItemsType pReportItems, double pLeft, double pTop, double pWidth, double pHeight)
        {
            SubreportType vSubreport = new SubreportType(pName);

            vSubreport.ReportName   = vReportName_WithoutFileExtn; // The sub-report must exist in the same folder, having file name = <ReportName>+".rdlc"
            vSubreport.Left.Value   = pLeft;
            vSubreport.Top.Value    = pTop;
            vSubreport.Width.Value  = pWidth;
            vSubreport.Height.Value = pHeight;
            //
            pReportItems.Add(vSubreport);
            return(vSubreport);
        }
예제 #2
0
        public static ListType AddList(string pName, ReportItemsType pReportItems, double pLeft, double pTop, double pWidth, double pHeight)
        {
            ListType vList = new ListType(pName);

            vList.DataSetName  = "MyDataSource";
            vList.Left.Value   = pLeft;
            vList.Top.Value    = pTop;
            vList.Width.Value  = pWidth;
            vList.Height.Value = pHeight;
            ///
            pReportItems.Add(vList);
            return(vList);
        }
예제 #3
0
        public static TextboxType AddTextbox(string pName, ReportItemsType pReportItems, double pLeft, double pTop, double pWidth, double pHeight)
        {
            TextboxType vTextbox = new TextboxType(pName);

            vTextbox.Left.Value   = pLeft;
            vTextbox.Top.Value    = pTop;
            vTextbox.Width.Value  = pWidth;
            vTextbox.Height.Value = pHeight;
            ///
            //== vTextbox.CanGrow = true;
            ///
            pReportItems.Add(vTextbox);
            return(vTextbox);
        }
예제 #4
0
        public static LineType AddLine(string pName, ReportItemsType pReportItems, double pLeft, double pTop, double pWidth, double pHeight)
        {
            LineType vLine = new LineType(pName);

            vLine.Left.Value   = pLeft;
            vLine.Top.Value    = pTop;
            vLine.Width.Value  = pWidth;
            vLine.Height.Value = pHeight;
            ///
            vLine.Style.BorderStyle               = new BorderStyleType();
            vLine.Style.BorderStyle.Default       = BorderStyleEnum.Solid;
            vLine.Style.BorderWidth               = new BorderWidthType();
            vLine.Style.BorderWidth.Default.Value = 1;
            ///
            pReportItems.Add(vLine);
            return(vLine);
        }
예제 #5
0
        public static RectangleType AddRectangle(string pName, ReportItemsType pReportItems, double pLeft, double pTop, double pWidth, double pHeight)
        {
            RectangleType vRect = new RectangleType(pName);

            vRect.Left.Value   = pLeft;
            vRect.Top.Value    = pTop;
            vRect.Width.Value  = pWidth;
            vRect.Height.Value = pHeight;
            ///
            vRect.Style.BorderStyle               = new BorderStyleType();
            vRect.Style.BorderStyle.Default       = BorderStyleEnum.Solid;
            vRect.Style.BorderWidth               = new BorderWidthType();
            vRect.Style.BorderWidth.Default.Value = 1.00;
            ///
            pReportItems.Add(vRect);
            return(vRect);
        }
예제 #6
0
        /* To add image from database stored in a field */
        public static ImageType AddImage
        (
            string pName, string pFieldName, string pMIMEType,
            ReportItemsType pReportItems, double pLeft, double pTop, double pWidth, double pHeight)
        {
            ImageType vImage = new ImageType(pName);

            vImage.Left.Value   = pLeft;
            vImage.Top.Value    = pTop;
            vImage.Width.Value  = pWidth;
            vImage.Height.Value = pHeight;
            ///
            vImage.Source   = SourceEnum.Database;
            vImage.Sizing   = SizingEnum.FitProportional;
            vImage.Value    = "=Fields!" + pFieldName + ".Value";
            vImage.MIMEType = pMIMEType;
            ///
            pReportItems.Add(vImage);
            return(vImage);
        }
예제 #7
0
        public static ImageType AddImage
        (
            string pName, EmbeddedImageType pEmbededImage,
            ReportItemsType pReportItems, double pLeft, double pTop, double pWidth, double pHeight
        )
        {
            ImageType vImage = new ImageType(pName);

            vImage.Left.Value   = pLeft;
            vImage.Top.Value    = pTop;
            vImage.Width.Value  = pWidth;
            vImage.Height.Value = pHeight;
            ///
            vImage.Source   = SourceEnum.Embedded;
            vImage.Sizing   = SizingEnum.FitProportional;
            vImage.Value    = pEmbededImage.Name;
            vImage.MIMEType = pEmbededImage.MIMEType;
            ///
            pReportItems.Add(vImage);
            return(vImage);
        }