public void RenderReportItem(RPLElement reportItem, RPLItemMeasurement measurement, StyleContext styleContext, ref int borderContext, bool renderId, bool treatAsTopLevel) { RPLSubReport rPLSubReport = (RPLSubReport)reportItem; RPLElementProps elementProps = reportItem.ElementProps; RPLElementPropsDef definition = elementProps.Definition; using (html5Renderer.m_reportContext.EnterSubreport(definition)) { if (!styleContext.InTablix || renderId) { styleContext.RenderMeasurements = false; html5Renderer.WriteStream(HTMLElements.m_openDiv); html5Renderer.RenderReportItemStyle(rPLSubReport, elementProps, definition, measurement, styleContext, ref borderContext, definition.ID); if (renderId) { html5Renderer.RenderReportItemId(elementProps.UniqueName); } html5Renderer.WriteStreamCR(HTMLElements.m_closeBracket); } RPLItemMeasurement[] children = rPLSubReport.Children; int num = 0; int num2 = borderContext; bool usePercentWidth = children.Length != 0; int num3 = children.Length; for (int i = 0; i < num3; i++) { if (i == 0 && num3 > 1 && (borderContext & 8) > 0) { num2 &= -9; } else if (i == 1 && (borderContext & 4) > 0) { num2 &= -5; } if (i > 0 && i == num3 - 1 && (borderContext & 8) > 0) { num2 |= 8; } num = num2; RPLItemMeasurement rPLItemMeasurement = children[i]; RPLContainer rPLContainer = (RPLContainer)rPLItemMeasurement.Element; RPLElementProps elementProps2 = rPLContainer.ElementProps; RPLElementPropsDef definition2 = elementProps2.Definition; html5Renderer.m_isBody = true; html5Renderer.m_usePercentWidth = usePercentWidth; new RectangleRenderer(html5Renderer).RenderReportItem(rPLContainer, rPLItemMeasurement, new StyleContext(), ref num, renderId: false, treatAsTopLevel); } if (!styleContext.InTablix || renderId) { html5Renderer.WriteStreamCR(HTMLElements.m_closeDiv); } } }
internal override void WriteStartItemToStream(RPLWriter rplWriter, PageContext pageContext) { if (rplWriter != null) { BinaryWriter binaryWriter = rplWriter.BinaryWriter; if (binaryWriter != null) { Stream baseStream = binaryWriter.BaseStream; m_offset = baseStream.Position; binaryWriter.Write((byte)12); WriteElementProps(binaryWriter, rplWriter, pageContext, m_offset + 1); } else if (m_rplElement == null) { m_rplElement = new RPLSubReport(); WriteElementProps(m_rplElement.ElementProps, pageContext); } else { RPLItemProps rplElementProps = m_rplElement.ElementProps as RPLItemProps; m_rplElement = new RPLSubReport(rplElementProps); } } }
private void WriteStartItemToRPLOM(RPLWriter rplWriter, PageContext pageContext) { m_rplElement = new RPLSubReport(); WriteElementProps(m_rplElement.ElementProps, rplWriter, pageContext); }
private static void ReadMeasurement(RPLElement element, ALayout layout, int top, int left, int generationIndex, BlockOutlines blockOutlines, Dictionary <string, ToggleParent> toggleParents, bool suppressOutlines, int elementWidth, string subreportLanguage) { RPLContainer rPLContainer = element as RPLContainer; if (rPLContainer != null) { if (rPLContainer.Children != null) { bool flag = false; int num = 0; RPLSubReport rPLSubReport = element as RPLSubReport; if (rPLSubReport != null) { flag = true; if (!suppressOutlines) { toggleParents = new Dictionary <string, ToggleParent>(); } string language = ((RPLSubReportProps)rPLSubReport.ElementProps).Language; if (!string.IsNullOrEmpty(language)) { subreportLanguage = language; } } int[] array = new int[rPLContainer.Children.Length]; int[] array2 = new int[rPLContainer.Children.Length]; int[] array3 = new int[rPLContainer.Children.Length]; RPLItem[] array4 = new RPLItem[rPLContainer.Children.Length]; for (int i = 0; i < rPLContainer.Children.Length; i++) { RPLItemMeasurement rPLItemMeasurement = rPLContainer.Children[i]; if (0.0 == rPLItemMeasurement.Width && 0.0 == rPLItemMeasurement.Height) { rPLContainer.Children[i] = null; } else { if ((0.0 == rPLItemMeasurement.Width || 0.0 == rPLItemMeasurement.Height) && !(rPLItemMeasurement.Element is RPLLine)) { rPLContainer.Children[i] = null; continue; } int num2 = LayoutConvert.ConvertMMTo20thPoints((double)rPLItemMeasurement.Height); int num3 = 0; if (flag) { num3 = elementWidth; array2[i] = LayoutConvert.ConvertMMTo20thPoints((double)rPLItemMeasurement.Top) + top + num; num += num2; } else { num3 = LayoutConvert.ConvertMMTo20thPoints((double)rPLItemMeasurement.Width); array2[i] = LayoutConvert.ConvertMMTo20thPoints((double)rPLItemMeasurement.Top) + top; } array[i] = num3; array3[i] = LayoutConvert.ConvertMMTo20thPoints((double)rPLItemMeasurement.Left) + left; RPLItem rPLItem = array4[i] = rPLItemMeasurement.Element; byte b = default(byte); RPLItemProps itemProps = layout.RPLReport.GetItemProps(rPLItem.RPLSource, out b); if (b == 7) { RPLTextBoxPropsDef rPLTextBoxPropsDef = (RPLTextBoxPropsDef)itemProps.Definition; if (rPLTextBoxPropsDef.IsSimple) { layout.AddReportItem(rPLItem.RPLSource, array2[i], array3[i], num3, num2, generationIndex, rPLItemMeasurement.State, subreportLanguage, toggleParents); } else { layout.AddReportItem(rPLItem, array2[i], array3[i], num3, num2, generationIndex, rPLItemMeasurement.State, subreportLanguage, toggleParents); } if (!suppressOutlines && rPLTextBoxPropsDef.IsToggleParent && !toggleParents.ContainsKey(rPLTextBoxPropsDef.Name)) { toggleParents.Add(rPLTextBoxPropsDef.Name, new ToggleParent(array2[i], array3[i], num3, num2)); } } else { layout.AddReportItem(rPLItem.RPLSource, array2[i], array3[i], num3, num2, generationIndex, rPLItemMeasurement.State, subreportLanguage, toggleParents); } } } for (int j = 0; j < rPLContainer.Children.Length; j++) { if (rPLContainer.Children[j] != null) { Reader.ReadMeasurement(array4[j], layout, array2[j], array3[j], generationIndex + 1, blockOutlines, toggleParents, suppressOutlines, array[j], subreportLanguage); rPLContainer.Children[j] = null; array4[j] = null; } } rPLContainer.Children = null; } } else { Reader.ReadTablixStructure(element as RPLTablix, layout, top, left, generationIndex, blockOutlines, toggleParents, suppressOutlines, subreportLanguage); } }