Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1055
Remove page break from report section
posted

Hi,

i want to print a web chart with two tables on a single page. First I add the chart to the section:

System.Drawing.Graphics graphics = section.AddCanvas().CreateGraphics();

chart.RenderPdfFriendlyGraphics(graphics, (int)targetWidth, (int)targetHeight);

Then I add two tables to the same section:

ITable reportTable = section.AddTable();

After that, I get a pdf with the expacted content but on two diffrent pages. Any ideas how to prevent the page break?

pdf.zip
Parents
No Data
Reply
  • 1055
    Verified Answer
    posted

    Oh, yesterday was not my day. The answer is very simple:

    ICanvas canvas = section.AddCanvas();
    canvas.Height = new Infragistics.Documents.Report.FixedHeight((int)targetHeight);
    System.Drawing.Graphics infraGraphics = canvas.CreateGraphics();

    chart.RenderPdfFriendlyGraphics(infraGraphics, (int)targetWidth, (int)targetHeight);
    
Children
No Data