Skip navigation links
Dashboard

Class JasperViewerWidget

Inheritance:
    • Method Detail

      • clone

        public JasperViewerWidget clone()

        An internal method used by the Dashboard class to clone a category widget so that it may be displayed in a popped out window

        Returns:
        A cloned version of the original widget
      • create

        public void create(BBjChildWindow p_widgetControlWindow!)

        Creates the JasperViewerWidget

        Parameters:
        p_widgetControlWindow! The BBjChildWindow that will contain the widget
      • destroy

        public void destroy()

        Destroys the JasperViewerWidget

      • display

        public void display(BBjNumber p_display)

        Sets the widget's visibility

        Parameters:
        p_display TRUE (1) to make the widget visible, FALSE (0) to hide it
      • getFitType

        public BBjNumber getFitType()

        getFitType Returns the FitType for the report (FIT_TYPE_ACTUAL, FIT_TYPE_WIDTH, FIT_TYPE_PAGE)

        Returns:
        The report's FitType
        See Also:
        BBJasperViewerControl::getFitType() for information on the fit type options
        Since:
        BBj 18.20
      • getHasToolBar

        public BBjNumber getHasToolBar()

        Returns whether the widget is using a BBJasperViewerControl with a toolbar or a BBJasperView without a toolbar

        Returns:
        A number acting as a boolean that determines whether the toolbar is present (0=Widget does NOT have Jasper ToolBar, 1=widget DOES have Jasper ToolBar)
        See Also:
        BBJasperView for information on the BBJasperView and its methods
        Since:
        18.20
      • getReport

        public BBJasperReport getReport()

        getReport Returns the BBJasperReport for the widget

        This method is typically used in custom callback code as a result of a refresh or a filter selection event on the DashboardWidget. Your callback code can get the DashboardWidget from the custom event and get the JasperViewerWidget from that. Calling this method gives you the underlying BBJasperReport, from which you can get/set the report's parameters to modify what the report displays or export the report to a variety of different formats.

        Returns:
        The widget's BBJasperReport
        See Also:
        BBJasperReport for information on the BBJasperReport and its methods
      • getView

        public BBJasperView getView()

        getView Returns the BBJasperView for the widget

        Returns:
        BBJasperView for the widget
        See Also:
        BBJasperView for information on the BBJasperView and its methods
        Since:
        18.20
      • getViewerControl

        public BBJasperViewerControl getViewerControl()

        getViewerControl Returns the BBJasperViewerControl for the widget

        As of BBj 18.20, the JasperViewerWidget may not contain a toolbar when the widget is very small, which indicates that it's implemented using a BBJasperView instead of a BBJasperViewerControl. Therefore, it may be more desireable to use the getView() method which returns the BBJasperView that's always available, regardless of the internal implementation.

        Returns:
        BBJasperViewerControl for the widget
        See Also:
        BBJasperViewerControl for information on the BBJasperViewerControl and its methods
      • isDestroyed

        public BBjNumber isDestroyed()

        Returns if the JasperViewerWidget is destroyed

        Returns:
        Returns 1 if destroyed, otherwise 0 is returned
      • OnViewerControlEvent

        public void OnViewerControlEvent(BBjSysGuiEvent p_event!)

        An internal method that is called when the user initiates an event on a JasperViewerWidget's control for which a callback event has been registered

      • refresh

        public void refresh()

        Refreshes the widget's underlying BBJasperView control

        If the JasperViewerWidget was constructed with a BBJasperReport object, then the report will not be refilled. If you created the widget with a BBJasperReport you must register for the refresh callback event and refill the report yourself if you want the report to be updated when the widget is refreshed.

        If the widget was constructed with a report file, connection string, and parameter list then the widet will refill the report automatically whenever the widget is refreshed.

        See Also:
        BBJasperViewerControl for information on the BBJasperViewerControl and its methods
      • resize

        public void resize(BBjNumber p_width, BBjNumber p_height)

        Resizes the widget using the provided with and height

        Parameters:
        p_width Width of the widget
        p_height Height of the widget
      • setCallback

        public void setCallback(BBjString p_name$, BBjNumber p_event, BBjString p_callbackRoutine$)

        setCallback Sets a callback for the widget, given a control name, control event, and a callback routine

        Parameters:
        p_name$ Control name
        p_event Control event that will trigger the callback
        p_callbackRoutine$ Routine name to callback when the event occurs on the control
      • setCallback

        public void setCallback(BBjString p_name$, BBjNumber p_event, CustomObject p_callbackObject!, BBjString p_callbackRoutine$)

        setCallback Sets a callback for the widget, given a control name, control event, callback object, and a callback routine

        Parameters:
        p_name$ Control name
        p_event Control event that will trigger the callback
        p_callbackObject Object to callback when the event occurs on the control
        p_callbackRoutine$ Routine name to callback when the event occurs on the control
      • setFitType

        public void setFitType(BBjNumber p_fitType)

        setFitType Sets the report image to fit the widget based on the provided fit type

        The fit type can be set using static field variables like BBJasperViewerControl.getFIT_TYPE_ACTUAL(), BBJasperViewerControl.getFIT_TYPE_PAGE(), or BBJasperViewerControl.getFIT_TYPE_WIDTH().

        Parameters:
        p_fitType Specifies one the following fit types: FIT_TYPE_ACTUAL, FIT_TYPE_WIDTH, FIT_TYPE_PAGE
        See Also:
        BBJasperViewerControl::setFitType() for information on the fit type options
        Since:
        BBj 18.20
      • setHasToolBar

        public void setHasToolBar(BBjNumber p_showToolBar)

        Sets whether the widget should use a BBJasperViewerControl with a toolbar or a BBJasperView without a toolbar

        Parameters:
        p_showToolBar A number acting as a boolean that determines whether the toolbar is present (0=Widget does NOT have Jasper ToolBar, 1=widget DOES have Jasper ToolBar)
        See Also:
        BBJasperView for information on the BBJasperView and its methods
        Since:
        18.20
      • setReport

        public void setReport(BBJasperReport p_report!)

        setReport Sets the BBJasperReport for the widget

        Parameters:
        p_report! The BBJasperReport that contains report information for the widget
        See Also:
        BBJasperReport for information on the BBJasperReport