Skip to content

There is an issue with the function report.Export(image, stream). When exporting as a MetaFile, the obtained stream is incorrect. #785

Open

Description

@allen3371

**version :2026.1.0

When exporting to a PNG stream, the following code works correctly, and the data in the stream can be properly converted into a PNG file:

report.Load(reportFullName);
report.RegisterData(dt, "MyDataSource");
report.Prepare();
ImageExport image = new ImageExport();
image.ImageFormat = ImageExportFormat.Png;
image.Resolution = 300;
image.SeparateFiles = true;
var fn = $"report.png";
MemoryStream ms = new MemoryStream();
report.Export(image, ms);
ms.Position = 0;
var i = Image.FromStream(ms);
i.Save(fn, ImageFormat.Png);

However, when exporting as a MetaFile, the following code results in a blank file:

report.Load(reportFullName);
report.RegisterData(dt, "MyDataSource");
report.Prepare();
ImageExport image = new ImageExport();
image.ImageFormat = ImageExportFormat.Metafile;
image.Resolution = 300;
image.SeparateFiles = true;
var fn = $"report.emf";
MemoryStream ms = new MemoryStream();
report.Export(image, ms);
ms.Position = 0;
var i = Image.FromStream(ms);
i.Save(fn, ImageFormat.Emf); // This produces a completely white EMF file here`

Activity

  1. BogdanStg commented on Nov 7, 2025

    @BogdanStg

    Hello!

    Thank you for your appeal!

    At the moment our developers are working on solving the problem of such a request, as soon as the changes will be available, we will immediately inform you!

    Best regards,
    Bogdan

  2. BogdanStg commented on Aug 19, 2026

    @BogdanStg

    Hello!

    Thank you for your patience!

    Our developers have managed to resolve the issue you raised; please look out for the changes in the next version of FastReport OpenSource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions