HOW TO ADD BUTTONS TO THE TOOLBAR FOR SAVING, EXPORTING AND OPENING REPORTS.

Posted by: fazeelamjad on 4 August 2017, 3:10 pm EST

  • Posted 4 August 2017, 3:10 pm EST

    Hi,

    I am working around to make a form having ArViewer to view reports and give common funcitonality to the users for saving, opening, exporting reports to different format e.g. PDF, Excel, Text etc.

    Please explain this all with an example.

    Thanks

  • Replied 4 August 2017, 3:10 pm EST

    I checked the manual and found an example but this disables the default print button on the toolbar.
    how to manage this.

    please explain.

    Fazeel Amjad
  • Replied 4 August 2017, 3:10 pm EST

    Thank you for your question. The a tools AddIcon method accepts a StdPicture so as long as that is what is contained in your image list it should work well. Please see the attached sample for a demonstration.

    Thanks,
        Eric


    2008/04/TestIMG.zip
  • Replied 4 August 2017, 3:10 pm EST

    Also, if you are not using ICO files in your ImageList, you may see an error message like the following: Method "AddIcon" of object "IDDTool" failed. This can be avoided by calling the ExtractIcon function of a ListImage to return the proper image format (ICO) for a DDTool object.

        Viewer.Toolbar.Tools.Insert 1, "My Tool"
        Viewer.Toolbar.Tools(1).AddIcon MyImageList.ListImages(1).ExtractIcon
        Viewer.Toolbar.Tools(1).Style = 2
        Viewer.Toolbar.Tools(1).Tooltip = "My Tool"

  • Replied 4 August 2017, 3:10 pm EST

    Thanks for your help.


    In the sample attached i can see the default print button is disabled.


    I asked the same question before this post. Is there any way to add buttons to the viewer control and make the print button enable.


    thanks

  • Replied 4 August 2017, 3:10 pm EST

    Well I have figured this now. If viewer has pages inside then print button comes enabled.


    I have tried the same technique with AR Reports beside viewer. I am using reports to be shown as forms. Buttons added to the reports successfully, but print button gets disabled. What is the solution for that.


    Thanks

  • Replied 4 August 2017, 3:10 pm EST

    What state is the viewer/report form in when the print button is disabled? If the report is still generating pages, the print button should remain disabled. Once the report has completed processing, it should enable the print button.
  • Replied 4 August 2017, 3:10 pm EST

    In the example of adding custom buttons to the toolbar of the Viewer Control LoadPicture method is used to loadicons to the toolbar button.

    Can we load images from an ImageList.

    Fazeel Amjad
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels