Jump to content
We've recently updated our Privacy Statement, available here ×

andryfreddyh

Members
  • Posts

    2
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by andryfreddyh

  1. I have implemented jasper reports using version 6.8.1 in my application with php clent integration And everything is working fine with this code and i can able to export pdf & csv files. But i am getting an issue while exporting xls file when I export to .xls format the results are not as expected but the format is messy like this I really appreciate and expect help from all my friends if anyone knows the solution to my problem, thank you this is my Export Code ..insert you<?phprequire_once __DIR__.'/vendor/autoload.php';header('Content-Type: text/html');use JaspersoftClientClient;if ($_SERVER['REQUEST_METHOD'] == 'POST') { $sentControls = array(); foreach ($_POST as $key => $value) { switch ($key) { case 'uri': $uri = htmlentities($value); break; case 'name': $currentReportName = htmlentities($value); break; case 'format': $format = htmlentities($value); break; default: $sentControls[$key][] = $value; break; } }} else { // First call process the GET report URI $uri = (isset($_GET['uri'])) ? htmlentities($_GET['uri']) : false; $currentReportName = ''; $format = 'html';}$screen = '';$_PageTitle = 'Report Viewer' ; $tabArray = array();$client = new Client( 'localhost:8080/jasperserver', 'jasperadmin', 'jasperadmin', ''); $client->setRequestTimeout(90000);$controls = array( 'Start_Date' => '2019-08-01', 'End_Date' => '2019-08-31', );$report = $client->reportService()->runReport('/Nasabah/Test_report', $format, null, null, $controls);if ($format == 'html') { $screen .= $report; } else { header('Cache-Control: must-revalidate'); header('Pragma: public'); header('Content-Description: File Transfer'); header('Content-Disposition: attachment; filename=report.' . $format ); header('Content-Transfer-Encoding: binary'); header('Content-Length: ' . strlen($report)); header('Content-Type: application/' . $format); echo $report; die(); }?><!DOCTYPE html PUBLIC "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><title>Tanamduit</title><div class="row"> <div class="col-md-3"> <h3><?php echo $currentReportName; ?></h3> <form action="index.php" method="POST"> <input type="hidden" name="name" value="<?php echo $currentReportName ?>"> <select name="format"> <option value="pdf">PDF</option> <option value="xls">Excel</option> <option value="csv">CSV</option> </select> <input type="submit" value="Export"> </form><hr/> </div><div class="col-md-9"> <div class="card example-1 scrollbar-ripe-malinka" style="height:500px"> <div class="card-body"> <?php // echo $screen; echo $report; </div></div></div> </html>r code here..[/code]
  2. Saya memiliki masalah yang sama dengan Anda, saya ingin memiliki laporan di Jasper Report. Saya menelepon Laporan ke aplikasi php saya dengan Iframe , tetapi saya bermaksud untuk menghapus logo dan beberapa menu di dasbor , saya mencoba menambahkan CSS tambahan ke Override.CSS tetapi tidak berfungsi saat berjalan di Iframe. Apakah Anda pikir ada cara lain yang bisa saya lakukan untuk menyelesaikan masalah ini? Ini adalah kode yang saya gunakan untuk memanggil Jasper melalui Iframe: <iframe src = <? php echo $ iFrameSRC; ?> height = "<? php echo $ iFrameHeight;?>" width = "100%" marginheight = "0" frameborder = "0" scrolling = "no"> </iframe> Ini adalah tampilan aplikasi saya melalui Iframe:
×
×
  • Create New...