Jump to content

wcound

Members
  • Posts

    5
  • Joined

  • Last visited

wcound's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. No I did not include the username and password to the GET. Only to the POST. Passing the username and password in the URL is not secure. The authentication from the post should be OK and since I am getting a status of 200 as well as the report results I would assume as far as the JasperReports server is concerned it has done its job. The missing piece is how to get the PDFs file to either download or open in a new browser window.
  2. I am trying to integrate Jasper Reports into a java application useing the rest api. Our server is jasperserver-pro 6.1.1 and I am calling it from a java application using java version 1.8.0_152. I am running the application locally but the jasperserver is running on a remote server. Using org.apache.http.client I am able to successfully do a POST call to the rest login, then a GET call to retreive the requested report in pdf format. At this point I expected a download of the file, but that is not happening. The call is successful and I am able to print out the pdf results to a log file to confirm that the call is actually working. When I look at the header results from the GET response I see that the value for the Content-Disposition is attachment; filename="myFilename.pdf". I assumed that the file would download to the client machine. I have tried in both chrome and firefox thinking that it might be a browser issue, but I get the same results. Anybody have any ideas?
  3. This field is displayed in the page header band and in order to display the field I have to set the evaluation time to Band. When I change the evaluation time to something else the field does move up when blank, however I no longer get any data displaying in the field. I will test out moving the field from the header band to the detail band to see if that makes any difference. I have tested out moving the field to the detail band but that does not make any difference.
  4. All of the fields below are set to Float. This field that uses the expression is the only field in the report that does not move upwards.
  5. I am using Jaspersoft Studio 6.4.3.final to create a report. In this report I have two string variables v_main at the report level and v_sub at the dataset level. <variable name="v_main" class="java.lang.String" resetType="None"> <initialValueExpression><![CDATA[null]]></initialValueExpression> </variable> <variable name="v_sub" class="java.lang.String" resetType="None"> <variableExpression><![CDATA[$F{T_TEXT}]]></variableExpression> <initialValueExpression><![CDATA[null]]></initialValueExpression> </variable> The string field T_TEXT from the dataset is used to set the v_sub value and is returned to v_main. <returnValue fromVariable="v_sub" toVariable="v_main"/> I then use the variable in a text field to display some text. <textField evaluationTime="Band" isBlankWhenNull="true"> <reportElement positionType="Float" mode="Opaque" x="0" y="0" width="320" height="10" isRemoveLineWhenBlank="true" backcolor="#B1FCFC" > <property name="com.jaspersoft.studio.unit.height" value="pixel"/> </reportElement> <textElement> <font fontName="Arial" size="8"/> </textElement> <textFieldExpression><![CDATA[LEN( $V{v_main})!=null?"Display This Text ":null]]></textFieldExpression> </textField> The problem I am having is when the value in this field is null the field is still taking up space in the report. I have added LEN( $V{v_main})!=null as a print when expression on this field to remove the blank line but have not been able to get it to work. Any suggestions?
×
×
  • Create New...