TfrxPreviewX & VB6

Hello

Really would appreciate anyone giving this newbie with Fast Reports a helping hand. Trying to use the TfrxPreviewX component within VB6 so that I can preview a report on a form.

Looked through the forum / manual but can't get to grips with it.
Dim TfrxPreviewX1 As FastReport.TfrxPreviewX
Dim Rpt As FastReport.TfrxReport

    
Private Sub Form_Load()



Set Rpt = TfrxReport.Create(Nil) <<<Error 91 here

Rpt.PreviewOptions.Maximized = False
Rpt.PreviewOptions.Modal = False
Rpt.LoadFromFile ("C:\Program Files (x86)\FastReports\FastReport Studio\Examples\VisualBasic\VB6_Demo\ADOQuery_Casting\Casting.fr3")
Call Rpt.PrepareReport(True)
Call Rpt.ShowPreparedReport



End Sub

I get a Error 91 Object Required.

Thanks

Comments

  • gpigpi
    edited 12:34PM
    Try
    Set Rpt = CreateObject("FastReport.TfrxReport")
    

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.