Beispiel #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);
        }
Beispiel #2
0
 public static void SetSize(ReportItemType pControl, double pWidth, double pHeight)
 {
     if (pControl is LineType)
     {
         LineType vLine = pControl as LineType;
         vLine.Width.Value  = pWidth;
         vLine.Height.Value = pHeight;
     }
     else if (pControl is RectangleType)
     {
         RectangleType vLine = pControl as RectangleType;
         vLine.Width.Value  = pWidth;
         vLine.Height.Value = pHeight;
     }
     else if (pControl is TextboxType)
     {
         TextboxType vLine = pControl as TextboxType;
         vLine.Width.Value  = pWidth;
         vLine.Height.Value = pHeight;
     }
     else if (pControl is ImageType)
     {
         ImageType vLine = pControl as ImageType;
         vLine.Width.Value  = pWidth;
         vLine.Height.Value = pHeight;
     }
     else if (pControl is SubreportType)
     {
         SubreportType vLine = pControl as SubreportType;
         vLine.Width.Value  = pWidth;
         vLine.Height.Value = pHeight;
     }
     else if (pControl is ListType)
     {
         ListType vLine = pControl as ListType;
         vLine.Width.Value  = pWidth;
         vLine.Height.Value = pHeight;
     }
     else if (pControl is MatrixType)
     {
         MatrixType vLine = pControl as MatrixType;
         vLine.Width.Value  = pWidth;
         vLine.Height.Value = pHeight;
     }
     else if (pControl is TableType)
     {
         TableType vLine = pControl as TableType;
         vLine.Width.Value  = pWidth;
         vLine.Height.Value = pHeight;
     }
     else if (pControl is ChartType)
     {
         ChartType vLine = pControl as ChartType;
         vLine.Width.Value  = pWidth;
         vLine.Height.Value = pHeight;
     }
     else if (pControl is CustomReportItemType)
     {
         CustomReportItemType vLine = pControl as CustomReportItemType;
         vLine.Width.Value  = pWidth;
         vLine.Height.Value = pHeight;
     }
 }
Beispiel #3
0
 public static void SetLocation(ReportItemType pControl, double pLeft, double pTop)
 {
     if (pControl is LineType)
     {
         LineType vLine = pControl as LineType;
         vLine.Left.Value = pLeft;
         vLine.Top.Value  = pTop;
     }
     else if (pControl is RectangleType)
     {
         RectangleType vLine = pControl as RectangleType;
         vLine.Left.Value = pLeft;
         vLine.Top.Value  = pTop;
     }
     else if (pControl is TextboxType)
     {
         TextboxType vLine = pControl as TextboxType;
         vLine.Left.Value = pLeft;
         vLine.Top.Value  = pTop;
     }
     else if (pControl is ImageType)
     {
         ImageType vLine = pControl as ImageType;
         vLine.Left.Value = pLeft;
         vLine.Top.Value  = pTop;
     }
     else if (pControl is SubreportType)
     {
         SubreportType vLine = pControl as SubreportType;
         vLine.Left.Value = pLeft;
         vLine.Top.Value  = pTop;
     }
     else if (pControl is ListType)
     {
         ListType vLine = pControl as ListType;
         vLine.Left.Value = pLeft;
         vLine.Top.Value  = pTop;
     }
     else if (pControl is MatrixType)
     {
         MatrixType vLine = pControl as MatrixType;
         vLine.Left.Value = pLeft;
         vLine.Top.Value  = pTop;
     }
     else if (pControl is TableType)
     {
         TableType vLine = pControl as TableType;
         vLine.Left.Value = pLeft;
         vLine.Top.Value  = pTop;
     }
     else if (pControl is ChartType)
     {
         ChartType vLine = pControl as ChartType;
         vLine.Left.Value = pLeft;
         vLine.Top.Value  = pTop;
     }
     else if (pControl is CustomReportItemType)
     {
         CustomReportItemType vLine = pControl as CustomReportItemType;
         vLine.Left.Value = pLeft;
         vLine.Top.Value  = pTop;
     }
 }