public class JasperViewerWidget extends BaseWidget implements RefreshableWidget
JasperViewerWidget A Dashboard Utility Widget that displays JasperReport where the user can view, perform drill downs, print and save reports to disk in various formats
Constructor and Description |
---|
JasperViewerWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$) Constructor Constructs a JasperViewerWidget given a name, preview text, preview image, but without a BBJasperReport object. You can call the setReport() method later to set the BBJasperReport for this widget. |
JasperViewerWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$, BBJasperReport p_report!) Constructor Constructs a JasperViewerWidget given a name, preview text, preview image, and a BBJasperReport object This constructor is less efficient than the versions that take a report file, connection string, and parameter list as your code must create and fill the report before displaying the dashboard. Constructing the widget with this method also requires that you register for the refresh callback event and refill the report yourself if you want the report to be updated when the widget is refreshed. |
JasperViewerWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$, BBjString p_reportFile$, BBjString p_connectString$, HashMap p_params!) Constructor Constructs a JasperViewerWidget given a name, preview text, preview image, and parameters so that the Dashboard Utility can create and fill the report before it displays the widget This constructor is more efficient than the versions that take a BBJasperReport object as the Dashboard Utility will create and fill the report just before displaying the widget. The other methods require that you create and fill the report before the dashboard is displayed, even if the widget is not on the first tab and will never be displayed. Additionally, creating the widget with this constructor will refill the report automatically whenever the widget is refreshed. Constructing the widget with the BBJasperReport object requires that you register for the refresh callback event and refill the report yourself if you want the report to be updated when the widget is refreshed. |
Modifier and Type | Method and Description |
---|---|
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 |
void | create(BBjChildWindow p_widgetControlWindow!) Creates the JasperViewerWidget |
void | destroy() Destroys the JasperViewerWidget |
void | display(BBjNumber p_display) Sets the widget's visibility |
BBjNumber | getFitType() getFitType Returns the FitType for the report (FIT_TYPE_ACTUAL, FIT_TYPE_WIDTH, FIT_TYPE_PAGE) |
BBjNumber | getHasToolBar() Returns whether the widget is using a BBJasperViewerControl with a toolbar or a BBJasperView without a toolbar |
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. |
BBJasperView | getView() getView Returns the BBJasperView for the widget |
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. |
BBjNumber | isDestroyed() Returns if the JasperViewerWidget is destroyed |
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 |
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. |
void | resize(BBjNumber p_width, BBjNumber p_height) Resizes the widget using the provided with and height |
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 |
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 |
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(). |
void | setHasToolBar(BBjNumber p_showToolBar) Sets whether the widget should use a BBJasperViewerControl with a toolbar or a BBJasperView without a toolbar |
void | setReport(BBJasperReport p_report!) setReport Sets the BBJasperReport for the widget |
active, destroy, getClientSlash, getFillError, getFillErrorDesc, getImage, getImage, imageFileSaveDialog, isDestroyed, logError, name, previewImage, previewText, setActive, setFillErrorDisplayImage, setFillErrorDisplayText, setLastSaveDir, spacesValid, title
public static BBjString ACTUAL_SIZE_MENU_ITEM_NAME$=BBJasperView.getACTUAL_SIZE_MENU_ITEM_NAME()
Actual size menu item name
public BBjNumber ActualSize=-1
Actual size
public static BBjString CONTROL_CHILD_WINDOW_NAME$=BBJasperViewerControl.getCONTROL_CHILD_WINDOW_NAME()
Viewer control child window name
public static BBjString CREATE_IMAGE_TOOL_BUTTON_NAME$=BBJasperViewerControl.getCREATE_IMAGE_TOOL_BUTTON_NAME()
Create imaage tool button name
public static BBjString CUSTOM_PAGE_MENU_ITEM_NAME$=BBJasperView.getCUSTOM_PAGE_MENU_ITEM_NAME()
Custom page menu item name
public static BBjString CUSTOM_ZOOM_MENU_ITEM_NAME$=BBJasperView.getCUSTOM_ZOOM_MENU_ITEM_NAME()
Custom zoom menu item name
public BBjNumber DefaultSaveContributor=-1
Contributor that will be used by default on a save
public BBjString DefaultSaveFile!
File that will be used by default on a save
public BBjString DefaultSaveFolder!
Folder that will be used by default on a save
public static BBjString EMAIL_MENU_ITEM_NAME$=BBJasperView.getEMAIL_MENU_ITEM_NAME()
Email menu item name
public static BBjString EMAIL_TOOL_BUTTON_NAME$=BBJasperViewerControl.getEMAIL_TOOL_BUTTON_NAME()
Email tool button name
public static BBjString FILE_SAVE_NAME$
File save name
public static BBjString FIND_MENU_ITEM_NAME$=BBJasperView.getFIND_MENU_ITEM_NAME()
Find menu item name
public static BBjString FIND_NEXT_MENU_ITEM_NAME$=BBJasperView.getFIND_NEXT_MENU_ITEM_NAME()
Find next menu item name
public static BBjString FIND_PREVIOUS_MENU_ITEM_NAME$=BBJasperView.getFIND_PREVIOUS_MENU_ITEM_NAME()
Find previous menu item name
public static BBjString FIND_TOOL_BUTTON_NAME$=BBJasperViewerControl.getFIND_TOOL_BUTTON_NAME()
Find tool button name
public static BBjString FIRST_PAGE_MENU_ITEM_NAME$=BBJasperView.getFIRST_PAGE_MENU_ITEM_NAME()
First page menu item name
public static BBjString FIRST_PAGE_TOOL_BUTTON_NAME$=BBJasperViewerControl.getFIRST_PAGE_TOOL_BUTTON_NAME()
First page tool button name
public static BBjString FIT_ACTUAL_SIZE_TOOL_BUTTON_NAME$=BBJasperViewerControl.getFIT_ACTUAL_SIZE_TOOL_BUTTON_NAME()
Fit actual size tool button name
public static BBjString FIT_PAGE_MENU_ITEM_NAME$=BBJasperView.getFIT_PAGE_MENU_ITEM_NAME()
Fit page menu item name
public static BBjString FIT_PAGE_TOOL_BUTTON_NAME$=BBJasperViewerControl.getFIT_PAGE_TOOL_BUTTON_NAME()
Fit page tool button name
public static BBjString FIT_WIDTH_MENU_ITEM_NAME$=BBJasperView.getFIT_WIDTH_MENU_ITEM_NAME()
Fit width menu item name
public static BBjString FIT_WIDTH_TOOL_BUTTON_NAME$=BBJasperViewerControl.getFIT_WIDTH_TOOL_BUTTON_NAME()
Fit width tool button name
public BBjNumber FitPage=-1
Fit page
public BBjNumber FitWidth=1
Fit width
public static BBjString GOOGLE_DOC_SAVE_NAME$
Google Doc save notify name
public BBjString GoogleDefaultDocument!
Document that will be used by default on a google doc save
public BBjString GoogleDefaultFolder!
Folder that will be used by default on a google doc save
public BBjString GoogleDefaultType!
Type that will be used by default on a google doc save
public BBjNumber Height
Height
public static BBjString LAST_PAGE_MENU_ITEM_NAME$=BBJasperView.getLAST_PAGE_MENU_ITEM_NAME()
Last page menu item name
public static BBjString LAST_PAGE_TOOL_BUTTON_NAME$=BBJasperViewerControl.getLAST_PAGE_TOOL_BUTTON_NAME()
Last page tool button name
public static BBjString NEXT_PAGE_MENU_ITEM_NAME$=BBJasperView.getNEXT_PAGE_MENU_ITEM_NAME()
Next page menu item name
public static BBjString NEXT_PAGE_TOOL_BUTTON_NAME$=BBJasperViewerControl.getNEXT_PAGE_TOOL_BUTTON_NAME()
Next page tool button name
public static BBjNumber ON_FILE_SAVE_NOTIFY
File save notify event
public static BBjNumber ON_GOOGLE_DOC_SAVE_NOTIFY
Google Doc save notify event
public BBjNumber Page=-1
Page to display
public static BBjString PAGE_NUMBER_INPUTN_NAME$=BBJasperViewerControl.getPAGE_NUMBER_INPUTN_NAME()
Page number inputn name
public static BBjString PREVIOUS_PAGE_MENU_ITEM_NAME$=BBJasperView.getPREVIOUS_PAGE_MENU_ITEM_NAME()
Previous page menu item name
public static BBjString PREVIOUS_PAGE_TOOL_BUTTON_NAME$=BBJasperViewerControl.getPREVIOUS_PAGE_TOOL_BUTTON_NAME()
Previous page tool button name
public static BBjString PRINT_MENU_ITEM_NAME$=BBJasperView.getPRINT_MENU_ITEM_NAME()
Print menu item name
public static BBjString PRINT_TOOL_BUTTON_NAME$=BBJasperViewerControl.getPRINT_TOOL_BUTTON_NAME()
Print tool button name
public static BBjString RELOAD_MENU_ITEM_NAME$=BBJasperView.getRELOAD_MENU_ITEM_NAME()
Reload menu item name
public static BBjString RELOAD_TOOL_BUTTON_NAME$=BBJasperViewerControl.getRELOAD_TOOL_BUTTON_NAME()
Reload tool button name
public static BBjString SAVE_AS_GOOGLE_DOCUMENT_MENU_ITEM_NAME$=BBJasperViewerControl.getSAVE_AS_GOOGLE_DOCUMENT_MENU_ITEM_NAME()
Save as google docment item name
public static BBjString SAVE_AS_MENU_ITEM_NAME$=BBJasperViewerControl.getSAVE_AS_MENU_ITEM_NAME()
Save as menu item name
public static BBjString SAVE_IMAGE_MENU_ITEM_NAME$=BBJasperView.getSAVE_IMAGE_MENU_ITEM_NAME()
Find previous menu item name
public static BBjString SAVE_MENU_BUTTON_NAME$=BBJasperViewerControl.getSAVE_MENU_BUTTON_NAME()
Save menu button name
public static BBjString SAVE_MENU_ITEM_NAME$=BBJasperViewerControl.getSAVE_MENU_ITEM_NAME()
Save menu item name
public static BBjString STATUS_BAR_NAME$=BBJasperViewerControl.getSTATUS_BAR_NAME()
Status bar name
public static BBjString TOOL_BAR_CHILD_WINDOW_NAME$=BBJasperViewerControl.getTOOL_BAR_CHILD_WINDOW_NAME()
Tool bar child window name
public BBjNumber Width
Width
public static BBjString ZOOM_IN_MENU_ITEM_NAME$=BBJasperView.getZOOM_IN_MENU_ITEM_NAME()
Zoom in menu item name
public static BBjString ZOOM_IN_TOOL_BUTTON_NAME$=BBJasperViewerControl.getZOOM_IN_TOOL_BUTTON_NAME()
Zoom in tool button name
public static BBjString ZOOM_LIST_EDIT_NAME$=BBJasperViewerControl.getZOOM_LIST_EDIT_NAME()
Zoom list edit name
public static BBjString ZOOM_OUT_MENU_ITEM_NAME$=BBJasperView.getZOOM_OUT_MENU_ITEM_NAME()
Zoom out menu item name
public static BBjString ZOOM_OUT_TOOL_BUTTON_NAME$=BBJasperViewerControl.getZOOM_OUT_TOOL_BUTTON_NAME()
Zoom out tool button name
public BBjNumber ZoomLevel=-1
Zoom level
public JasperViewerWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$)
Constructor Constructs a JasperViewerWidget given a name, preview text, preview image, but without a BBJasperReport object. You can call the setReport() method later to set the BBJasperReport for this widget.
p_name$
Unique name of the widgetp_title$
Title which will display in the title barp_previewText$
Preview textp_previewImage$
Preview image BBJasperReport for information on creating a BBJasperReport
public JasperViewerWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$, BBJasperReport p_report!)
Constructor Constructs a JasperViewerWidget given a name, preview text, preview image, and a BBJasperReport object
This constructor is less efficient than the versions that take a report file, connection string, and parameter list as your code must create and fill the report before displaying the dashboard. Constructing the widget with this method also requires that you register for the refresh callback event and refill the report yourself if you want the report to be updated when the widget is refreshed.
p_name$
Unique name of the widgetp_title$
Title which will display in the title barp_previewText$
Description of the widget used for the preview text in the Customize screen and as the tooltip text on the widget's titlep_previewImage$
Location of a image used for preview, if empty then a dynamic image will be createdp_report!
BBJasperReport object BBJasperReport for information on creating a BBJasperReport
public JasperViewerWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$, BBjString p_reportFile$, BBjString p_connectString$, HashMap p_params!)
Constructor Constructs a JasperViewerWidget given a name, preview text, preview image, and parameters so that the Dashboard Utility can create and fill the report before it displays the widget
This constructor is more efficient than the versions that take a BBJasperReport object as the Dashboard Utility will create and fill the report just before displaying the widget. The other methods require that you create and fill the report before the dashboard is displayed, even if the widget is not on the first tab and will never be displayed. Additionally, creating the widget with this constructor will refill the report automatically whenever the widget is refreshed. Constructing the widget with the BBJasperReport object requires that you register for the refresh callback event and refill the report yourself if you want the report to be updated when the widget is refreshed.
p_name$
Unique name of the widgetp_title$
Title which will display in the title barp_previewText$
Description of the widget used for the preview text in the Customize screen and as the tooltip text on the widget's titlep_previewImage$
Location of a image used for preview, if empty then a dynamic image will be createdp_reportFile$
The path to a jrxml or jasper report filep_connectString$
JDBC connect string used to connect to the databasep_params!
A HashMap containing parameters for the report which may be set to null() if the report doesn't require parameters BBJasperReport for information on creating a BBJasperReport
BBj 18.20
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
public void create(BBjChildWindow p_widgetControlWindow!)
Creates the JasperViewerWidget
p_widgetControlWindow!
The BBjChildWindow that will contain the widgetpublic void destroy()
Destroys the JasperViewerWidget
public void display(BBjNumber p_display)
Sets the widget's visibility
p_display
TRUE (1) to make the widget visible, FALSE (0) to hide itpublic BBjNumber getFitType()
getFitType Returns the FitType for the report (FIT_TYPE_ACTUAL, FIT_TYPE_WIDTH, FIT_TYPE_PAGE)
BBJasperViewerControl::getFitType() for information on the fit type options
BBj 18.20
public BBjNumber getHasToolBar()
Returns whether the widget is using a BBJasperViewerControl with a toolbar or a BBJasperView without a toolbar
BBJasperView for information on the BBJasperView and its methods
18.20
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.
BBJasperReport for information on the BBJasperReport and its methods
public BBJasperView getView()
getView Returns the BBJasperView for the widget
BBJasperView for information on the BBJasperView and its methods
18.20
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.
BBJasperViewerControl for information on the BBJasperViewerControl and its methods
public BBjNumber isDestroyed()
Returns if the JasperViewerWidget is destroyed
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
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.
BBJasperViewerControl for information on the BBJasperViewerControl and its methods
public void resize(BBjNumber p_width, BBjNumber p_height)
Resizes the widget using the provided with and height
p_width
Width of the widgetp_height
Height of the widgetpublic 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
p_name$
Control namep_event
Control event that will trigger the callbackp_callbackRoutine$
Routine name to callback when the event occurs on the controlpublic 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
p_name$
Control namep_event
Control event that will trigger the callbackp_callbackObject
Object to callback when the event occurs on the controlp_callbackRoutine$
Routine name to callback when the event occurs on the controlpublic 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().
p_fitType
Specifies one the following fit types: FIT_TYPE_ACTUAL, FIT_TYPE_WIDTH, FIT_TYPE_PAGE BBJasperViewerControl::setFitType() for information on the fit type options
BBj 18.20
public void setHasToolBar(BBjNumber p_showToolBar)
Sets whether the widget should use a BBJasperViewerControl with a toolbar or a BBJasperView without a toolbar
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) BBJasperView for information on the BBJasperView and its methods
18.20
public void setReport(BBJasperReport p_report!)
setReport Sets the BBJasperReport for the widget
p_report!
The BBJasperReport that contains report information for the widget BBJasperReport for information on the BBJasperReport