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

arianhojat

Members
  • Posts

    27
  • Joined

  • Last visited

arianhojat's Achievements

Contributor

Contributor (5/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. Trying to figure out how to customize JasperServer. Right now I have an Ireports user create a Jasper Report. So he'll tell me stuff like the report depends on parameter of for example: EmpIoyee ID, (Integer) His Managers, Array of Ints (Array of Ints) His Salary (Float)... I created a php-based app that you setup whatever you want to send over the data and their datatypes to java to run the report. like a html dropdown populated from a mysql server filled with employees, another ajax field which pops up his managers to send over for that employee, and maybe a hidden salary field which got populated based on first field. i just send this over to a jsp page which runs the report based on those parameters and the output type the user wants. Kinda messy but it works... But basically I have to do alot of work setting up each report. I'd like to get it so all this customization can be done in jasperserver. Last year i didnt find the examples to for example make a custom dynamic drop-down like the one filled with employees from a mysql db on our network.
  2. bump anyone? sidenote: these messageboards are SO frustrating for such a widely used product and noobs. my doGet in my servlet at the end has this but doesnt work: JRViewer jrv = new JRViewer(jasperPrint); JFrame aFrame = new JFrame("Report Viewer"); aFrame.getContentPane().add(jrv); jrv.setVisible(true); aFrame.getContentPane().add(jrv); aFrame.getContentPane().setPreferredSize(new Dimension(670, 800)); aFrame.getContentPane().setVisible(true); is it possible to get jasperreport in a servlet?
  3. Someone had a similar question but someone redirected him to do it in an applet. I send custom url parameters to be put into a HashMap to send to the jasper report. in a servlet would i just redirect to /servlets/JRServlet?urlParam1=xxx&urlParam2=xxx&urlParam3[key1]=xxx Also any code to setup a JRViewer in a servlet is appreciated, hopefully as easy as supplying jasperPrint object to some sort of JRViewerExporter? object like how PDF and HTML reports are made. Post edited by: arianhojat, at: 2007/10/26 18:00
  4. I ended up just saying to myself i could all the param stuff I want easily in php. and send params of html form to java which will output the report. If this is alright, i can send you general code to do this later. It basically is a very ghetto version of JasperServer but serves my needs if you know how to make javascript validation rules, php validation rules, and make things like date popups and dynamic select drop downs.
  5. Right now i only have experience with ireports, but if you set a paramter as a ireport prompt, do these all show up in jasperserver also? I saw some of the examples in JasperServer where all the inputs are in 1 popup and thought maybe they are all related to parameters, or are these defined separatedly in jasperServer.
  6. I would like a drop down select box be used, but unsure what examples I can find in jasperreports-project. Basically i want to have all countries in a drop down; countries chosen from my database. I assume this can also apply to checkboxes too, like a bunch of checkboxes in ireports to choose multiple countries; (again countries chosen from same database table). Once user submits the parameter data then u can use those values in report query... WHERE $X{IN, 'countries', javaVectorParameter } Kinda shaky on trying to get this to work. Post edited by: arianhojat, at: 2007/10/11 13:59
  7. got a calculation to work: new Float( $V{SumInvAmt}.floatValue()/( $V{SumInvAmt}.floatValue()-$V{SumWriteUp}.floatValue() ) )
  8. At the bottom of a report group i calculate many sums of amounts. and right after those sum fields, i want to do a calculation based on those variables. I tried setting up a variable that does a calculation based on those sum variables. Variable Class Type: java.lang.Float Calculation Type: None( since doing my own custom calculation?) Reset Type: Group Reset Group: nameOfGroup Variable Expression: new Float( $V{SumInvAmt}/( $V{SumInvAmt}-$V{SumWriteUp} ) ) Default Value: new Float(0)
  9. Sorry accidentally hit post new topic vs reply.... , i am guessing ireport user manual chapter 16. drag and drop the crosstab in ireport: dataset/subdataset would be the report query with userID as parameter, the row group it will ask for is i think project ID or project Name, column group is date, and choose Year or Month. and should make the dates ('dynamic' columns) along top. Post edited by: arianhojat, at: 2007/10/03 21:03
  10. I was wondering if there was a way to preview the query ireports runs. like maybe somehow make it print to the log? I have a query that should show some results but it doesnt so not sure why. Maybe parameters arent being correctly prepared.
  11. Trying something like below: HAVING Clients.Fname LIKE '%$P{FirstName}%' i assume since $P{FirstName} in prepared statement make it something like '%'Joe'%' anyway to get passed this other than passing the %% in the parameter?
  12. i have 4 variables that if they are set like so in Query via parameters: HAVING (Clients.Fname=$P{FirstName}) AND (Clients.Lname=$P{LastName}) AND (WIP.Wipdate Between $P{StartDate} And $P{EndDate}) but would like it to be smart and only build certain parts of query if parameter is set to something other than null. so if $P{FirstName} and $P{LastName} are set then the HAVING Clause will only have... HAVING (Clients.Fname=$P{FirstName}) AND (Clients.Lname=$P{LastName}) if just $P{StartDate} and $P{EndDate} then HAVING (WIP.Wipdate Between $P{StartDate} And $P{EndDate}) if none, then no HAVING clause at all. Any good ways to approach this?
  13. maybe submit a simple test for jasper peeps to see: like 'Create' statements for simple tables, then create a simple report with subreport doing basically same thing you want to try. and post it here. If their product is failing you, they should know bugs.
  14. i think i will set a param in main jrxml file for each subreport. The params default value will be for example sub1.jasper or the full absolute filepath, both would work (prefer relative in case move the file somewhere). If run from iReports this default is the value it will use. my tomcat app can supply in parameters to the report a absolute filepath which is based on relative location. So like the report files are all under tomcat/webapps/jasper/reports. Ireport user has access and can open a report from reports. The tomcat app, which is in /jasper, can find the file like so: parameters.put( "sub1", application.getRealPath("/reports/sub1.jasper") ); Hence both can find file appropriately theoretically (didnt try yet, just writing down idea :) ). Not sure why the boards are so dead here for vastly used product. Frustrating.
  15. Ive seen in message boards a couple times that someone will say in your java apps to pass the subreport location in a parameter with parameters.put( 'sub1', application.getPath('/reports/myreport.jasper')) so the full path to the subrepotr file is passeed as a paremter to get the subreport name and therefore found, or somehow just in the jrxml use the path relatively so both find it?. But i am unsure how to get it to work so if user is viewing NOT from my java app but from Ireports. Hence 1st method wont work. I need to make it work with both.
×
×
  • Create New...