how to edit Preview Toolbar's Buttons?

edited 12:33PM in FastReport .NET
Hello,

I want to edit the report Preview Toolbar's Buttons,my codes are below:

Dim objFRT As New FastReport.Report

objFRT.Load("test.frx")
objFRT.Preview.Buttons = FastReport.PreviewButtons.Close + FastReport.PreviewButtons.Print 'error occured when running
objFRT.Show()

Any solution?

Thanks.

BTW:Sorry for my bad english.

VB2005+SP1,.NET Framework 2.0+SP1

Comments

  • StarkStark Syria
    edited June 2010
    Hi , have a good day
    I am Not a VB person but I think you should replace + with Or

    More over you must assign your buttons in the EnvironmentSetting Control
    Like :
    // Call this before loading your report
    FastReport.EnvironmentSettings fsetting = new FastReport.EnvironmentSettings();
    fsetting.PreviewSettings.Buttons = FastReport.PreviewButtons.All | FastReport.PreviewButtons.Close;
    


    objFRT.Load("test.frx")
    objFRT.Preview.Buttons = FastReport.PreviewButtons.Close Or FastReport.PreviewButtons.Print 
    objFRT.Show()
    

    Hope this help
  • edited 12:33PM
    Stark wrote: »
    Hi , have a good day
    I am Not a VB person but I think you should replace + with Or

    More over you must assign your buttons in the EnvironmentSetting Control
    Like :
    // Call this before loading your report
    FastReport.EnvironmentSettings fsetting = new FastReport.EnvironmentSettings();
    fsetting.PreviewSettings.Buttons = FastReport.PreviewButtons.All | FastReport.PreviewButtons.Close;
    


    objFRT.Load("test.frx")
    objFRT.Preview.Buttons = FastReport.PreviewButtons.Close Or FastReport.PreviewButtons.Print 
    objFRT.Show()
    

    Hope this help


    It's work fine.

    Thanks a lot.

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.