Load FPX Prepared Report in PreviewControl

Hello everyone!

I'm generating prepared reports and want to allow people to view the prepared reports but I can't seem to get them to load in the PreviewControl.

Has anyone done this or know what I have to do differently to do this?

I appreciate the help!

Comments

  • I figured this out so I wanted to post the solution in case anyone else needed it:

    // push to fastreport

                       FastReport.Report report = new FastReport.Report();


                       //Get Directory for Reports

                       string appdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);

                       string FileString = @"\...\....\....\File.fpx";

                       string directoryString = appdata + FileString;

                       report.Load(directoryString);

                       report.Preview = ReportPreviewControl;

                       report.Prepare();

                       report.ShowPrepared();

                       report.Preview.ZoomPageWidth();

                       ReportPreviewControl.Update();

Leave a Comment