%# Conscious is when you are aware of something and conscience is when you %# wish you weren't. <& /RG/Elements/PageHeader &>
<&|/l&>Page Setup

 

<&|/l&>Margin settings
% my $count = 0; % foreach my $section ($ContentObj->Sections) { % my $SectionObj = $ContentObj->SectionObj(++$count); % }
<% loc($section) %> att('hidden') ? 'checked' : '' %>> <&|/l&>Hide % if ($section =~ /header|footer/) {   att('separator') ? 'checked' : '' %>> <&|/l&>Show separator % }
  % foreach my $key (map "margin_$_", qw/top bottom left right/) { % $m->print("") if $key eq 'margin_left'; % my $margin = $HeadObj->att($key); % $margin = 200 unless length($margin); % } % my $Orientation = $HeadObj->att('orientation') || 'portrait'; % foreach my $item (qw(portrait landscape)) { % }
<% loc($key) %>: mm
<&|/l&>Paper size: % my $Paper = $HeadObj->att('paper') || 'A4';
type="radio" name="Head-orientation" value="<% $item %>"><% loc(ucfirst($item)) %>
<%INIT> our $DB; my $ReportObj = $DB->ReportObj($session{reportId}); my $ContentObj = DBIx::ReportBuilder->new( Handle => $ReportObj->HandleObj, SearchHook => $ReportObj->SearchHook, Content => $session{reportContent}, Loc => \&loc, ); my $HeadObj = $ContentObj->root->first_child('head'); if ($Submit) { my $count = 0; foreach my $section ($ContentObj->Sections) { my $SectionObj = $ContentObj->SectionObj(++$count); $SectionObj->del_att('separator', 'hidden'); } foreach my $key (keys %ARGS) { if ($key =~ /^Head-(\w+)$/) { $HeadObj->set_att($1 => $ARGS{$key}); } elsif ($key =~ /^Section-(\d+)-(\w+)$/) { $ContentObj->SectionObj($1)->set_att($2 => $ARGS{$key}); } } $session{reportContent} = $ContentObj->RenderXML; $m->print(""); return; } <%ARGS> $Submit => undef