MultiDocument for FlexReport

Posted by: luizpapa on 27 September 2017, 9:06 pm EST

    • Post Options:
    • Link

    Posted 27 September 2017, 9:06 pm EST

    Hello,

    Now that C1Report is in the maintenance mode, the lack of some functionality on FlexReport get me worried, specifically the fact that C1MultiDocument won’t work with FlexReport and there is no way to migrate C1Report to FlexReport with the same behavior we have today.

    We have some reports that generate very big reports and we need to render it using the disk, otherwise we get an OutOfMemory exception.

    We also rely heavily on C1MultiDocument ability to receive several C1Documents and render them together to a pdf (maintaining the pages/total pages independently for each document).

    Without these functionality migration to FlexReport would be basically impossible to us…

    How would I know the road map for FlexReport or at least get to know if this functionality is in the road map? Is there an official way to me to request a functionality (in this case to keep the functionality on the refactored component)?

  • Posted 27 September 2017, 9:06 pm EST

    Hi,

    I understand the difficulty that you might have to face while upgrading to FlexReport in this scenario. Please give me some time to talk to the Product Manager. Will get back to you with actual road map for this feature shortly.

    Thanks,

    Pragati

  • Posted 27 September 2017, 9:06 pm EST

    Hi,

    This item is under discussion to be added in roadmap for next year. I will update the thread about the same once I get some information from PM.

    Thanks,

    Pragati

  • Posted 27 March 2018, 5:54 am EST

    Was this ever resolved, Im looking to upgrade from C1Reports but I need to be able to print multiple reports into one document.

  • Posted 4 April 2018, 5:51 am EST

    Have to say i’m quite surprised about this. It seems like you did a good job with FlexReports in that it solves many of our issues we had with C1Reports, but now it seems you are quietly abandoning it?

    Its not mentioned on your website under Reporting Tools which I find strange and as far as I can see there is still no way to print multiple documents into one PDF.

    I have spent two days trying to prove this, but failed and I cannot authorize the purchase of an upgrade until I can prove it fixes all our issues.

    It seems a shame because on the face of it it looks like you have done a lot of work on this subsystem.

  • Posted 6 April 2018, 3:07 am EST

    Hi,

    Is C1MultiDocument functionality added to C1FlexReport?

    Kindly confirm.

    If not, is there any workaround to print multiple C1FlexReports into one Pdf file?

    Thanks

    Zia

  • Posted 18 August 2022, 6:37 am EST

    Is this issue still unresolved or is there now a workaround available?

  • Posted 19 August 2022, 7:23 am EST

    Hi,

    Apologize for the delay in response.

    JFYI, C1MultiDocument is a legacy control and this is not available in C1FlexReport.

    However, If your requirement is to combine all reports into one and save as pdf. Then you can do a workaround for this requirement.

    You need to generate images for all pages of all reports and add to the another report through ImageField.(see code snippet)

    Merge Reports:

    
            /// <summary>
            /// Method to get the merged report
            /// </summary>
            /// <param name="reports"> collection of reports to be merged</param>
            /// <returns></returns>
            private C1FlexReport MergeReports(ObservableCollection<C1FlexReport> reports)
            {
                // create a final report
                var 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;
    
                // Iterate all pages of all reports.
                foreach(var report in reports)
                {
                    for (int i = 0; i < report.PageCount; i++)
                    {
                        // add page image to the final report
                        img = new ImageField();
                        SubSection section = mergeFlex.Sections.Detail.SubSections.Add();
                        section.Visible = true;
                        section.Height = mergeFlex.Layout.PageSize.Height;
                        section.AutoHeight = AutoSizeBehavior.None;
                        img.Picture = report.GetPageImage(i);
                        img.Left = 0;
                        img.Top = 0;
                        img.AutoWidth = AutoSizeBehavior.CanGrow;
                        img.AutoHeight = AutoSizeBehavior.GrowAndShrink;
                        section.Fields.Add(img);
                    }
                }            
                return mergeFlex;
            }
    
    

    Save Merged reports to Pdf:

    
     C1FlexReport mergeFlex = MergeReports(flexReports);
    mergeFlex.Render();
    
    PdfFilter f = new PdfFilter();
    f.FileName = @"..\..\MergedReport.pdf";
    mergeFlex.RenderToFilter(f);
    
    

    Please refer the attached sample for the same: MergeFlexReport.zip

    Best Regards,

    Nitin

Need extra support?

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

Learn More

Forum Channels