Edit D:\app\Administrator\product\11.2.0\dbhome_1\apex\images\forms_conversion\customers_fmb.xml
<?xml version = '1.0' encoding = 'UTF-8'?> <Module version="90040019" xmlns="http://xmlns.oracle.com/Forms"> <FormModule Name="CUSTOMERS" Title="MODULE4" ConsoleWindow="MAIN" DirtyInfo="true"> <Coordinate CharacterCellWidth="5" RealUnit="Point" CharacterCellHeight="14" CoordinateSystem="Real" DefaultFontScaling="true"/> <Alert Name="DELETE_ALERT" AlertMessage="Are you sure you want to remove this customer?&#10;(Note: changes do not become final until you Save them.)" Button2Label="No" DirtyInfo="true" AlertStyle="Caution" Button1Label="Yes"/> <Alert Name="CONFIRM_REVERT" AlertMessage="Are you sure you want to cancel the changes you have made?" Title="Payment Type" Button2Label="No" DirtyInfo="true" AlertStyle="Caution" Button1Label="Yes"/> <Block Name="Controls" ScrollbarLength="135" DirtyInfo="true" ScrollbarWidth="9"> <Item Name="CURSOR" FontName="MS Sans Serif" ItemType="Text Item" Justification="Start" Bevel="None" FontSpacing="Normal" Height="10" XPosition="151" FontWeight="Demilight" Width="33" BackColor="NewCanvas" YPosition="2" FontStyle="Plain" FontSize="800" DirtyInfo="true" CanvasName="MAIN" ForegroundColor="black"/> <Item Name="PROMPT_CUSTNAME" FontName="MS Sans Serif" ItemType="Push Button" TabPageName="" Label="Cust. Name" FontSpacing="Normal" Height="17" XPosition="20" FontWeight="Demilight" Width="89" BackColor="gray" YPosition="19" FontStyle="Plain" FontSize="800" MouseNavigate="false" ImplementationClass="oracle.forms.demos.RoundedButton" DirtyInfo="true" CanvasName="CUST_SUMMARY" ForegroundColor="black"> <Trigger Name="WHEN-BUTTON-PRESSED" TriggerText="set_block_property('s_customer1', ORDER_BY, 'name');&#10;go_block('s_customer1');&#10;execute_query;" DirtyInfo="true"/> </Item> <Item Name="PROMPT_PHONE" FontName="MS Sans Serif" ItemType="Push Button" TabPageName="" Label="Cust. Phone" FontSpacing="Normal" Height="17" XPosition="109" FontWeight="Demilight" Width="64" BackColor="gray" YPosition="19" FontStyle="Plain" FontSize="800" MouseNavigate="false" ImplementationClass="oracle.forms.demos.RoundedButton" DirtyInfo="true" CanvasName="CUST_SUMMARY" ForegroundColor="black"> <Trigger Name="WHEN-BUTTON-PRESSED" TriggerText="set_block_property('s_customer1', ORDER_BY, 'phone');&#10;go_block('s_customer1');&#10;execute_query;" DirtyInfo="true"/> </Item> <Item Name="PROMPT_SALES_NAME" FontName="MS Sans Serif" ItemType="Push Button" TabPageName="" Label="Sales Rep Name" FontSpacing="Normal" Height="17" XPosition="173" FontWeight="Demilight" Width="89" BackColor="gray" YPosition="19" FontStyle="Plain" FontSize="800" MouseNavigate="false" ImplementationClass="oracle.forms.demos.RoundedButton" DirtyInfo="true" CanvasName="CUST_SUMMARY" ForegroundColor="black"> <Trigger Name="WHEN-BUTTON-PRESSED" TriggerText="set_block_property('s_customer1', ORDER_BY, 'sales_rep_id');&#10;go_block('s_customer1');&#10;execute_query;" DirtyInfo="true"/> </Item> <Item Name="SALES_LOV_BUTTON" Iconic="true" TabPageName="SALES" ItemType="Push Button" Height="17" XPosition="122" Width="17" YPosition="54" IconFilename="List" MouseNavigate="false" ImplementationClass="" KeyboardNavigable="false" CanvasName="CUST_TAB" DirtyInfo="true"> <Trigger Name="WHEN-BUTTON-PRESSED" TriggerText="IF SHOW_LOV('sales_rep_lov') THEN&#10; NULL;&#10;END IF;" DirtyInfo="true"/> </Item> <Item Name="EXIT" FontName="helvetica" ItemType="Push Button" Label="Exit" FontSpacing="Normal" Height="16" XPosition="171" FontWeight="Medium" BackColor="white" Width="21" YPosition="22" FontStyle="Plain" FontSize="900" DirtyInfo="true" CanvasName="MAIN" ForegroundColor="black"> <Trigger Name="WHEN-BUTTON-PRESSED" TriggerText="exit_form();" DirtyInfo="true"/> </Item> </Block> <Block Name="NavigationControls" ScrollbarLength="135" DirtyInfo="true" ScrollbarWidth="9"> <Item Name="VIEW" PromptFontName="Arial" PromptFontSize="800" TabPageName="CUSTOMERS" ItemType="List Item" PromptAttachmentOffset="5" FontSpacing="Normal" Height="17" PromptFontSpacing="Normal" FontWeight="Demilight" PromptForegroundColor="black" YPosition="11" FontStyle="Plain" ListElementCount="2" MouseNavigate="false" Prompt="View:" ForegroundColor="black" FontName="Arial" Required="true" PromptFontWeight="Demilight" PromptAlign="Center" XPosition="38" BackColor="white" Width="67" DataType="Number" PromptFontStyle="Plain" FontSize="800" InitializeValue="1" DirtyInfo="true" CanvasName="TREE"> <ListItemElement Index="2" Name="By Sales Rep" Value="2"/> <ListItemElement Index="1" Name="By Customer" Value="1"/> <Trigger Name="WHEN-LIST-CHANGED" TriggerText="if :NavigationControls.view = 1 then&#10; refresh_tree_country;&#10;else&#10; refresh_tree_salesrep;&#10;end if;&#10;synchronize;&#10;go_block('Navigator');&#10;go_block('Navigator');&#10;" DirtyInfo="true"/> </Item> <Item Name="PB_EXPAND" Iconic="true" ParentFilename="stndrd20.olb" ItemType="Push Button" TabPageName="" TooltipVisualAttributeGroup="STD_TOOLTIP" Label="Expand" Height="20" XPosition="13" ParentModule="STANDARDS" Width="20" BackColor="gray" ParentModuleType="25" PromptForegroundColor="black" YPosition="260" IconFilename="expand" Tooltip="Expand" ImplementationClass="oracle.forms.demos.RoundedButton" ParentType="15" DirtyInfo="true" CanvasName="TREE" ParentName="STD_BUTTON_ICONIC_SMALL" ForegroundColor="black"> <Trigger Name="WHEN-BUTTON-PRESSED" TriggerText="&#10;-- This code will expand the current node in a tree.&#10;&#10;DECLARE&#10; htree ITEM;&#10; node FTree.NODE;&#10;BEGIN&#10; -- Find the tree itself.&#10; htree := Find_Item('Navigator.tree_cust');&#10; &#10; -- Expand the current node.&#10; node := :SYSTEM.TRIGGER_NODE;&#10; Ftree.Set_Tree_Node_Property(htree, node, Ftree.NODE_STATE, Ftree.EXPANDED_NODE);&#10;END;&#10;&#10;" DirtyInfo="true"/> </Item> <Item Name="PB_COLLAPSE" Iconic="true" ParentFilename="stndrd20.olb" ItemType="Push Button" TabPageName="" TooltipVisualAttributeGroup="STD_TOOLTIP" Label="Collapse" Height="20" XPosition="47" ParentModule="STANDARDS" Width="20" BackColor="gray" ParentModuleType="25" PromptForegroundColor="black" YPosition="260" IconFilename="collaps" Tooltip="Collapse" ImplementationClass="oracle.forms.demos.RoundedButton" ParentType="15" DirtyInfo="true" CanvasName="TREE" ParentName="STD_BUTTON_ICONIC_SMALL" ForegroundColor="black"> <Trigger Name="WHEN-BUTTON-PRESSED" TriggerText="&#10;-- This code will collapse the current node in a tree.&#10;&#10;DECLARE&#10; htree ITEM;&#10; node FTree.NODE;&#10;BEGIN&#10; -- Find the tree itself.&#10; htree := Find_Item('Navigator.tree_cust');&#10; &#10; -- Collapse the current node.&#10; node := :SYSTEM.TRIGGER_NODE;&#10; Ftree.Set_Tree_Node_Property(htree, node, Ftree.NODE_STATE, Ftree.COLLAPSED_NODE);&#10;END;" DirtyInfo="true"/> </Item> <Item Name="PB_EXPANDALL" Iconic="true" ParentFilename="stndrd20.olb" ItemType="Push Button" TabPageName="" Label="Expand all" TooltipVisualAttributeGroup="STD_TOOLTIP" Height="20" XPosition="82" ParentModule="STANDARDS" Width="20" BackColor="gray" ParentModuleType="25" YPosition="260" IconFilename="expand2" Tooltip="Expand all" ImplementationClass="oracle.forms.demos.RoundedButton" ParentType="15" DirtyInfo="true" CanvasName="TREE" ParentName="STD_BUTTON_ICONIC_SMALL" ForegroundColor="black"> <Trigger Name="WHEN-BUTTON-PRESSED" TriggerText="declare&#10; v_count number;&#10; v_node ftree.node;&#10;begin&#10; v_count := ftree.get_tree_property('Navigator.tree_cust',&#10; ftree.selection_count);&#10;&#10; if v_count < 1 then&#10; message('no_selection');&#10; elsif v_count > 1 then&#10; message('too_many_selection');&#10; end if;&#10; &#10; if v_count = 1 then&#10; v_node := ftree.get_tree_selection('Navigator.tree_cust', 1);&#10; expand_all(v_node);&#10; end if;&#10;end;" DirtyInfo="true"/> </Item> <Item Name="PB_COLLAPSEALL" Iconic="true" ParentFilename="stndrd20.olb" ItemType="Push Button" TabPageName="" Label="Collapse all" TooltipVisualAttributeGroup="STD_TOOLTIP" Height="20" XPosition="116" ParentModule="STANDARDS" Width="20" BackColor="gray" ParentModuleType="25" YPosition="260" IconFilename="collaps2" Tooltip="Collapse all" ImplementationClass="oracle.forms.demos.RoundedButton" ParentType="15" DirtyInfo="true" CanvasName="TREE" ParentName="STD_BUTTON_ICONIC_SMALL" ForegroundColor="black"> <Trigger Name="WHEN-BUTTON-PRESSED" TriggerText="declare&#10; v_count number;&#10; v_node ftree.node;&#10;begin&#10; v_count := ftree.get_tree_property('Navigator.tree_cust',&#10; ftree.selection_count);&#10;&#10; if v_count < 1 then&#10; message('no_selection');&#10; elsif v_count > 1 then&#10; message('too_many_selection');&#10; end if;&#10; &#10; if v_count = 1 then&#10; v_node := ftree.get_tree_selection('Navigator.tree_cust', 1);&#10; collapse_all(v_node);&#10; end if;&#10;end;" DirtyInfo="true"/> </Item> </Block> <Block Name="Navigator" ScrollbarLength="135" DatabaseBlock="false" DirtyInfo="true" ScrollbarWidth="9"> <Item Name="TREE_CUST" FontName="Arial" TabPageName="CUSTOMERS" ItemType="Hierarchical Tree" Bevel="Raised" FontSpacing="Normal" Height="228" XPosition="4" FontWeight="Demilight" Width="141" BackColor="white" YPosition="30" FontStyle="Plain" FontSize="1000" DirtyInfo="true" CanvasName="TREE" ForegroundColor="black"> <Trigger Name="WHEN-TREE-NODE-ACTIVATED" TriggerText=":GLOBAL.customer_id := :S_CUSTOMER.id;&#10;IF ID_NULL(FIND_FORM('ORDERS')) THEN&#10;-- CALL_FORM('ORDERS',hide, do_replace, SHARE_LIBRARY_DATA);&#10;OPEN_FORM('ORDERS');&#10;ELSE&#10; GO_FORM('ORDERS');&#10;END IF;&#10;" DirtyInfo="true"/> </Item> <Trigger Name="WHEN-TREE-NODE-SELECTED" TriggerText="&#10; -- This code could be used in a WHEN-TREE-NODE-SELECTED&#10; -- trigger to return the value of the node that was&#10; -- clicked on.&#10;&#10;DECLARE&#10; htree ITEM;&#10; node_value VARCHAR2(100);&#10; node_label VARCHAR2(100);&#10; node_depth VARCHAR2(100);&#10; cust_id VARCHAR2(100);&#10;BEGIN&#10;-- hide_view('cust_stacked');&#10;-- hide_view('cust_tab');&#10; &#10; -- Find the tree itself.&#10; htree := Find_Item('Navigator.tree_cust'); &#10; -- Find the value of the node clicked on.&#10; node_value := Ftree.Get_Tree_Node_Property(htree, :SYSTEM.TRIGGER_NODE, Ftree.NODE_VALUE);&#10; node_label := Ftree.Get_Tree_Node_Property(htree, :SYSTEM.TRIGGER_NODE, Ftree.NODE_LABEL);&#10; node_depth := Ftree.Get_Tree_Node_Property(htree, :SYSTEM.TRIGGER_NODE, Ftree.NODE_DEPTH);&#10;&#10; if node_depth = 1 then&#10; go_block('Navigator'); &#10; elsif node_depth = 3 then&#10; -- Modify the Where Clause in the S_ORD1 Block.&#10; SET_BLOCK_PROPERTY('s_customer1', DEFAULT_WHERE, 'id = ' || node_value);&#10; go_block('s_customer1');&#10; EXECUTE_QUERY;&#10; elsif node_depth = 2 then&#10; cust_id := '( ';&#10; if :NavigationControls.view = 1 then&#10; for i in ( select id from s_customer where country = ltrim(rtrim(node_label)))&#10; loop&#10; cust_id := cust_id || i.id || ', ';&#10; end loop;&#10; else&#10; for i in ( select id from s_customer where sales_rep_id = node_value)&#10; loop&#10; cust_id := cust_id || i.id || ', ';&#10; end loop;&#10;&#10; end if; &#10; cust_id := substr(cust_id,1 , length(cust_id)-2) || ')';&#10; SET_BLOCK_PROPERTY('s_customer1', DEFAULT_WHERE, 'id in ' || cust_id);&#10; go_block('s_customer1');&#10; EXECUTE_QUERY;&#10; end if;&#10;END;" DirtyInfo="true"/> </Block> <Block Name="Customers" ShowScrollbar="true" ScrollbarLength="56" UpdateAllowed="false" ScrollbarWidth="12" BackColor="gray" InsertAllowed="false" RecordsDisplayCount="4" ScrollbarXPosition="262" RecordVisualAttributeGroupName="CURRENT_RECORD" ScrollbarYPosition="35" ScrollbarTabPageName="" QueryDataSourceName="S_CUSTOMER" DirtyInfo="true" ScrollbarCanvasName="CUST_SUMMARY"> <Item Name="ID" Required="true" TabPageName="CUST" ItemType="Text Item" PromptAttachmentOffset="5" DistanceBetweenRecords="154" Height="14" CopyValueFromItem="S_CUSTOMER1.ID" XPosition="61" ItemsDisplay="0" Width="41" DataType="Number" ColumnName="ID" YPosition="22" PromptDisplayStyle="All Records" Prompt="Id" DirtyInfo="true" CanvasName="CUST_TAB" MaximumLength="8"/> <Item Name="NAME" Required="true" TabPageName="CUST" ItemType="Text Item" PromptAttachmentOffset="5" DistanceBetweenRecords="154" Height="14" XPosition="61" ItemsDisplay="0" Width="230" ColumnName="NAME" YPosition="46" PromptDisplayStyle="All Records" Prompt="Name" DirtyInfo="true" CanvasName="CUST_TAB" MaximumLength="50"/> <Item Name="PHONE" TabPageName="CUST" ItemType="Text Item" PromptAttachmentOffset="5" DistanceBetweenRecords="154" Height="14" XPosition="61" ItemsDisplay="0" Width="117" ColumnName="PHONE" YPosition="70" PromptDisplayStyle="All Records" Prompt="Phone" DirtyInfo="true" CanvasName="CUST_TAB" MaximumLength="25"/> <Item Name="ADDRESS" TabPageName="ADDRESS" ItemType="Text Item" PromptAttachmentOffset="5" DistanceBetweenRecords="154" Height="14" XPosition="47" ItemsDisplay="0" Width="275" ColumnName="ADDRESS" YPosition="13" PromptDisplayStyle="All Records" Prompt="Address" DirtyInfo="true" CanvasName="CUST_TAB" MaximumLength="400"/> <Item Name="CITY" TabPageName="ADDRESS" ItemType="Text Item" PromptAttachmentOffset="5" DistanceBetweenRecords="154" Height="14" XPosition="47" ItemsDisplay="0" Width="140" ColumnName="CITY" YPosition="35" PromptDisplayStyle="All Records" Prompt="City" DirtyInfo="true" CanvasName="CUST_TAB"/> <Item Name="STATE" TabPageName="ADDRESS" ItemType="Text Item" PromptAttachmentOffset="5" DistanceBetweenRecords="154" Height="14" XPosition="47" ItemsDisplay="0" Width="95" ColumnName="STATE" YPosition="58" PromptDisplayStyle="All Records" Prompt="State" DirtyInfo="true" CanvasName="CUST_TAB" MaximumLength="20"/> <Item Name="COUNTRY" TabPageName="ADDRESS" ItemType="Text Item" PromptAttachmentOffset="5" DistanceBetweenRecords="154" Height="14" XPosition="47" ItemsDisplay="0" Width="140" ColumnName="COUNTRY" YPosition="81" PromptDisplayStyle="All Records" Prompt="Country" DirtyInfo="true" CanvasName="CUST_TAB"/> <Item Name="ZIP_CODE" TabPageName="ADDRESS" ItemType="Text Item" PromptAttachmentOffset="5" DistanceBetweenRecords="154" Height="14" XPosition="210" ItemsDisplay="0" Width="86" ColumnName="ZIP_CODE" YPosition="58" PromptDisplayStyle="All Records" Prompt="Zip Code" DirtyInfo="true" CanvasName="CUST_TAB" MaximumLength="75"/> <Item Name="CREDIT_RATING" TabPageName="SALES" ItemType="List Item" PromptAttachmentOffset="5" DistanceBetweenRecords="154" Height="14" XPosition="78" ItemsDisplay="0" Width="79" ColumnName="CREDIT_RATING" YPosition="24" ListElementCount="3" PromptDisplayStyle="All Records" Prompt="Credit Rating" DirtyInfo="true" CanvasName="CUST_TAB" MaximumLength="9"> <ListItemElement Index="2" Name="Good" Value="GOOD"/> <ListItemElement Index="1" Name="Poor" Value="POOR"/> <ListItemElement Index="3" Name="Excellent" Value="Excellent"/> </Item> <Item Name="SALES_REP_ID" TabPageName="SALES" ItemType="Text Item" PromptAttachmentOffset="5" DistanceBetweenRecords="154" Height="14" XPosition="80" ItemsDisplay="0" Width="41" DataType="Number" ColumnName="SALES_REP_ID" YPosition="56" PromptDisplayStyle="All Records" Prompt="Sales Rep Id" DirtyInfo="true" CanvasName="CUST_TAB" MaximumLength="8"/> <Item Name="REGION_ID" TabPageName="SALES" ItemType="Text Item" PromptAttachmentOffset="5" DistanceBetweenRecords="154" Height="14" XPosition="213" ItemsDisplay="0" Width="41" DataType="Number" ColumnName="REGION_ID" YPosition="24" PromptDisplayStyle="All Records" Prompt="Region Id" DirtyInfo="true" CanvasName="CUST_TAB" MaximumLength="8"/> <Item Name="COMMENTS" TabPageName="COMMENT" ItemType="Text Item" PromptAttachmentOffset="5" MultiLine="true" DistanceBetweenRecords="154" Height="79" EditName="COMMENTS_EDITOR" XPosition="59" ItemsDisplay="0" Width="251" ColumnName="COMMENTS" YPosition="14" PromptDisplayStyle="All Records" Prompt="Comments" DirtyInfo="true" CanvasName="CUST_TAB" MaximumLength="255"> <Trigger Name="WHEN-MOUSE-DOUBLECLICK" TriggerText="EDIT_TEXTITEM;" DirtyInfo="true"/> </Item> <Item Name="SALES_REP_NAME" Required="true" TabPageName="SALES" ItemType="Text Item" PromptAttachmentOffset="5" DatabaseItem="false" Height="14" PromptAlign="Start" XPosition="213" ItemsDisplay="0" Width="89" BackColor="white" YPosition="56" PromptAttachmentEdge="Start" PromptDisplayStyle="First Record" Prompt="Sales Rep Name" DirtyInfo="true" CanvasName="CUST_TAB" MaximumLength="50"/> <DataSourceColumn DSCScale="0" DSCName="ID" DSCMandatory="true" DSCType="NUMBER" DSCPrecision="7" Type="Query" DSCNochildren="false" DSCLength="0"/> <DataSourceColumn DSCScale="0" DSCName="NAME" DSCMandatory="true" DSCType="VARCHAR2" DSCPrecision="0" Type="Query" DSCNochildren="false" DSCLength="50"/> <DataSourceColumn DSCScale="0" DSCName="PHONE" DSCMandatory="false" DSCType="VARCHAR2" DSCPrecision="0" Type="Query" DSCNochildren="false" DSCLength="25"/> <DataSourceColumn DSCScale="0" DSCName="ADDRESS" DSCMandatory="false" DSCType="VARCHAR2" DSCPrecision="0" Type="Query" DSCNochildren="false" DSCLength="400"/> <DataSourceColumn DSCScale="0" DSCName="CITY" DSCMandatory="false" DSCType="VARCHAR2" DSCPrecision="0" Type="Query" DSCNochildren="false" DSCLength="30"/> <DataSourceColumn DSCScale="0" DSCName="STATE" DSCMandatory="false" DSCType="VARCHAR2" DSCPrecision="0" Type="Query" DSCNochildren="false" DSCLength="20"/> <DataSourceColumn DSCScale="0" DSCName="COUNTRY" DSCMandatory="false" DSCType="VARCHAR2" DSCPrecision="0" Type="Query" DSCNochildren="false" DSCLength="30"/> <DataSourceColumn DSCScale="0" DSCName="ZIP_CODE" DSCMandatory="false" DSCType="VARCHAR2" DSCPrecision="0" Type="Query" DSCNochildren="false" DSCLength="75"/> <DataSourceColumn DSCScale="0" DSCName="CREDIT_RATING" DSCMandatory="false" DSCType="VARCHAR2" DSCPrecision="0" Type="Query" DSCNochildren="false" DSCLength="9"/> <DataSourceColumn DSCScale="0" DSCName="SALES_REP_ID" DSCMandatory="false" DSCType="NUMBER" DSCPrecision="7" Type="Query" DSCNochildren="false" DSCLength="0"/> <DataSourceColumn DSCScale="0" DSCName="REGION_ID" DSCMandatory="false" DSCType="NUMBER" DSCPrecision="7" Type="Query" DSCNochildren="false" DSCLength="0"/> <DataSourceColumn DSCScale="0" DSCName="COMMENTS" DSCMandatory="false" DSCType="VARCHAR2" DSCPrecision="0" Type="Query" DSCNochildren="false" DSCLength="255"/> <Trigger Name="POST-QUERY" TriggerText="SELECT last_name &#10;INTO :s_customer.sales_rep_name&#10;FROM S_EMP&#10;WHERE id = :s_customer.sales_rep_id;" DirtyInfo="true"/> </Block> <Canvas Name="MAIN" Width="538" BackColor="NewCanvas" ViewportWidth="360" ViewportYPositionOnCanvas="0" Height="338" ViewportHeight="324" DirtyInfo="true" ViewportXPositionOnCanvas="0" WindowName="MAIN"> <Graphics Name="GROUP20" GraphicsFontStyle="0" HorizontalMargin="5" GraphicsFontWeight="Ultralight" StartPromptOffset="5" GraphicsFontSize="0" GraphicsText="" GraphicsType="Group" GraphicsFontName="" HorizontalObjectOffset="9" ScrollbarWidth="9" GraphicsFontColor="" GraphicsFontSpacing="Ultradense" VerticalMargin="14" GraphicsFontColorCode="0" DirtyInfo="true"/> </Canvas> <Canvas Name="TREE" Bevel="Inset" TabAttachmentEdge="Bottom" ViewportYPositionOnCanvas="1" Height="286" ViewportXPosition="8" ViewportHeight="285" CanvasType="Stacked" Visible="false" Width="151" ViewportYPosition="22" BackColor="FrameColor" ViewportWidth="151" TabStyle="Chamfered" RaiseOnEnter="true" DisplayViewport="true" DirtyInfo="true" ViewportXPositionOnCanvas="0" WindowName="MAIN" ForegroundColor="white"> <TabPage Name="CUSTOMERS" BackColor="gray" Label="By Customers" DirtyInfo="true"/> <TabPage Name="SALES" Label="By Sales Rep" DirtyInfo="true"/> </Canvas> <Canvas Name="CUST_SUMMARY" Bevel="None" Height="114" ViewportXPosition="198" ViewportHeight="115" CanvasType="Stacked" Visible="true" BackColor="NewCanvas" ViewportYPosition="15" Width="299" ViewportWidth="300" RaiseOnEnter="true" DisplayViewport="true" DirtyInfo="true" WindowName="MAIN"/> <Canvas Name="CUST_STACKED" Bevel="None" Height="160" ViewportXPosition="169" ViewportHeight="160" CanvasType="Stacked" Visible="false" BackColor="NewCanvas" ViewportYPosition="150" Width="430" ViewportWidth="367" RaiseOnEnter="true" DisplayViewport="true" DirtyInfo="true" WindowName="MAIN"/> <Canvas Name="CUST_TAB" Bevel="None" Height="134" ViewportXPosition="172" ViewportHeight="134" CanvasType="Tab" Visible="true" ViewportYPosition="164" Width="349" ViewportWidth="349" RaiseOnEnter="true" DisplayViewport="true" DirtyInfo="true" WindowName="MAIN"> <Graphics Name="ROUNDRECT55" GraphicsFontStyle="0" HorizontalMargin="5" GraphicsFontWeight="Ultralight" GraphicsText="" Height="79" InternalLineWidth="1" GraphicsFontName="" HorizontalObjectOffset="9" CornerRadiusY="10" GraphicsFontColor="" GraphicsFontSpacing="Ultradense" CornerRadiusX="10" EdgeForegroundColor="white" YPosition="11" JoinStyle="Bevel" VerticalMargin="14" GraphicsFontColorCode="0" Bevel="None" StartPromptOffset="5" GraphicsFontSize="0" EdgePattern="solid" GraphicsType="Rounded Rectangle" XPosition="14" ScrollbarWidth="9" BackColor="FrameColor" Width="302" DirtyInfo="true"/> <TabPage Name="CUST" Label="Customer Info" DirtyInfo="true"/> <TabPage Name="ADDRESS" Label="Address" DirtyInfo="true"/> <TabPage Name="SALES" Label="Billing" DirtyInfo="true"/> <TabPage Name="COMMENT" Label="Comment" DirtyInfo="true"/> </Canvas> <Editor Name="COMMENTS_EDITOR" Width="450" YPosition="175" Title="Comments" Height="250" DirtyInfo="true" XPosition="175"/> <LOV Name="SALES_REP_LOV" Width="200" YPosition="30" Title="Sales Representatives" RecordGroupName="LOV6" Height="250" DirtyInfo="true" XPosition="30"> <LOVColumnMapping Name="ID" DisplayWidth="20" Title="Id" ReturnItem="S_CUSTOMER.SALES_REP_ID" DirtyInfo="true"/> <LOVColumnMapping Name="NAME" DisplayWidth="234" Title="Name" DirtyInfo="true"/> </LOV> <ProgramUnit Name="COLLAPSE_ALL" ProgramUnitText="PROCEDURE collapse_all (p_node in ftree.node) IS&#10; next_node ftree.node;&#10;BEGIN&#10; ftree.set_tree_node_property('Navigator.tree_cust',&#10; p_node,&#10; ftree.node_state,&#10; ftree.collapsed_node);&#10;&#10; next_node := ftree.find_tree_node('Navigator.tree_cust',&#10; '',&#10; ftree.find_next,&#10; ftree.node_value,&#10; p_node,&#10; p_node);&#10; while not ftree.id_null(next_node) loop&#10; ftree.set_tree_node_property('Navigator.tree_cust',&#10; next_node,&#10; ftree.node_state,&#10; ftree.collapsed_node);&#10; next_node := ftree.find_tree_node('Navigator.tree_cust',&#10; '',&#10; ftree.find_next,&#10; ftree.node_value,&#10; p_node,&#10; next_node);&#10; end loop;&#10; EXCEPTION&#10; WHEN OTHERS THEN null;&#10; &#10;END;" ProgramUnitType="Procedure"/> <ProgramUnit Name="EXPAND_ALL" ProgramUnitText="PROCEDURE expand_all (p_node in ftree.node) IS&#10; next_node ftree.node;&#10;BEGIN&#10; ftree.set_tree_node_property('Navigator.tree_cust',&#10; p_node,&#10; ftree.node_state,&#10; ftree.expanded_node);&#10;&#10; next_node := ftree.find_tree_node('Navigator.tree_cust',&#10; '',&#10; ftree.find_next,&#10; ftree.node_value,&#10; p_node,&#10; p_node);&#10; while not ftree.id_null(next_node) loop&#10; ftree.set_tree_node_property('Navigator.tree_cust',&#10; next_node,&#10; ftree.node_state,&#10; ftree.expanded_node);&#10; next_node := ftree.find_tree_node('Navigator.tree_cust',&#10; '',&#10; ftree.find_next,&#10; ftree.node_value,&#10; p_node,&#10; next_node);&#10; end loop;&#10;END;" ProgramUnitType="Procedure"/> <ProgramUnit Name="REFRESH_TREE_COUNTRY" ProgramUnitText="PROCEDURE refresh_tree_country IS&#10; cursor cursor_country is&#10; select distinct country, 1 Val&#10; from s_customer&#10; order by country;&#10; cursor cursor_cust(p_country varchar2) is&#10; select name, id&#10; from s_customer&#10; where country = p_country&#10; order by name;&#10;&#10; v_i number := 1;&#10; v_ignore number;&#10;&#10; rg_custs recordgroup;&#10; rg_countrys recordgroup;&#10;&#10; v_init_state groupcolumn;&#10; v_level groupcolumn;&#10; v_label groupcolumn;&#10; v_icon groupcolumn;&#10; v_value groupcolumn;&#10;begin&#10; rg_countrys := find_group('COUNTRYS');&#10; if not id_null(rg_countrys) then&#10; delete_group(rg_countrys);&#10; end if;&#10; &#10; rg_countrys := create_group('COUNTRYS');&#10; &#10; v_init_state := add_group_column(rg_countrys, 'init_state', number_column); &#10; v_level := add_group_column(rg_countrys, 'level', number_column);&#10; v_label := add_group_column(rg_countrys, 'label', char_column, 40);&#10; v_icon := add_group_column(rg_countrys, 'icon', char_column, 20);&#10; v_value := add_group_column(rg_countrys, 'value', char_column, 5);&#10; &#10; add_group_row(rg_countrys, v_i);&#10; set_group_number_cell(v_init_state, v_i, 1);&#10; set_group_number_cell(v_level , v_i, 1);&#10; set_group_char_cell (v_label , v_i, 'Customer List By Country');&#10;-- set_group_char_cell (v_icon , v_i, 'homesmall');&#10; set_group_char_cell (v_value , v_i, to_char(0));&#10; &#10; v_i := v_i + 1;&#10; for countryrec in cursor_country loop&#10; add_group_row(rg_countrys, v_i);&#10; set_group_number_cell(v_init_state, v_i, 1);&#10; set_group_number_cell(v_level , v_i, 2);&#10; set_group_char_cell (v_label , v_i, ' ' || countryrec.country);&#10;-- set_group_char_cell (v_icon , v_i, 'country');&#10; set_group_char_cell (v_value , v_i, to_char(countryrec.val));&#10; v_i := v_i + 1;&#10;&#10; for custrec in cursor_cust(countryrec.country) loop&#10; add_group_row(rg_countrys, v_i);&#10; set_group_number_cell(v_init_state, v_i, 1);&#10; set_group_number_cell(v_level , v_i, 3);&#10; set_group_char_cell (v_label , v_i, ' ' || custrec.name);&#10; set_group_char_cell (v_icon , v_i, NULL);&#10; set_group_char_cell (v_value , v_i, to_char(custrec.id));&#10; v_i := v_i + 1;&#10; end loop;&#10; end loop; &#10; ftree.set_tree_property('Navigator.tree_cust', ftree.record_group, rg_countrys);&#10; go_item('Navigator.tree_cust');&#10;end;&#10;" ProgramUnitType="Procedure"/> <ProgramUnit Name="REFRESH_TREE_SALESREP" ProgramUnitText="PROCEDURE refresh_tree_salesrep IS&#10; cursor cursor_sales is&#10; select last_name || ' ' || first_name Name, id&#10; from s_emp&#10; where title like 'Sales%'&#10; order by title;&#10; cursor cursor_cust(p_id number) is&#10; select name, id&#10; from s_customer&#10; where sales_rep_id = p_id&#10; order by name;&#10;&#10; v_i number := 1;&#10; &#10; rg_custs recordgroup;&#10;&#10; v_init_state groupcolumn;&#10; v_level groupcolumn;&#10; v_label groupcolumn;&#10; v_icon groupcolumn;&#10; v_value groupcolumn;&#10;begin&#10; rg_custs := find_group('CUSTS');&#10; if not id_null(rg_custs) then&#10; delete_group(rg_custs);&#10; end if;&#10; &#10; rg_custs := create_group('CUSTS');&#10; &#10; v_init_state := add_group_column(rg_custs, 'init_state', number_column); &#10; v_level := add_group_column(rg_custs, 'level', number_column);&#10; v_label := add_group_column(rg_custs, 'label', char_column, 40);&#10; v_icon := add_group_column(rg_custs, 'icon', char_column, 20);&#10; v_value := add_group_column(rg_custs, 'value', char_column, 5);&#10; &#10; add_group_row(rg_custs, v_i);&#10; set_group_number_cell(v_init_state, v_i, 1);&#10; set_group_number_cell(v_level , v_i, 1);&#10; set_group_char_cell (v_label , v_i, 'Customer List By Sales Rep');&#10;-- set_group_char_cell (v_icon , v_i, 'homesmall');&#10; set_group_char_cell (v_value , v_i, to_char(0));&#10; &#10; v_i := v_i + 1;&#10; for salesrec in cursor_sales loop&#10; add_group_row(rg_custs, v_i);&#10; set_group_number_cell(v_init_state, v_i, 1);&#10; set_group_number_cell(v_level , v_i, 2);&#10; set_group_char_cell (v_label , v_i, ' ' || salesrec.name);&#10;-- set_group_char_cell (v_icon , v_i, 'country');&#10; set_group_char_cell (v_value , v_i, to_char(salesrec.id));&#10; v_i := v_i + 1;&#10;&#10; for custrec in cursor_cust(salesrec.id) loop&#10; add_group_row(rg_custs, v_i);&#10; set_group_number_cell(v_init_state, v_i, 1);&#10; set_group_number_cell(v_level , v_i, 3);&#10; set_group_char_cell (v_label , v_i, ' ' || custrec.name);&#10; set_group_char_cell (v_icon , v_i, NULL);&#10; set_group_char_cell (v_value , v_i, to_char(custrec.id));&#10; v_i := v_i + 1;&#10; end loop;&#10; end loop; &#10; ftree.set_tree_property('Navigator.tree_cust', ftree.record_group, rg_custs);&#10; go_item('Navigator.tree_cust');&#10;end;&#10;" ProgramUnitType="Procedure"/> <ProgramUnit Name="CHECK_PACKAGE_FAILURE" ProgramUnitText="Procedure Check_Package_Failure IS&#10;BEGIN&#10; IF NOT ( Form_Success ) THEN&#10; RAISE Form_Trigger_Failure;&#10; END IF;&#10;END;" ProgramUnitType="Procedure"/> <ProgramUnit Name="QUERY_MASTER_DETAILS" ProgramUnitText="PROCEDURE Query_Master_Details(rel_id Relation,detail VARCHAR2) IS&#10; oldmsg VARCHAR2(2); -- Old Message Level Setting&#10; reldef VARCHAR2(5); -- Relation Deferred Setting&#10;BEGIN&#10; --&#10; -- Initialize Local Variable(s)&#10; --&#10; reldef := Get_Relation_Property(rel_id, DEFERRED_COORDINATION);&#10; oldmsg := :System.Message_Level;&#10; --&#10; -- If NOT Deferred, Goto detail and execute the query.&#10; --&#10; IF reldef = 'FALSE' THEN&#10; Go_Block(detail);&#10; Check_Package_Failure;&#10; :System.Message_Level := '10';&#10; Execute_Query;&#10; :System.Message_Level := oldmsg;&#10; ELSE&#10; --&#10; -- Relation is deferred, mark the detail block as un-coordinated&#10; --&#10; Set_Block_Property(detail, COORDINATION_STATUS, NON_COORDINATED);&#10; END IF;&#10;&#10;EXCEPTION&#10; WHEN Form_Trigger_Failure THEN&#10; :System.Message_Level := oldmsg;&#10; RAISE;&#10;END Query_Master_Details;&#10;" ProgramUnitType="Procedure"/> <ProgramUnit Name="CLEAR_ALL_MASTER_DETAILS" ProgramUnitText="PROCEDURE Clear_All_Master_Details IS&#10; mastblk VARCHAR2(30); -- Initial Master Block Causing Coord&#10; coordop VARCHAR2(30); -- Operation Causing the Coord&#10; trigblk VARCHAR2(30); -- Cur Block On-Clear-Details Fires On&#10; startitm VARCHAR2(61); -- Item in which cursor started&#10; frmstat VARCHAR2(15); -- Form Status&#10; curblk VARCHAR2(30); -- Current Block&#10; currel VARCHAR2(30); -- Current Relation&#10; curdtl VARCHAR2(30); -- Current Detail Block&#10;&#10; FUNCTION First_Changed_Block_Below(Master VARCHAR2)&#10; RETURN VARCHAR2 IS&#10; curblk VARCHAR2(30); -- Current Block&#10; currel VARCHAR2(30); -- Current Relation&#10; retblk VARCHAR2(30); -- Return Block&#10; BEGIN&#10; --&#10; -- Initialize Local Vars&#10; --&#10; curblk := Master;&#10; currel := Get_Block_Property(curblk, FIRST_MASTER_RELATION);&#10; --&#10; -- While there exists another relation for this block&#10; --&#10; WHILE currel IS NOT NULL LOOP&#10; --&#10; -- Get the name of the detail block&#10; --&#10; curblk := Get_Relation_Property(currel, DETAIL_NAME);&#10; --&#10; -- If this block has changes, return its name&#10; --&#10; IF ( Get_Block_Property(curblk, STATUS) = 'CHANGED' ) THEN&#10; RETURN curblk;&#10; ELSE&#10; --&#10; -- No changes, recursively look for changed blocks below&#10; --&#10; retblk := First_Changed_Block_Below(curblk);&#10; --&#10; -- If some block below is changed, return its name&#10; --&#10; IF retblk IS NOT NULL THEN&#10; RETURN retblk;&#10; ELSE&#10; --&#10; -- Consider the next relation&#10; --&#10; currel := Get_Relation_Property(currel, NEXT_MASTER_RELATION);&#10; END IF;&#10; END IF;&#10; END LOOP;&#10;&#10; --&#10; -- No changed blocks were found&#10; --&#10; RETURN NULL;&#10; END First_Changed_Block_Below;&#10;&#10;BEGIN&#10; --&#10; -- Init Local Vars&#10; --&#10; mastblk := :System.Master_Block;&#10; coordop := :System.Coordination_Operation;&#10; trigblk := :System.Trigger_Block;&#10; startitm := :System.Cursor_Item;&#10; frmstat := :System.Form_Status;&#10;&#10; --&#10; -- If the coordination operation is anything but CLEAR_RECORD or&#10; -- SYNCHRONIZE_BLOCKS, then continue checking.&#10; --&#10; IF coordop NOT IN ('CLEAR_RECORD', 'SYNCHRONIZE_BLOCKS') THEN&#10; --&#10; -- If we're processing the driving master block...&#10; --&#10; IF mastblk = trigblk THEN&#10; --&#10; -- If something in the form is changed, find the&#10; -- first changed block below the master&#10; --&#10; IF frmstat = 'CHANGED' THEN&#10; curblk := First_Changed_Block_Below(mastblk);&#10; --&#10; -- If we find a changed block below, go there&#10; -- and Ask to commit the changes.&#10; --&#10; IF curblk IS NOT NULL THEN&#10; Go_Block(curblk);&#10; Check_Package_Failure;&#10; Clear_Block(ASK_COMMIT);&#10; --&#10; -- If user cancels commit dialog, raise error&#10; --&#10; IF NOT ( :System.Form_Status = 'QUERY'&#10; OR :System.Block_Status = 'NEW' ) THEN&#10; RAISE Form_Trigger_Failure;&#10; END IF;&#10; END IF;&#10; END IF;&#10; END IF;&#10; END IF;&#10;&#10; --&#10; -- Clear all the detail blocks for this master without&#10; -- any further asking to commit.&#10; --&#10; currel := Get_Block_Property(trigblk, FIRST_MASTER_RELATION);&#10; WHILE currel IS NOT NULL LOOP&#10; curdtl := Get_Relation_Property(currel, DETAIL_NAME);&#10; IF Get_Block_Property(curdtl, STATUS) <> 'NEW' THEN&#10; Go_Block(curdtl);&#10; Check_Package_Failure;&#10; Clear_Block(NO_VALIDATE);&#10; IF :System.Block_Status <> 'NEW' THEN&#10; RAISE Form_Trigger_Failure;&#10; END IF;&#10; END IF;&#10; currel := Get_Relation_Property(currel, NEXT_MASTER_RELATION);&#10; END LOOP;&#10;&#10; --&#10; -- Put cursor back where it started&#10; --&#10; IF :System.Cursor_Item <> startitm THEN&#10; Go_Item(startitm);&#10; Check_Package_Failure;&#10; END IF;&#10;&#10;EXCEPTION&#10; WHEN Form_Trigger_Failure THEN&#10; IF :System.Cursor_Item <> startitm THEN&#10; Go_Item(startitm);&#10; END IF;&#10; RAISE;&#10;&#10;END Clear_All_Master_Details;&#10;" ProgramUnitType="Procedure"/> <PropertyClass Name="DATE_BUTTON_CLASS" FontName="MS Sans Serif" ItemType="Display Item" Justification="Center" Bevel="Lowered" VisualAttributeName="DATE_NORMAL_VA" FontSpacing="Normal" Height="18" DatabaseItem="false" FontWeight="Medium" Width="22" BackColor="gray" FontStyle="Plain" FillPattern="transparent" FontSize="800" DirtyInfo="true" ForegroundColor="black"/> <RecordGroup Name="LOV6" RecordGroupQuery="select id, first_name||' '||last_name Name from s_emp where title='Sales Representative' order by last_name" DirtyInfo="true"> <RecordGroupColumn Name="ID" ColumnDataType="Number" MaximumLength="23"/> <RecordGroupColumn Name="NAME" ColumnDataType="Character" MaximumLength="51"/> </RecordGroup> <Trigger Name="PRE-FORM" TriggerText="DEFAULT_VALUE('','GLOBAL.customer_id');&#10;" DirtyInfo="true"/> <Trigger Name="WHEN-WINDOW-CLOSED" TriggerText="&#10; DO_KEY('exit_form');&#10;" DirtyInfo="true"/> <Trigger Name="WHEN-NEW-FORM-INSTANCE" TriggerText="Set_Application_Property(MENU_BUFFERING, 'false');&#10;set_window_property(forms_mdi_window, window_state, maximize);&#10;set_window_property(forms_mdi_window, title, 'Summit Application');&#10;&#10;-- Open the query&#10;refresh_tree_country;&#10;go_block('Navigator');&#10;:NavigationControls.view := 1;" DirtyInfo="true"/> <Trigger Name="KEY-EXIT" TriggerText="exit_form;" DirtyInfo="true"/> <Trigger Name="ON-CLEAR-DETAILS" TriggerText="--&#10;-- Begin default relation program section&#10;--&#10;BEGIN&#10; Clear_All_Master_Details;&#10;END;&#10;--&#10;-- End default relation program section&#10;--&#10;" DirtyInfo="true"/> <Trigger Name="ON-ERROR" TriggerText="null;" DirtyInfo="true"/> <VisualAttribute Name="STD_TOOLTIP" ParentFilename="stndrd20.olb" ParentModuleType="25" ParentType="39" DirtyInfo="true" ParentName="STD_TOOLTIP" ParentModule="STANDARDS"/> <VisualAttribute Name="CURRENT_RECORD" BackColor="BlueCanvas" DirtyInfo="true" ForegroundColor="white"/> <VisualAttribute Name="DATE_NORMAL_VA" FontName="MS Sans Serif" BackColor="white" FontSpacing="Normal" FontStyle="Plain" FillPattern="transparent" FontSize="800" DirtyInfo="true" FontWeight="Medium" ForegroundColor="black"/> <VisualAttribute Name="DATE_WEEKEND_VA" FontName="MS Sans Serif" BackColor="white" FontSpacing="Normal" FontStyle="Plain" FillPattern="transparent" FontSize="800" DirtyInfo="true" FontWeight="Medium" ForegroundColor="red"/> <VisualAttribute Name="DATE_SELECTED_VA" FontName="MS Sans Serif" BackColor="darkblue" FontSpacing="Normal" FontStyle="Plain" FillPattern="transparent" FontSize="800" DirtyInfo="true" FontWeight="Bold" ForegroundColor="white"/> <Window Name="MAIN" Width="538" Title="Summit Application - Control Panel" Height="338" DirtyInfo="true"/> <Window Name="DATE_LOV_WINDOW" Width="166" ResizeAllowed="false" VisualAttributeName="DEFAULT" Title="Date List of Values" Modal="true" Height="188" DirtyInfo="true" HideOnExit="true" WindowStyle="Dialog" MaximizeAllowed="false" MinimizeAllowed="false"/> </FormModule> </Module>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de