FastReport icon indicating copy to clipboard operation
FastReport copied to clipboard

Did FR Open Source have Report-Viewer (Preview) component? or just show images for each page?

Open matanyacohen opened this issue 4 years ago • 1 comments

I digging in demo folder, like WinFormsOpenSourceViewer. I supposed to find code use with some 'Report Viewer' component.
instead, I find export to image, and brows between images. See code bellow.

My questions is:

  1. FastReport not have Report Viewer?
  2. Export Pdf is Text? or just image of pages sit in PDF?

Thenks

private void toolStripOpnBtn_Click(object sender, EventArgs e)
        {
            using (OpenFileDialog dialog = new OpenFileDialog())
            {
                dialog.Filter = "Prapared reprt(*.fpx)|*.fpx";
                dialog.Multiselect = false;
                if (dialog.ShowDialog() == DialogResult.OK)
                {                   
                    Report.LoadPrepared(dialog.FileName);
                    ReportExport();
                    ShowReport();
                }
            }
        }

        public void ReportExport()
        {
            DeleteTempFiles();
                exp.ImageFormat = ImageExportFormat.Png; //Устанавливаем для изображения формат png
                exp.Export(Report, Directory.GetCurrentDirectory() + "/" + System.Guid.NewGuid() + ".png"); //Выполняем экспорт отчета в файл
                foreach (string fileName in exp.GeneratedFiles)
                {
                    using (var img = File.OpenRead(fileName))
                    {
                        pages.Add(Image.FromStream(img));
                    }
                }
                CurrentPage = 0;
        }

matanyacohen avatar Jul 25 '22 20:07 matanyacohen

  1. There is no such possibility
  2. In open source, the export to PDF takes place in an image. Export to text is only available in the paid version. See here: https://www.fast-report.com/en/fast-report-comparison/

alexsherkhan avatar Oct 24 '22 12:10 alexsherkhan