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

JS 3.5 ireport 3.1 no input prompt from server?


topkatz

Recommended Posts

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

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

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

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 jrxml

Then 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_telephone
FROM
     `Clients` Clients
WHERE
     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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...