Example 2: Opening the “2D BarStacked” report – PB Docs 2022

Example 2: Opening the “2D BarStacked” report

In the original application, the “2D BarStacked” report is
opened from the “2D BarStacked” toolbar item.

image7.png

The new application uses the Report > 2D Bar RibbonBar item
to open the “2D Bar” report, and then provides the 2D BarStacked
option in the report for users to view the 2D Bar Stacked
report.

image8.png

PowerScript in the previous toolbar item
m_report.m_settings.m_defaultsettings.m_reportstyle.m_item1:

PowerScript in the event ue_report_style
of the RibbonBar:

Key points covered in the PowerScript
change:

  • The Checked status for the toolbar item is no longer
    applicable for RibbonBar item.

  • The Tag property is used as the
    identifier for some business logic of toolbar items. The
    Tag value needs to be migrated into the
    RibbonBar item. In this example, we use handle to obtain the
    Tag value from a RibbonBar item. The report
    style will be switched based on the Tag
    value.

  • The ParentWindow is not
    applicable for RibbonBar items. And the parent object is not
    applicable for RibbonBar either, because the parent window is an
    MDI window instead of a sheet window. The actual parent object
    will be the tracked sheet window in the buffer. The buffer is
    maintained in the iw_tmp object.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x