Reportico Laravel Module

Creating Links to Reports in Web Pages

There are several options for creating links to reportico reports.
To embed links you can include them in your laravel views and pages. You can either embed the HTML for the links or use the Laravel HTML::linkAction helper function to generate the link more easily. Example links are given below.

When running reports for projects that you have password protected, you will need to pass that password through the project_password parameter

Create a Link to Report Output

Firstly you may want to link to Reportico in a new browser/tab.

You can create a link to a report output:-

url('reportico/execute/{project_folder}/{report_xml_file}?new_reportico_window=1')

Try it ..

  • Click here for the Sales Report
  • Run it as an ajax request

    To run as an ajax request and have the output appear in a popup div you need to include a div to present the report ( or a bootstrap modal box ) within your page. Then include some jQuery to handle the link click event and then pass the link url to the ajax call and render the results to the div.

  • Click here for a Popup Stock Report
  • So create the link and include the "reportico_ajax_request" parameter set to 1 to tell reportico its an ajax call. Also because this page already uses bootstrap we pass reportico_bootstrap_preloaded=1 to tell Reportico not to load it again.

    Also include a class or id on the link you can use to trigger the jQuery click on.

    
    <a id="reportico_popup" href="{{
    url('reportico/prepare/{project_folder}/{report_xml_file}/new_reportico_window=1&reportico_bootstrap_preloaded=1&reportico_bootstrap_styles=3&reportico_ajax_request=1')
    }}>Click here for a Popup Sales Report</a>
    

    Include some jQuery to trigger the link to populate your div like:-

    <script>
    $(document).on('click', '#reportico_popup', function(event)
    { 
    $('#myModal').modal('show') ;
        jQuery.ajax({
        type: "GET",
        url: jQuery(this).attr('href')
        }).done(function(html_form) {
        jQuery('#myModal').show();
        jQuery('#modalcontent').html(html_form);
    });
    return false;
    });
    </script>
    

    Also you can run a report criteria entry in a separate div just setting the controller action to prepare.

  • Click here for a Popup Sales Report in Criteria Entry Mode
  • Add a print button

    Now you might want to add a print button, so add the parameter printable_html=1

    url('reportico/execute/{project_folder}/{report_xml_file}?new_reportico_window=1&printable_html=1')
    
  • Click here for a Printable Sales Report
  • Generate a PDF/CSV Report

    To link to a PDF or CSV just add "target_format=PDF" or "target_format=CSV" ..

    url('reportico/execute/{project_folder}/{report_xml_file}?new_reportico_window=1&target_format=PDF')
    
  • Click here for a PDF Sales Report
  • Create a link to a report menu

    To link to a Menu use the menu action

    url('reportico/menu/{project_folder}')
    
  • Click here for a Report Menu
  • Create a link to a report in criteria mode

    To link to a report in criteria entry mode

    url('reportico/prepare/{project_folder}/{report_xml_file}')
    

  • Click here for a Report In Criteria Entry Mode