Radha2049 Posted July 22, 2016 Share Posted July 22, 2016 I have created a table as my jasper report which holds more than one million arsenic data with various arsenic levels. The requirement of my project is:[1] User should give inputs through simple html forms and submit buttons[2] User should select data which has arsenic level (AL) <10 , 10<AL<=50 , AL<50[3] Now he should click submit button[4] Now after clicking the submit button, the report should should be dispayed as per the user inputs (AL <10 or 10<AL<=50 or AL<50)How to do this? Link to comment Share on other sites More sharing options...
hozawa Posted July 24, 2016 Share Posted July 24, 2016 What you're trying to do can be done with JasperReports Server using Input Controls. Link to comment Share on other sites More sharing options...
Solution arif3hosain Posted July 25, 2016 Solution Share Posted July 25, 2016 Beautiful question--- Firstly create your report using iReport/JasperStudio. Secondly, create parameters based on your required fields. Upload the report to the jasperserver including Input Control. Thanks & RegardsArif HosainSkype: Arif.3hosain Link to comment Share on other sites More sharing options...
Radha2049 Posted September 6, 2016 Author Share Posted September 6, 2016 hozawathank you so much for reply. i already have viewd lots of documents related to input control but got stucked. i want to generate the jasper report at the run time. report should be generated after the user input. i have checked "Input Control" functionality but they all create the static jasper reports but i want dynamic one. for small amount of datas and to create few reports i have used following query: <?phprequire_once __DIR__ . "/vendor/autoload.php";require_once "jrs-rest-php-client/src/Jaspersoft/Service/QueryService.php";use JaspersoftServiceQueryService;use JaspersoftClientClient; if($_SERVER['REQUEST_METHOD'] == 'POST'){$district = $_POST['district'];$format = $_POST['format'];$depth_used = $_POST['depth_used']; $conc_arsc = $_POST['CONC_ARSC']; header('Content-Type: application/pdf'); $c = new Client( "localhost", "8080", "jasperadmin", "jasperadmin", "/jasperserver" ); if($depth_used == "0-19"){if($conc_arsc == "0-9"){$report = $c->reportService()->runReport('/reports/Arsenic_Reports/DepthUsed_0_20_ConcArsc_0_10','pdf');echo $report;}if($conc_arsc == "10-50"){$report = $c->reportService()->runReport('/reports/Arsenic_Reports/DepthUsed_0_20_ConcArsc_11_50','pdf');echo $report;}if($conc_arsc == ">50"){$report = $c->reportService()->runReport('/reports/Arsenic_Reports/DepthUsed_0_20_ConcArsc_51_100','pdf');echo $report;}} } else{echo "Failed to generate pdf";}?> this extracts the static reports that have been previously created in jasper report server but i am stucked how to make my reports dynamic? please help me.its very urgent. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now