@@ -, +, @@ --------- -- only one file -- this is the only setting of the compound tt variable -- There is an TT IF statement for compound. -- In that statement it would trigger 'Save Compound' -- only the template and the guided report perl -- only triggered by the save code in the guided report perl -- in the export for the C4/Reports/Guided.pm -- left over in export --- C4/Reports/Guided.pm | 31 +--------------------- .../en/modules/reports/guided_reports_start.tt | 25 ----------------- reports/guided_reports.pl | 16 ----------- 3 files changed, 1 insertion(+), 71 deletions(-) --- a/C4/Reports/Guided.pm +++ a/C4/Reports/Guided.pm @@ -39,7 +39,7 @@ BEGIN { @ISA = qw(Exporter); @EXPORT = qw( get_report_types get_report_areas get_report_groups get_columns build_query get_criteria - save_report get_saved_reports execute_query get_saved_report create_compound run_compound + save_report get_saved_reports execute_query get_saved_report get_column_type get_distinct_values save_dictionary get_from_dictionary delete_definition delete_report format_results get_sql nb_rows update_sql @@ -718,35 +718,6 @@ sub get_saved_report { return $dbh->selectrow_hashref($query, undef, $report_arg); } -=head2 create_compound($masterID,$subreportID) - -This will take 2 reports and create a compound report using both of them - -=cut - -sub create_compound { - my ( $masterID, $subreportID ) = @_; - my $dbh = C4::Context->dbh(); - - # get the reports - my $master = get_saved_report($masterID); - my $mastersql = $master->{savedsql}; - my $mastertype = $master->{type}; - my $sub = get_saved_report($subreportID); - my $subsql = $master->{savedsql}; - my $subtype = $master->{type}; - - # now we have to do some checking to see how these two will fit together - # or if they will - my ( $mastertables, $subtables ); - if ( $mastersql =~ / from (.*) where /i ) { - $mastertables = $1; - } - if ( $subsql =~ / from (.*) where /i ) { - $subtables = $1; - } - return ( $mastertables, $subtables ); -} =head2 get_column_type($column) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -794,31 +794,6 @@ $(document).ready(function() { [% END %] -[% IF ( compound ) %] -
-Master: -  -Sub report: -
- - -
-[% END %] - -[% IF ( save_compound ) %] -[% master %]
-[% subsql %] -[% END %] - - [% IF saved_results %]

Saved report results

[% name %]

--- a/reports/guided_reports.pl +++ a/reports/guided_reports.pl @@ -974,22 +974,6 @@ elsif ( $phase eq 'Create report from SQL' ) { ); } -elsif ($phase eq 'Create Compound Report'){ - $template->param( 'savedreports' => get_saved_reports(), - 'compound' => 1, - ); -} - -elsif ($phase eq 'Save Compound'){ - my $master = $input->param('master'); - my $subreport = $input->param('subreport'); - my ($mastertables,$subtables) = create_compound($master,$subreport); - $template->param( 'save_compound' => 1, - master=>$mastertables, - subsql=>$subtables - ); -} - # pass $sth, get back an array of names for the column headers sub header_cell_values { my $sth = shift or return (); --