[% PROCESS inputs; PROCESS class_manip; PROCESS widget_manip; PROCESS logic_header.ttk; INCLUDE logout.ttk; WRAPPER html/html; INCLUDE header.ttk + navbar.ttk title="Basic Report Types"; WRAPPER html/body html.body.onload= "if (document.getElementById('templatename')) {" _ "document.getElementById('templatename').focus();" _ "document.getElementById('templatename').select();}"; IF !CGI.param('id'); INCLUDE all_stage1; ELSE; INCLUDE one_stage1; END; END; INCLUDE footer.ttk; END; #============================================================================= BLOCK one_stage1; table_xpath = '/reporter/tables/table[@id="' _ CGI.param('id') _ '"]'; table = config.findnodes(table_xpath); fact_table = table.findvalue('@id'); logme(fact_table); INCLUDE class_table classname=table; INCLUDE stage2_new IF CGI.param('create_stage2') == 1; END; BLOCK all_stage1; ''; END; BLOCK stage2_new; col_xpath = "/reporter/tables/table[@id='" _ fact_table _ "']/fields/field[@core='true']"; logme(col_xpath); %]
Template name


Select Filter Widgets and Output Dimensions
[% WRAPPER html/table width="100%" style='border-top: 1px solid black'; WRAPPER html/row; WRAPPER html/cell colspan=2 align='left' style="padding-left: 30px; border: solid black 1px; background: lightgray;"; # hidden input here ... table = config.findnodes("/reporter/tables/table[@id='$fact_table']"); INCLUDE hidden name="filter" value=fact_table; table.findvalue('label'); ' Core Columns'; END; END; #WRAPPER html/row; # INCLUDE html/cell content='Attribute' align='right'; # INCLUDE html/cell content='Widget' align='center'; #END; INCLUDE widget_selector tableid=fact_table columns=config.findnodes(col_xpath) force=1; END; dim_xpath = "/reporter/tables/table[@id='$fact_table']/links/link"; FOR dim_link = config.findnodes(dim_xpath); dim_table = dim_link.findvalue('@table'); link_id = dim_link.findvalue('@id'); dimension = config.findnodes("/reporter/tables/table[@id='$dim_table']"); '

'; WRAPPER html/table width="100%" style='border-top: 1px solid black'; WRAPPER html/row; WRAPPER html/cell align='left' width="33%" style="padding-left: 30px; border: solid black 1px; background: lightgray;"; link_label_xpath = '../../fields/field[@name="' _ dim_link.findvalue('@field') _ '"]/label'; dim_link.findvalue(link_label_xpath); ' -- '; dimension.findvalue('label'); ' Dimension'; END; WRAPPER html/cell align='left' style="padding-left: 30px; border: solid black 1px; background: white;"; # checkbox input here ... INCLUDE checkbox name="filter" value=link_id checked=1; 'Allow these columns to be used in Report Output'; END; END; INCLUDE widget_selector tableid=link_id; END; END; %] Public template

[% INCLUDE submit name='button' value='Save'; '
'; END; %]