public static int ReportSizeItemSize(ReportSize reportSize) { if (reportSize == null) { return(AspNetCore.ReportingServices.OnDemandProcessing.Scalability.ItemSizes.SizeOf((string)null)); } return(AspNetCore.ReportingServices.OnDemandProcessing.Scalability.ItemSizes.SizeOf(reportSize.ToString())); }
public static void WriteReportSize(BinaryWriter spbifWriter, byte rplid, ReportSize value) { if (value != null) { spbifWriter.Write(rplid); spbifWriter.Write(value.ToString()); } }
public Paragraph(ParagraphInstance romParagraphInstance, string uniqueName, bool hideDuplicates) { this.m_source = romParagraphInstance.Definition; AspNetCore.ReportingServices.OnDemandReportRendering.Paragraph source = this.m_source; Utility.AddInstanceStyles(romParagraphInstance.Style, ref this.m_styles); if (romParagraphInstance.IsCompiled) { this.m_spaceAfter = romParagraphInstance.SpaceAfter; this.m_spaceBefore = romParagraphInstance.SpaceBefore; this.m_leftIndent = romParagraphInstance.LeftIndent; this.m_rightIndent = romParagraphInstance.RightIndent; this.m_hangingIndent = romParagraphInstance.HangingIndent; this.m_listLevel = romParagraphInstance.ListLevel; this.m_listStyle = (RPLFormat.ListStyles)StyleEnumConverter.Translate(romParagraphInstance.ListStyle); } else { if (source.SpaceAfter != null && source.SpaceAfter.IsExpression) { this.m_spaceAfter = this.m_source.Instance.SpaceAfter; } if (source.SpaceBefore != null && source.SpaceBefore.IsExpression) { this.m_spaceBefore = this.m_source.Instance.SpaceBefore; } if (source.LeftIndent != null && source.LeftIndent.IsExpression) { this.m_leftIndent = this.m_source.Instance.LeftIndent; } if (source.RightIndent != null && source.RightIndent.IsExpression) { this.m_rightIndent = this.m_source.Instance.RightIndent; } if (source.HangingIndent != null && source.HangingIndent.IsExpression) { this.m_hangingIndent = this.m_source.Instance.HangingIndent; } if (source.ListLevel != null && source.ListLevel.IsExpression) { this.m_listLevel = this.m_source.Instance.ListLevel; } if (source.ListStyle != null && source.ListStyle.IsExpression) { this.m_listStyle = (RPLFormat.ListStyles)StyleEnumConverter.Translate(this.m_source.Instance.ListStyle); } } this.m_uniqueName = uniqueName; if (string.IsNullOrEmpty(uniqueName)) { this.m_uniqueName = romParagraphInstance.UniqueName; } TextRunInstanceCollection textRunInstances = romParagraphInstance.TextRunInstances; foreach (TextRunInstance item in textRunInstances) { this.m_textRuns.Add(new TextRun(item, hideDuplicates)); } }
protected override void ResetInstanceCache() { if (m_style != null) { m_style.SetNewContext(); } m_type = null; m_size = null; }
internal Paragraph(ParagraphInstance romParagraphInstance, string uniqueName, bool hideDuplicates) { m_source = romParagraphInstance.Definition; Microsoft.ReportingServices.OnDemandReportRendering.Paragraph source = m_source; Utility.AddInstanceStyles(romParagraphInstance.Style, ref m_styles); if (romParagraphInstance.IsCompiled) { m_spaceAfter = romParagraphInstance.SpaceAfter; m_spaceBefore = romParagraphInstance.SpaceBefore; m_leftIndent = romParagraphInstance.LeftIndent; m_rightIndent = romParagraphInstance.RightIndent; m_hangingIndent = romParagraphInstance.HangingIndent; m_listLevel = romParagraphInstance.ListLevel; m_listStyle = (RPLFormat.ListStyles)StyleEnumConverter.Translate(romParagraphInstance.ListStyle); } else { if (source.SpaceAfter != null && source.SpaceAfter.IsExpression) { m_spaceAfter = m_source.Instance.SpaceAfter; } if (source.SpaceBefore != null && source.SpaceBefore.IsExpression) { m_spaceBefore = m_source.Instance.SpaceBefore; } if (source.LeftIndent != null && source.LeftIndent.IsExpression) { m_leftIndent = m_source.Instance.LeftIndent; } if (source.RightIndent != null && source.RightIndent.IsExpression) { m_rightIndent = m_source.Instance.RightIndent; } if (source.HangingIndent != null && source.HangingIndent.IsExpression) { m_hangingIndent = m_source.Instance.HangingIndent; } if (source.ListLevel != null && source.ListLevel.IsExpression) { m_listLevel = m_source.Instance.ListLevel; } if (source.ListStyle != null && source.ListStyle.IsExpression) { m_listStyle = (RPLFormat.ListStyles)StyleEnumConverter.Translate(m_source.Instance.ListStyle); } } m_uniqueName = uniqueName; if (string.IsNullOrEmpty(uniqueName)) { m_uniqueName = romParagraphInstance.UniqueName; } foreach (TextRunInstance textRunInstance in romParagraphInstance.TextRunInstances) { m_textRuns.Add(new TextRun(textRunInstance, hideDuplicates)); } }
/// <summary> ////Создание отчета в виде HTML файла /// </summary> /// <param name="fname">Полный путь и название файла отчата</param> /// <param name="type">Тип отчета (полный или краткий)</param> public static void CreateHTMLReport(string fname, ReportSize type) { switch (type) { case ReportSize.Small: break; case ReportSize.Full: break; } }
internal void AddSpaceAfter(ReportSize size) { if (m_spaceAfterSet) { m_spaceAfter = ReportSize.SumSizes(m_spaceAfter, size); return; } m_spaceAfter = size; m_spaceAfterSet = true; }
private double ParseSize(string sizeValue, double defaultValue) { double result = defaultValue; if (sizeValue != null && sizeValue.Length > 0 && ReportSize.TryParse(sizeValue, out ReportSize reportSize)) { result = reportSize.ToMillimeters(); } return(result); }
internal ReportBody(Body source, ReportSize width) : base(null) { m_itemPageSizes = new ItemSizes(0.0, 0.0, width.ToMillimeters(), source.Height.ToMillimeters()); m_originalWidth = m_itemPageSizes.Width; m_source = source; base.KeepTogetherHorizontal = false; base.KeepTogetherVertical = false; base.UnresolvedKTV = (base.UnresolvedKTH = false); }
/// <summary> /// Создание отчета в виде PDF файла /// </summary> /// <param name="fname">Полный путь и имя файла отчета</param> /// <param name="type">Тип отчета (полный или краткий)</param> public static void CreatePDFReport(string fname, ReportSize type) { switch (type) { case ReportSize.Small: PDFWorker.CreatePDFReportSmall(fname, GlobalVars.List); break; case ReportSize.Full: break; } }
public override ReportSize this[int index] { get { return(new ReportSize(m_col[index])); } set { m_col[index] = new ReportSize(value); } }
public static void WriteReportSize(IntermediateFormatWriter writer, ReportSize reportSize) { if (reportSize == null) { writer.WriteNull(); } else { writer.Write(reportSize.ToString()); } }
public ReportBody(Body source, ReportSize width) : base(null) { base.m_itemPageSizes = new ItemSizes(0.0, 0.0, width.ToMillimeters(), source.Height.ToMillimeters()); this.m_originalWidth = base.m_itemPageSizes.Width; this.m_source = source; base.KeepTogetherHorizontal = false; base.KeepTogetherVertical = false; bool unresolvedKTV = base.UnresolvedKTH = false; base.UnresolvedKTV = unresolvedKTV; }
protected override void ResetInstanceCache() { if (m_style != null) { m_style.SetNewContext(); } m_leftMargin = null; m_rightMargin = null; m_topMargin = null; m_bottomMargin = null; m_zIndex = null; }
public static double GetSizePropertyValue(ReportSizeProperty sizeProp, ReportSize instanceValue) { if (instanceValue != null) { return(instanceValue.ToMillimeters()); } if (sizeProp != null && sizeProp.Value != null) { return(sizeProp.Value.ToMillimeters()); } return(0.0); }
public void AddSpaceAfter(ReportSize size) { if (this.m_spaceAfterSet) { this.m_spaceAfter = ReportSize.SumSizes(this.m_spaceAfter, size); } else { this.m_spaceAfter = size; this.m_spaceAfterSet = true; } }
internal ReportBody(Body source, ReportSize width, PageContext pageContext) : base(null, createForRepeat: false) { if (pageContext != null) { m_itemPageSizes = pageContext.GetSharedItemSizesElement(width, source.Height, source.ID, isPadded: true); } else { m_itemPageSizes = new PaddItemSizes(width, source.Height, source.ID); } m_source = source; }
public PageHeadFoot(PageSection source, ReportSize width, PageContext pageContext) : base(null, false) { if (pageContext != null) { base.m_itemPageSizes = pageContext.GetSharedItemSizesElement(width, source.Height, source.ID, true); } else { base.m_itemPageSizes = new PaddItemSizes(width, source.Height, source.ID); } this.m_source = source; }
protected override void ResetInstanceCache() { if (m_style != null) { m_style.SetNewContext(); } m_columnType = null; m_value = null; m_toolTip = null; m_minimumWidth = null; m_maximumWidth = null; m_seriesSymbolWidth = null; m_seriesSymbolHeight = null; }
protected override void ResetInstanceCache() { m_allowOutSidePlotArea = null; m_calloutBackColor = null; m_calloutLineAnchor = null; m_calloutLineColor = null; m_calloutLineStyle = null; m_calloutLineWidth = null; m_calloutStyle = null; m_showOverlapped = null; m_markerOverlapping = null; m_maxMovingDistance = null; m_minMovingDistance = null; m_disabled = null; }
private void CreateFont(string family, ReportSize size, FontStyles style, FontWeights weight, TextDecorations decoration, TextAlignments alignment, VerticalAlignments verticalAlignment, Directions direction, WritingModes writingMode) { this.CreateGDIFont(family, size, style, weight, decoration); StringAlignment textStringAlignment = this.CreateTextStringAlignment(alignment); bool directionRightToLeft = false; if (direction == Directions.RTL) { directionRightToLeft = true; } this.SetWritingMode(writingMode); StringAlignment lineStringAlignment = this.CreateLineStringAlignment(verticalAlignment); this.CreateFormatString(textStringAlignment, lineStringAlignment, directionRightToLeft); }
internal void PopulateStyleInstance(ICompiledStyleInstance styleInstance, bool isParagraphStyle) { if (isParagraphStyle) { TextAlignments textAlign = TextAlign; if (textAlign != 0) { styleInstance.TextAlign = textAlign; } return; } ReportColor color = Color; if (color != null) { styleInstance.Color = color; } string fontFamily = FontFamily; if (!string.IsNullOrEmpty(fontFamily)) { styleInstance.FontFamily = fontFamily; } ReportSize fontSize = FontSize; if (fontSize != null) { styleInstance.FontSize = fontSize; } FontStyles fontStyle = FontStyle; if (fontStyle != 0) { styleInstance.FontStyle = fontStyle; } FontWeights fontWeight = FontWeight; if (fontWeight != 0) { styleInstance.FontWeight = fontWeight; } TextDecorations textDecoration = TextDecoration; if (textDecoration != 0) { styleInstance.TextDecoration = textDecoration; } }
private ReportSize GetLargest(ReportSize size1, ReportSize size2) { if (size1 == null) { return(size2); } if (size2 == null) { return(size1); } if (size1.ToMillimeters() > size2.ToMillimeters()) { return(size1); } return(size2); }
private double GetPaddings(StyleAttributeNames padd1, StyleAttributeNames padd2) { double num = 0.0; ReportSize styleValue = GetStyleValue(padd1); if (styleValue != null) { num += styleValue.ToMillimeters(); } styleValue = GetStyleValue(padd2); if (styleValue != null) { num += styleValue.ToMillimeters(); } return(num); }
protected override void ResetInstanceCache() { if (m_style != null) { m_style.SetNewContext(); } m_min = null; m_max = null; m_crossAt = null; m_visible = null; m_margin = null; m_interval = null; m_intervalType = null; m_intervalOffset = null; m_intervalOffsetType = null; m_labelInterval = null; m_labelIntervalType = null; m_labelIntervalOffset = null; m_labelIntervalOffsetType = null; m_variableAutoInterval = null; m_marksAlwaysAtPlotEdge = null; m_reverse = null; m_location = null; m_interlaced = null; m_interlacedColor = null; m_logScale = null; m_logBase = null; m_hideLabels = null; m_angle = null; m_arrows = null; m_preventFontShrink = null; m_preventFontGrow = null; m_preventLabelOffset = null; m_preventWordWrap = null; m_allowLabelRotation = null; m_includeZero = null; m_labelsAutoFitDisabled = null; m_minFontSize = null; m_maxFontSize = null; m_offsetLabels = null; m_hideEndLabels = null; }
internal ItemSizes GetSharedItemSizesElement(ReportSize width, ReportSize height, string id, bool isPadded) { if (id == null) { return(null); } ItemSizes itemSizes = null; if (m_sharedItemSizes.ContainsKey(id)) { itemSizes = (ItemSizes)m_sharedItemSizes[id]; itemSizes.Update(width, height); } else { itemSizes = ((!isPadded) ? new ItemSizes(width, height, id) : new PaddItemSizes(width, height, id)); m_sharedItemSizes.Add(id, itemSizes); } return(itemSizes); }
public void GetPaddingValues(ReportItem source, out double padVertical, out double padHorizontal, out double padTop) { padVertical = this.m_padVertical; padHorizontal = this.m_padHorizontal; padTop = this.m_padTop; ReportSize reportSize = null; if ((this.m_state & PaddingState.Top) == PaddingState.Clear) { reportSize = PaddingsStyle.GetStyleValue(StyleAttributeNames.PaddingTop, source); if (reportSize != null) { padTop = reportSize.ToMillimeters(); padVertical += padTop; } } if ((this.m_state & PaddingState.Bottom) == PaddingState.Clear) { reportSize = PaddingsStyle.GetStyleValue(StyleAttributeNames.PaddingBottom, source); if (reportSize != null) { padVertical += reportSize.ToMillimeters(); } } if ((this.m_state & PaddingState.Left) == PaddingState.Clear) { reportSize = PaddingsStyle.GetStyleValue(StyleAttributeNames.PaddingLeft, source); if (reportSize != null) { padHorizontal += reportSize.ToMillimeters(); } } if ((this.m_state & PaddingState.Right) == PaddingState.Clear) { reportSize = PaddingsStyle.GetStyleValue(StyleAttributeNames.PaddingRight, source); if (reportSize != null) { padHorizontal += reportSize.ToMillimeters(); } } }
internal void PopulateParagraph(ICompiledParagraphInstance paragraphInstance) { ApplyPendingMargins(); m_flatStore.LastPopulatedParagraph = paragraphInstance; paragraphInstance.ListStyle = m_flatStore.ListStyle; m_flatStore.ListStyle = ListStyle.None; paragraphInstance.ListLevel = m_flatStore.ListLevel; ReportSize leftIndent = LeftIndent; if (leftIndent != null) { paragraphInstance.LeftIndent = leftIndent; } ReportSize rightIndent = RightIndent; if (rightIndent != null) { paragraphInstance.RightIndent = rightIndent; } ReportSize hangingIndent = HangingIndent; if (hangingIndent != null) { paragraphInstance.HangingIndent = hangingIndent; } ReportSize marginTop = MarginTop; ReportSize spaceBefore = SpaceBefore; if (spaceBefore != null || marginTop != null) { paragraphInstance.SpaceBefore = ReportSize.SumSizes(marginTop, spaceBefore); m_flatStore.SpaceBefore = null; m_flatStore.ClearMarginTop(); } StoreLastParagraph(paragraphInstance); }
protected override void ResetInstanceCache() { if (m_style != null) { m_style.SetNewContext(); } m_hidden = null; m_position = null; m_layout = null; m_dockOutsideChartArea = null; m_autoFitTextDisabled = null; m_minFontSize = null; m_headerSeparator = null; m_headerSeparatorColor = null; m_columnSeparator = null; m_columnSeparatorColor = null; m_columnSpacing = null; m_interlacedRows = null; m_interlacedRowsColor = null; m_equallySpacedItems = null; m_reversed = null; m_maxAutoSize = null; m_textWrapThreshold = null; }
internal void UpdatePendingMarginBottom(ReportSize marginBottom) { m_pendingMarginBottom = GetLargest(m_pendingMarginBottom, marginBottom); }
internal void ClearPendingMarginBottom() { m_pendingMarginBottom = null; }
internal void AddMarginTop(ReportSize margin) { m_marginTop = ReportSize.SumSizes(m_marginTop, margin); }