New pdf file save after for every group

I am succefuuly able to create report with groups.


I just want that for every group a seperate pdf report/file is automatically exported.


How to get this done


For every group a sperate pdf automatically.


Means If i have 100 groups in my one report then I want 100 pdfs for seperate groups seperate pdf.

Comments

  • Unfortunately, this functionality is not supported.

  • Hello!

    FastReport .NET does not have a built-in button to “export each group into 100 separate PDF files with a single call to Export(),” but this task can be easily accomplished with a short loop in C# / VB.NET:

    foreach (var groupKey in distinctGroups)
    {
    report.SetParameterValue(“GroupKey”, groupKey); // Filter on DataBand: [T.Grp] == [GroupKey]
    report.Prepare();
    using var pdf = new PDFExport { ShowProgress = false };
    report.Export(pdf, Path.Combine(outDir, $“group_{groupKey}.pdf”));
    }
    

    An alternative method that avoids repeated database queries is to generate a single report with `GroupHeader.StartNewPage = true` and export page ranges (`pdf.PageRange = PageRange.PageNumbers; pdf.PageNumbers = “1-3”;`) based on the page numbers of each group.

This discussion has been closed.