You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: report.rs
    path of file: ./repos/allocscope/allocscope-view/src
    
    the code of the file until where you have to start completion: /*
    allocscope  -  a memory tracking tool
    Copyright (C) 2023  Matt Kimball

    This program is free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by the
    Free Software Foundation, either version 3 of the License, or (at your
    option) any later version.

    This program is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
    or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
    for more details.

    You should have received a copy of t
    
pub fn generate_report(trace: trace::Trace) -> Result<(), Box<dyn Error>> {
    let mut transaction = trace::Transaction::new(&trace)?;

    let row_count = rows::count_rows(&mut transaction, None)?;
    let rows =
        rows::iter_stackentry_rows(&mut transaction, rows::SortMode::Bytes, None, 0, row_count)?;

    println!("allocscope {} memory report", env!("CARGO_PKG_VERSION"));
    println!("https://allocscope.com/support");
    println!("");
    println!("BYTES BLOCK LEAKS   Function");
    for entry in rows {
        let function = format_function_tree_row(None, &entry);
        println!(
            "{} {} {} {}",
            format_table_value(entry.maximum_size, 1024),
            format_table_value(entry.total_blocks, 1000),
            format_table_value(entry.unfreed_blocks, 1000),
            function,
        );
    }

    Ok(())
}