Creating Links to Reports in Web Pages
There are several options for creating links to reportico reports.
Firstly you may want to link to Reportico in a new browser/tab or you might want to load the Reportico in a popup window from an ajax call.
You can create a link to a report :-
echo CHtml::link('Run Sales Totals Report', array('reportico/mode/execute', 'project' => 'northwind', 'report' => 'salestotals.xml'), array('target' => '_blank'));Try this out
Remove the wrapping ( Partial Render )
Note that the above shows Reportico in a new browser page, but with the output embedded in your site wrapping. To run Reportico in a partial mode so it only shows the output without the wrapping, add the url parameter "partialReportico=1" as followsecho CHtml::link('Run Sales Totals Report', array('reportico/mode/execute', 'project' => 'northwind', 'report' => 'salestotals.xml' 'partialReportico' => '1' ), array('target' => '_blank'));Try this out
Add a print button
Now you might want to add a print button, so add the parameter printable_html=1
echo CHtml::link('Run Sales Totals Report', array('reportico/mode/execute', 'project' => 'northwind', 'report' => 'salestotals.xml' 'partialReportico' => '1', 'printable_html' => '1' ), array('target' => '_blank'));Try this out
Generate a PDF/CSV Report
To link to a PDF or CSV just add "target_format=PDF" or "target_format=CSV" ..
echo CHtml::link('Run Sales Totals Report', array('reportico/mode/execute', 'project' => 'northwind', 'report' => 'salestotals.xml' 'partialReportico' => '1', 'target_format' => 'PDF' ), array('target' => '_blank'));Try this out