internal ChartBase(Report r, Row row, Chart c, MatrixCellEntry[,] m, Expression showTooltips, Expression showTooltipsX, Expression _ToolTipYFormat, Expression _ToolTipXFormat)
 {
     _ChartDefn = c;
     _row = row;
     _DataDefn = m;
     _bm = null;
     int width = _ChartDefn.WidthCalc(r, null);
     int height = RSize.PixelsFromPoints(_ChartDefn.HeightOrOwnerHeight);
     Layout = new ChartLayout(width, height);
     _SeriesBrush = null;
     _SeriesMarker = null;
     _showToolTips = showTooltips.EvaluateBoolean(r, row);
     _showToolTipsX = showTooltipsX.EvaluateBoolean(r, row);
     _tooltipYFormat = _ToolTipYFormat.EvaluateString(r, row);
     _tooltipXFormat = _ToolTipXFormat.EvaluateString(r, row);
 }
 internal ChartPie(Report r, Row row, Chart c, MatrixCellEntry[,] m, Expression showTooltips, Expression showTooltipsX,Expression _ToolTipYFormat, Expression _ToolTipXFormat)
     : base(r, row, c, m, showTooltips, showTooltipsX, _ToolTipYFormat, _ToolTipXFormat)
 {
 }
 public void Chart(Chart c, Row r, ChartBase cb)
 {
 }
        public void Chart(Chart c, Row r, ChartBase cb)
        {
            string relativeName;

            Stream io = _sg.GetIOStream(out relativeName, "png");
            try
            {
                cb.Save(this.r, io, ImageFormat.Png);
            }
            finally
            {
                io.Flush();
                io.Close();
            }

            relativeName = FixupRelativeName(relativeName);

            // Create syntax in a string buffer
            var sw = new StringWriter();

            string bookmark = c.BookmarkValue(this.r, r);
            if (bookmark != null)
                sw.WriteLine("<div id=\"{0}\">", bookmark); // can't use the table id since we're using for css style

            string cssName = CssAdd(c.Style, c, null); // get the style name for this item

            sw.Write("<img src=\"{0}\" class='{1}'", relativeName, cssName);
            string tooltip = c.ToolTipValue(this.r, r);
            if (tooltip != null)
                sw.Write(" alt=\"{0}\"", tooltip);
            if (c.Height != null)
                sw.Write(" height=\"{0}\"", c.Height.PixelsY.ToString());
            if (c.Width != null)
                sw.Write(" width=\"{0}\"", c.Width.PixelsX.ToString());
            sw.Write(">");
            if (bookmark != null)
                sw.Write("</div>");

            tw.Write(Action(c.Action, r, sw.ToString(), tooltip));

            return;
        }
        public void Chart(Chart c, Row row, ChartBase cb)
        {
            System.Drawing.Image im = cb.Image(r);

            PutImage(im, im.Width, im.Height);

            if (InTable(c))
                tw.Write(@"\cell");
        }
        List<ReportItem> _Items; // list of report items

        #endregion Fields

        #region Constructors

        internal ReportItems(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            ReportItem ri;
            _Items = new List<ReportItem>();

            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                switch (xNodeLoop.Name)
                {
                    case "Rectangle":
                        ri = new Rectangle(r, this, xNodeLoop);
                        break;
                    case "Line":
                        ri = new Line(r, this, xNodeLoop);
                        break;
                    case "Textbox":
                        ri = new Textbox(r, this, xNodeLoop);
                        break;
                    case "Image":
                        ri = new Image(r, this, xNodeLoop);
                        break;
                    case "Subreport":
                        ri = new Subreport(r, this, xNodeLoop);
                        break;
                    // DataRegions: list, table, matrix, chart
                    case "List":
                        ri = new List(r, this, xNodeLoop);
                        break;
                    case "Table":
                    case "Grid":
                    case "fyi:Grid":
                        ri = new Table(r, this, xNodeLoop);
                        break;
                    case "Matrix":
                        ri = new Matrix(r, this, xNodeLoop);
                        break;
                    case "Chart":
                        ri = new Chart(r, this, xNodeLoop);
                        break;
                    case "ChartExpression":		// For internal use only
                        ri = new ChartExpression(r, this, xNodeLoop);
                        break;
                    case "CustomReportItem":
                        ri = new CustomReportItem(r, this, xNodeLoop);
                        break;
                    default:
                        ri=null;		// don't know what this is
                        // don't know this element - log it
                        OwnerReport.rl.LogError(4, "Unknown ReportItems element '" + xNodeLoop.Name + "' ignored.");
                        break;
                }
                if (ri != null)
                {
                    _Items.Add(ri);
                }
            }
            if (_Items.Count == 0)
                OwnerReport.rl.LogError(8, "At least one item must be in the ReportItems.");
            else
                _Items.TrimExcess();
        }