Merged FlexReports - Missing pixels

Posted by: thomas.hayashi on 27 December 2019, 12:14 am EST

  • Posted 27 December 2019, 12:14 am EST

    Hello,
    Thanks to this thread, I'm able to perform a merge with multiple reports
    https://www.grapecity.com/forums/winforms-edition/merging-multiple-flexrepor

    I'm not using the exact provided code , however I can see a difference between exporting the original report and the merged one. For now, I only have one example. The export_merged.pdf is cutting some pixels on the word "CORTESIA" (below the word ConvĂȘnio, in the header). While the exact same report exported by itself, does not have those pixels cut off.

    I'm using the following code

    // Exporting by itself
    C1FlexReport c1FlexReport1 = new C1FlexReport();
    c1FlexReport1.Load("..\\..\\1_00001#15684563#CORT^CORT.flxr", "0 - Laudos");
    C1.Win.C1Document.Export.PdfFilter exp = new C1.Win.C1Document.Export.PdfFilter();
    exp.FileName = "export_single.pdf";
    c1FlexReport1.Export(exp);

    //Exporting merged. Even though here is just one report
    List<C1FlexReport> lstRep = new List<C1FlexReport>();
    lstRep.Add(c1FlexReport1);

    C1FlexReport mergeFlex = new C1FlexReport();
    mergeFlex.Sections.PageFooter.Height = 0;
    mergeFlex.Sections.PageHeader.Height = 0;
    mergeFlex.Sections.Header.Height = 0;
    mergeFlex.Sections.Footer.Height = 0;

    mergeFlex.Layout.MarginBottom = 0;
    mergeFlex.Layout.MarginLeft = 0;
    mergeFlex.Layout.MarginRight = 0;
    mergeFlex.Layout.MarginTop = 0;
    mergeFlex.Sections.Detail.AutoHeight = AutoSizeBehavior.GrowAndShrink;
    mergeFlex.Sections.Detail.Visible = true;

    foreach (C1FlexReport flex1 in lstRep)
    {
    //OBS: WITHOUT THIS RENDER THE PAGE COUNT IS ALWAYS ZERO. IS THIS CORRECT ?
    flex1.Render();
    for (int i = 0; i < flex1.PageCount; i++)
    {
    SubSection section = mergeFlex.Sections.Detail.SubSections.Add();
    section.Visible = true;
    section.Height = mergeFlex.Layout.PageSize.Height;
    section.AutoHeight = AutoSizeBehavior.None;
    ImageField img = new ImageField();
    img.Picture = flex1.GetPageImage(i);
    img.Left = 0;
    img.Top = 0;
    img.AutoWidth = AutoSizeBehavior.CanGrow;
    img.AutoHeight = AutoSizeBehavior.GrowAndShrink;
    section.Fields.Add(img);
    }
    }

    C1.Win.C1Document.Export.PdfFilter exp2 = new C1.Win.C1Document.Export.PdfFilter();
    exp2.FileName = "export_merged.pdf";
    mergeFlex.Export(exp2);


    I'm afraid that my clients have custom reports and after doing this merge the final version it's gonna be different. So I'm asking if Is there a way around the code, without touching the report ? Or Am I missing something here ?

    I'm using the 4.0.20193.393 version

    Missing_pixels_merged_flexreport.zip
  • Replied 29 December 2019, 8:20 pm EST

    Hello,

    I could observe the missing pixels in the merged report's PDF export and am investigating on this further(Internal Tracking ID: 414999). Will get back to you once it is done.

    Regards,
    Esha
  • Replied 8 January 2020, 7:29 am EST

    Given that we also work under a schedule, I was asked to check the progress of this thread.

    So is there a estimate date for this ?
  • Replied 8 January 2020, 10:25 pm EST

    Hello,

    As per the development team, the issue cannot be completely fixed. It has been partially fixed in an internal build. ETA for the release of the same is end of March.

    Regards.
  • Replied 14 January 2020, 2:28 am EST

    Hi, thanks for your reply

    I'm afraid that the project cannot wait until end of March to be released. Is there any alternative to this ? It's just a few pixels.
  • Replied 15 January 2020, 2:35 pm EST

    Hi Thomas,

    The team is working to generate a private build for you.
    I will get back to you when we have it ready. I assure that it'll be soon.

    Regards.
  • Marked as Answer

    Replied 28 January 2020, 8:41 pm EST

    Hello,

    The private build has been shared over SupportOne: https://supportone.componentone.com/casedetail/418778.

    Please login using the same credentials you use here on the Grapecity website.

    Regards.
  • Replied 29 January 2020, 12:41 am EST

    I've updated and was able to render correctly. Thank you very much esha.dhir and the team.
  • Replied 17 March 2020, 9:59 pm EST

    Hi,

    I am glad to inform you that the issue has been fixed in the latest release build (i.e. 2020v1). You can get it from the links below:
    http://prerelease.componentone.com/dotnet40/c1winforms/2020-t1/C1WinForms.4_4.0.20201.416.zip
    http://prerelease.componentone.com/dotnet452/c1winform/2020-t1/C1WinForms-452_4.5.20201.416.zip

    Thanks,
    Pragati
Need extra support?

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

Learn More

Forum Channels