On ActiveReport v6, when print, my landscaping report's bottom on left

Posted by: bin.zhou on 15 September 2021, 3:27 pm EST

  • Posted 15 September 2021, 3:27 pm EST

    I have a landscaping report, but, when print, the report bottom has been printed on the left of the page (A4), however, I want the report bottom part to print on right side of the page.

    But, when I convert it PDF, the pdf seems print correctly.

    Is there any setting or code to tweak that?


  • Posted 16 September 2021, 9:47 am EST


    I think I may better to attach an example, the test.zip which includes test.rdf file, unfortunately, I can’t see the issue from the RDF viewer, it must be print out by physical printer, I did the test on office print - Brother MFC 9140CDN.

    I use duplex mode, so, it will print page both front and back.

    so, basically, the first 2 pages are ok, seems they are portrait. Then after that, the landscape pages (3,4,5,6) are all rotate to the wrong angle (bottom on left side of the page), it causes following portrait pages (7,8,9,10) upside down. If on 3,4,5,6 they rotate to right (bottom on right side of the page), then following 7,8,9,10 will be ok.

    but, exported to PDF format and print it is ok.

    This scenario only happens on duplex mode, it looks like the first 2 pages affect the following pages. So, if you just print the first 3 pages, you can see the issue already.

  • Posted 21 September 2021, 2:48 am EST


    Have you written any code to print the code in both portrait/landscape mode? if yes, then please share.

    Also, AR6 is very old version now, we do not support it. I suggest you to upgrade to our latest version i.e AR15.



  • Posted 29 September 2021, 8:17 am EST

    Sorry to reply later, I just prepared some code as below:

    ActiveReport rpt = new ActiveReport();
            Page blankPage = new Page
                Height = 11.69f,
                Width = 8.27f,
            blankPage.Margins.Left = 0.45f;
            blankPage.Margins.Right = 0.1f;
            blankPage.Margins.Top = 0.3f;
            blankPage.Margins.Bottom = 0.3f;
            blankPage.DrawText("-- Portrait --", new RectangleF(3.0F, 3.0F, 3.0f,1.0f));
            Page blankPage3 = new Page
                Height = 11.69f,
                Width = 8.27f,
                Orientation = PageOrientation.Portrait,
            blankPage3.Margins.Left = 0.45f;
            blankPage3.Margins.Right = 0.1f;
            blankPage3.Margins.Top = 0.3f;
            blankPage3.Margins.Bottom = 0.3f;
            blankPage3.DrawText("-- Portrait --", new RectangleF(3.0F, 3.0F, 3.0f, 1.0f));
            Page blankPage2 = new Page
                Width = 11.69f,
                Height = 8.27f,
                Orientation = PageOrientation.Landscape,
            blankPage2.Margins.Left = 0.2f;
            blankPage2.Margins.Right = 0.2f;
            blankPage2.Margins.Top = 0.2f;
            blankPage2.Margins.Bottom = 0.2f;
            blankPage2.DrawText("-- Landscape --", new RectangleF(3.0F, 3.0F, 3.0f,1.0f));
    Basically, there are 3 pages, first 2 pages use portrait layout, the last page use landscape layout, xyz.rdf the merged file.
    This need to be tested in the real printer with [b]duplex [/b]mode.
    The first 2 pages are ok, but, the last page is rotated. the words should face to the bottom of the page, you can see the difference by commenting first 2 pages code, just leave last page code and just print out the last page. The difference is obvious.
    I am using ActiveReport6. Thanks.
  • Posted 29 September 2021, 11:49 am EST

    I just tweak the code, and even in ActiveReport V11, I can see the issue.

    // Create a new Section report instance
                GrapeCity.ActiveReports.SectionReport sectionReport = new GrapeCity.ActiveReports.SectionReport();
                // Create a Detail section
                sectionReport.Sections.Add(GrapeCity.ActiveReports.Document.Section.SectionType.Detail, "Body");
                sectionReport.PageSettings.Orientation = GrapeCity.ActiveReports.Document.Section.PageOrientation.Portrait;
                // Add a textbox to your Section report
                GrapeCity.ActiveReports.SectionReportModel.TextBox textbox1 = new GrapeCity.ActiveReports.SectionReportModel.TextBox();
                textbox1.Name = "TextBox1";
                textbox1.Height = 1.5F;
                textbox1.Width = 10F;
                textbox1.Left = 0.5F;
                textbox1.Top = 0.5F;
                textbox1.Value = "Sample Section Report1";
                // Load the Section report in the Viewer
                GrapeCity.ActiveReports.SectionReport sectionReport2 = new GrapeCity.ActiveReports.SectionReport();
                // Create a Detail section
                sectionReport2.Sections.Add(GrapeCity.ActiveReports.Document.Section.SectionType.Detail, "Body");
                sectionReport2.PageSettings.Orientation = GrapeCity.ActiveReports.Document.Section.PageOrientation.Landscape;
                // Add a textbox to your Section report
                GrapeCity.ActiveReports.SectionReportModel.TextBox textbox2 = new GrapeCity.ActiveReports.SectionReportModel.TextBox();
                textbox2.Name = "TextBox2";
                textbox2.Height = 1.5F;
                textbox2.Width = 10F;
                textbox2.Left = 0.5F;
                textbox2.Top = 0.5F;
                textbox2.Value = "Sample Section Report2";
                // Load the Section report in the Viewer

    There are 2 reports, one use portrait and follow by landscape, the landscape one will rotate, which I think relates with first portrait layout, however, if you just print 2nd page, it looks fine.

    so, for testing, still using duplex mode , first print all pages, second, print the 2nd (last) page only, then compare these 2 landscape pages, you can see the difference.

    Am I doing something wrong, could you please help me to figure it out? I just want to simply mix portrait with landscape, but landscape need keep consistence.


  • Posted 29 September 2021, 1:07 pm EST

    I re-use the same code which on AR v11 => AR v15, same result, just print landscape page is fine, but not after merging with portrait.


  • Posted 13 October 2021, 4:06 pm EST


    Your query has been replied to on the case that you have opened on our different support portal.



Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels