topkatz Posted March 25, 2009 Share Posted March 25, 2009 Hello, I have a real simple report I setup to test js and see if it is a solution for our project. I set up my report to have a parameter, and checked off the 'Use as prompt' check box. I also set a default value. In ireport everything works as planed, a prompt pops up and askes me for a string. Once i give it one it loads that record. The problem comes when I save the report to the repo, and then open the report through tomcat and jasperservers frontend. For whatever reason I never get a prompt. It just uses the default. The really odd thing is that at one point I had instaleld the BI trial, and I ahd this working. Is there a trick to getting the community editon to propmt? Is there another setting, or config item I missed? Can community editon use a input? Thanks in advance. Mike Link to comment Share on other sites More sharing options...
topkatz Posted March 25, 2009 Author Share Posted March 25, 2009 I would be fine if I could get it to accept a param in the url via a get. This is not working either. It just keeps loading the default. Code://this works, and logs me inhttp://localhost:8080/jasperserver/flow.html?_flowId=viewReportFlow&reportUnit=/reports/IHS/client&standAlone=true&ParentFolderUri=/reports/IHS&j_username=jasperadmin&j_password=jasperadmin//this does not use my paramhttp://localhost:8080/jasperserver/flow.html?_flowId=viewReportFlow&reportUnit=/reports/IHS/client&standAlone=true&ParentFolderUri=/reports/IHS&CLIENT_ID=66&j_username=jasperadmin&j_password=jasperadmin Link to comment Share on other sites More sharing options...
topkatz Posted March 25, 2009 Author Share Posted March 25, 2009 Here is the xml paramater statment in my jrxml fileCode:<parameter name="CLIENT_ID" class="java.lang.String" isForPrompting="true"> <defaultValueExpression><![CDATA["4"]]></defaultValueExpression> </parameter> Link to comment Share on other sites More sharing options...
anandharaj Posted March 26, 2009 Share Posted March 26, 2009 Do you create this parameter in JasperServer? Have you attach this parameter to the report when creating it in JasperServer? Link to comment Share on other sites More sharing options...
topkatz Posted March 26, 2009 Author Share Posted March 26, 2009 I belive it is set up correctly. The only thing I did to the server was to check my report into a new report unit. My server looks like this: -->Reports-->IHS-->client-->Main jrxmlThen the main jrxml looks liek this: <?xml version="1.0" encoding="UTF-8"?><jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="report name" pageWidth="595" pageHeight="842" columnWidth="535" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <parameter name="CLIENT_ID" class="java.lang.String" isForPrompting="true"> <defaultValueExpression><![CDATA["4"]]></defaultValueExpression> </parameter> <queryString> <![CDATA[sELECT Clients.`lastName` AS Clients_lastName, Clients.`firstName` AS Clients_firstName, Clients.`middleInit` AS Clients_middleInit, Clients.`address` AS Clients_address, Clients.`city` AS Clients_city, Clients.`state` AS Clients_state, Clients.`zip` AS Clients_zip, Clients.`telephone` AS Clients_telephoneFROM `Clients` ClientsWHERE clientID = $P{CLIENT_ID}]]> </queryString> <field name="Clients_lastName" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="Clients_firstName" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="Clients_middleInit" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="Clients_address" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="Clients_city" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="Clients_state" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="Clients_zip" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="Clients_telephone" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <background> <band/> </background> <title> <band height="79"> <textField> <reportElement x="195" y="26" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$P{CLIENT_ID}]]></textFieldExpression> </textField> <staticText> <reportElement x="36" y="26" width="100" height="20"/> <textElement> <font size="14"/> </textElement> <text><![CDATA[Client Card]]></text> </staticText> </band> </title> <pageHeader> <band height="133"> <textField> <reportElement x="36" y="20" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{Clients_lastName}]]></textFieldExpression> </textField> <textField> <reportElement x="150" y="20" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{Clients_firstName}]]></textFieldExpression> </textField> <textField> <reportElement x="36" y="51" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{Clients_address}]]></textFieldExpression> </textField> <textField> <reportElement x="150" y="51" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{Clients_city}]]></textFieldExpression> </textField> <textField> <reportElement x="36" y="82" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{Clients_state}]]></textFieldExpression> </textField> <textField> <reportElement x="150" y="82" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{Clients_zip}]]></textFieldExpression> </textField> <textField> <reportElement x="306" y="20" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{Clients_telephone}]]></textFieldExpression> </textField> </band> </pageHeader> <columnHeader> <band height="61"/> </columnHeader> <detail> <band height="125"/> </detail> <columnFooter> <band height="45"/> </columnFooter> <pageFooter> <band height="54"/> </pageFooter> <summary> <band height="42"/> </summary></jasperReport> Link to comment Share on other sites More sharing options...
topkatz Posted March 26, 2009 Author Share Posted March 26, 2009 Now I see wha tyou meant by saying "did I set it up on the server". I have now added teh prompt in JS. This also fixed the 'get' issue. Post Edited by Michael Katz at 03/26/09 19:06 Link to comment Share on other sites More sharing options...
anandharaj Posted March 27, 2009 Share Posted March 27, 2009 OK, good :-) 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