private ReportItemsType CreateHeaderTableCellReportItems(string fieldName, int i, bool isNumeric) { ReportItemsType headerTableCellReportItems = new ReportItemsType(); headerTableCellReportItems.Items = new object[] { CreateHeaderTableCellTextbox(fieldName, i, isNumeric) }; return(headerTableCellReportItems); }
private ReportItemsType CreateReportItems() { var reportItems = new ReportItemsType { Items = new object[] {} }; var resultado = new List <object>(); var i = 1; var topTituloCount = 0.0; var topGridCount = 0.6; foreach (var grid in Grids) { var topTitulo = (topTituloCount + "cm").Replace(",", "."); var topGrid = (topGridCount + "cm").Replace(",", "."); resultado.Add(CreateTextBox(grid.Titulo, topTitulo)); resultado.Add(CreateTablix("DataSet" + i, grid.Fields, topGrid)); topTituloCount = (((grid.Tabela.Rows.Count * 0.07) + 0.7) + 0.07) + topTituloCount; topGridCount = (((grid.Tabela.Rows.Count * 0.07) + 0.7) + 0.07) + topGridCount; i++; } reportItems.Items = resultado.ToArray(); return(reportItems); }
private ReportItemsType CreateTableCellReportItems(string fieldName, bool isNumeric) { ReportItemsType reportItems = new ReportItemsType(); reportItems.Items = new object[] { CreateTableCellTextbox(fieldName, isNumeric) }; return(reportItems); }
private ReportItemsType CreateHeaderTableCellReportItems(string fieldName) { ReportItemsType headerTableCellReportItems = new ReportItemsType(); headerTableCellReportItems.Items = new object[] { CreateHeaderTableCellTextbox(fieldName) }; return(headerTableCellReportItems); }
private ReportItemsType CreateHeaderTableCellReportItems(ReportColumn field) { var headerTableCellReportItems = new ReportItemsType(); headerTableCellReportItems.Items = new object[] { CreateHeaderTableCellTextbox(field) }; return(headerTableCellReportItems); }
public static void AttachRulers(ReportItemsType pReportItems, double pWidth, double pHeight) { if (DESIGN_MODE == true) { AttachHorizRuler(pReportItems, pWidth); AttachVertRuler(pReportItems, pHeight); } }
private ReportItemsType CreateReportItems() { ReportItemsType reportItems = new ReportItemsType(); TableRdlGenerator tableGen = new TableRdlGenerator(); tableGen.Fields = m_selectedFields; reportItems.Items = new object[] { tableGen.CreateTable() }; return(reportItems); }
private ReportItemsType CreateReportItems() { var reportItems = new ReportItemsType { Items = new object[] { CreateTablix() } }; return(reportItems); }
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); }
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); }
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); }
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); }
public static void AttachVertRuler(ReportItemsType pReportItems, double pHeight) { Color vRulerColor = Color.LightGray; //LineType lineVert = AddLine("lineVert", pReportItems, 0, 0, 0, pHeight); //lineVert.Style.BorderColor.Default.Color = vRulerColor; for (int y = 0; y <= (int)pHeight; y++) { LineType lineInch = AddLine("lineInchY" + y, pReportItems, -0.1, y, 0.2, 0); lineInch.Style.BorderColor.Default.Color = vRulerColor; TextboxType txtInch = AddTextbox("txtInchY" + y, pReportItems, 0.02, y + 0.02, 0.2, 0.2); txtInch.Value = y + ""; txtInch.Style.Color.Color = vRulerColor; txtInch.Style.Font("Arial", 6, FontWeightEnum.Normal, FontStyleEnum.Normal); } int n = 1; for (double y = 0; y <= pHeight; y += 0.5) { LineType lineInch = AddLine("lineInch2Y" + n, pReportItems, -0.05, y, 0.1, 0); lineInch.Style.BorderColor.Default.Color = vRulerColor; n++; } n = 1; for (double y = 0; y <= pHeight; y += 0.25) { LineType lineInch = AddLine("lineInch4Y" + n, pReportItems, -0.025, y, 0.05, 0); lineInch.Style.BorderColor.Default.Color = vRulerColor; n++; } n = 1; for (double y = 0; y <= pHeight; y += 0.125) { LineType lineInch = AddLine("lineInch8Y" + n, pReportItems, -0.0125, y, 0.025, 0); lineInch.Style.BorderColor.Default.Color = vRulerColor; n++; } }
public static void AttachHorizRuler(ReportItemsType pReportItems, double pWidth) { Color vRulerColor = Color.LightGray; //LineType lineHoriz = AddLine("lineHoriz", pReportItems, 0, 0, pWidth, 0); //lineHoriz.Style.BorderColor.Default.Color = vRulerColor; for (int x = 0; x <= (int)pWidth; x++) { LineType lineInch = AddLine("lineInchX" + x, pReportItems, x, -0.1, 0, 0.2); lineInch.Style.BorderColor.Default.Color = vRulerColor; TextboxType txtInch = AddTextbox("txtInchX" + x, pReportItems, x + 0.02, 0.01, 0.2, 0.2); txtInch.Value = x + ""; txtInch.Style.Color.Color = vRulerColor; txtInch.Style.Font("Arial", 6, FontWeightEnum.Normal, FontStyleEnum.Normal); } int n = 1; for (double x = 0; x <= pWidth; x += 0.5) { LineType lineInch = AddLine("lineInch2X" + n, pReportItems, x, -0.05, 0, 0.1); lineInch.Style.BorderColor.Default.Color = vRulerColor; n++; } n = 1; for (double x = 0; x <= pWidth; x += 0.25) { LineType lineInch = AddLine("lineInch4X" + n, pReportItems, x, -0.025, 0, 0.05); lineInch.Style.BorderColor.Default.Color = vRulerColor; n++; } n = 1; for (double x = 0; x <= pWidth; x += 0.125) { LineType lineInch = AddLine("lineInch8X" + n, pReportItems, x, -0.0125, 0, 0.025); lineInch.Style.BorderColor.Default.Color = vRulerColor; n++; } }
/* 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); }
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); }
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); }