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

reportdev

Members
  • Posts

    413
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by reportdev

  1. Login to the jasper repository database and find the table which has all the resources in it. That table should have the owner information
  2. As mentioned by you, there are multiple ways you can achieve this functionality. You need some java experience/web app development to try these You can embed the entire report server using http api and rest calls. http://community.jaspersoft.com/wiki/embedding-using-http-apiUse jasperreports api to generate the report and display it inside your app. http://www.ewebtutorials.com/generate-pdf-report-using-jasper-report-api-in-java.html
  3. it works fine for me ... ($F{CHARGE}== null || $F{QTYORDERED}!= null ) ? true : false <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 6.4.0.final using JasperReports Library version 6.4.1 --> <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="conditionalexpression" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="22117eaa-8eec-47bb-bc1c-6a31d66ff7bb"> <property name="com.jaspersoft.studio.data.sql.tables" value=""/> <queryString> <![CDATA[ select 1 as ID, 30 as charge, 20 as qtyordered from dual union select 2 as ID, null as charge, 30 as qtyordered from dual union select 3 as ID, 50 as charge, null as qtyordered from dual ]]> </queryString> <field name="ID" class="java.math.BigDecimal"/> <field name="CHARGE" class="java.math.BigDecimal"/> <field name="QTYORDERED" class="java.math.BigDecimal"/> <background> <band splitType="Stretch"/> </background> <columnHeader> <band height="30" splitType="Stretch"> <staticText> <reportElement x="0" y="0" width="185" height="30" uuid="4f60af1b-9bdd-4d00-bc1e-01e6d5f3d8e5"/> <text><![CDATA[iD]]></text> </staticText> <staticText> <reportElement x="185" y="0" width="185" height="30" uuid="7b390789-c90e-452f-b0ee-0b78391c83b6"/> <text><![CDATA[CHARGE]]></text> </staticText> <staticText> <reportElement x="370" y="0" width="185" height="30" uuid="7501b094-c578-44ee-84dd-fae4ab519296"/> <text><![CDATA[QTYORDERED]]></text> </staticText> </band> </columnHeader> <detail> <band height="30" splitType="Stretch"> <printWhenExpression><![CDATA[($F{CHARGE}== null || $F{QTYORDERED}!= null ) ? true : false]]></printWhenExpression> <textField> <reportElement x="0" y="0" width="185" height="30" uuid="118cb63a-3ec9-467b-b276-6b2b3a4d5778"/> <textFieldExpression><![CDATA[$F{ID}]]></textFieldExpression> </textField> <textField> <reportElement x="185" y="0" width="185" height="30" uuid="f695806a-33da-4754-bf02-701d5d9d0ec3"/> <textFieldExpression><![CDATA[$F{CHARGE}]]></textFieldExpression> </textField> <textField> <reportElement x="370" y="0" width="185" height="30" uuid="971cc89a-957b-437b-9d08-224870ee4e1a"/> <textFieldExpression><![CDATA[$F{QTYORDERED}]]></textFieldExpression> </textField> </band> </detail> </jasperReport>
  4. ok. I just realized that I missed something from your question. I missed the OR function of the pattern. ^[0-9]{0,10}$ Use this pattern. sorry about it my friend.
  5. when you say accessevents, are you talking about the tomcat access logs ? or the jasper server monitoring logs ?
  6. Hi there, sorry for providing wrong info. I have tested this functionality and the new server 6.4 retains the input control modifications even after publishing the report again.
  7. The same pattern ^[0-9]{10}$ is working to disallow the blank entries. please check Remove the Mandatory option, its not necessary as the pattern match will not allow the user to go forward without entering correct pattern.
  8. https://community.jaspersoft.com/documentation/jasperreports-server-user-guide/adding-input-controls These settings are saved inside an xml file on the server. when you try to publish the report again from the studio, the settings get overwritten. These settings are ideal when you publish a report and dont modify them afterwards. if you keep on modifying these reports, then there is no point in selecting these options on the server.
  9. From my experience with the oracle reports, The only thing that you can salvage out of the rdf files would be SQL statements. The SQL statements can be easily accessed by converting the rdf files to xml format. If the reports have multiple datablocks, I found it difficult in these cases because I had to manually join them. The layout and other elements in the report jrxml should be designed manually.
  10. Edit the report by right clicking on the reportIn the controls and resources tab, Display Mode: should be set to In Page.
  11. You can create a table element inside the detail band to achieve this kind of merging. the detail band text element should have position type as Fix relative to Top and Stretch type as Relative to band height. The table element would be growing based on the data, but the text element would be locked down at the top and stretching towards the bottom. Check the below jrxml. <?xml version="1.0" encoding="UTF-8"?> <!-- Created with Jaspersoft Studio version 6.4.0.final using JasperReports Library version 6.4.1 --> <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="tablealignment" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="f6dbae90-77f7-4f15-b929-2fb39c55987c"> <property name="com.jaspersoft.studio.data.sql.tables" value=""/> <style name="Table_TH" mode="Opaque" backcolor="#F0F8FF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> <topPen lineWidth="0.5" lineColor="#000000"/> <leftPen lineWidth="0.5" lineColor="#000000"/> <bottomPen lineWidth="0.5" lineColor="#000000"/> <rightPen lineWidth="0.5" lineColor="#000000"/> </box> </style> <style name="Table_CH" mode="Opaque" backcolor="#BFE1FF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> <topPen lineWidth="0.5" lineColor="#000000"/> <leftPen lineWidth="0.5" lineColor="#000000"/> <bottomPen lineWidth="0.5" lineColor="#000000"/> <rightPen lineWidth="0.5" lineColor="#000000"/> </box> </style> <style name="Table_TD" mode="Opaque" backcolor="#FFFFFF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> <topPen lineWidth="0.5" lineColor="#000000"/> <leftPen lineWidth="0.5" lineColor="#000000"/> <bottomPen lineWidth="0.5" lineColor="#000000"/> <rightPen lineWidth="0.5" lineColor="#000000"/> </box> </style> <subDataset name="Dataset1" uuid="14e0e132-36f8-4f16-8e64-12d231b45acf"> <property name="com.jaspersoft.studio.data.sql.tables" value=""/> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="PRODSUP"/> <parameter name="ID" class="java.math.BigDecimal"/> <queryString language="SQL"> <![CDATA[select * from ( select 1 as ID, 'Color1-1' as text from dual union all select 1 as ID, 'Color1-2' as text from dual union all select 1 as ID, 'Color1-3' as text from dual union all select 2 as ID, 'Color2-1' as text from dual union all select 3 as ID, 'Color3-1' as text from dual union all select 3 as ID, 'Color3-2' as text from dual union all select 3 as ID, 'Color3-3' as text from dual union all select 3 as ID, 'Color3-4' as text from dual union all select 3 as ID, 'Color3-5' as text from dual ) where ID = $P{ID}]]> </queryString> <field name="ID" class="java.math.BigDecimal"/> <field name="TEXT" class="java.lang.String"/> </subDataset> <queryString language="SQL"> <![CDATA[select 1 as ID, 'One' as text from dual union all select 2 as ID, 'Two' as text from dual union all select 3 as ID, 'Three' as text from dual]]> </queryString> <field name="TEXT" class="java.lang.String"/> <field name="ID" class="java.math.BigDecimal"/> <group name="ID"> <groupExpression><![CDATA[$F{ID}]]></groupExpression> </group> <background> <band splitType="Stretch"/> </background> <columnHeader> <band height="20" splitType="Stretch"> <staticText> <reportElement x="0" y="0" width="80" height="20" uuid="ab262d73-28fe-4290-9bb3-fd12f0cf277b"/> <text><![CDATA[Column Header]]></text> </staticText> <staticText> <reportElement x="80" y="0" width="100" height="20" uuid="8e7b84f5-2e38-4c87-8714-7c178f72e83b"/> <text><![CDATA[Table Header]]></text> </staticText> </band> </columnHeader> <detail> <band height="20" splitType="Stretch"> <textField> <reportElement stretchType="RelativeToBandHeight" x="0" y="0" width="80" height="20" uuid="404e4662-e55c-4781-b306-22436e82f293"/> <box> <pen lineWidth="1.0"/> </box> <textFieldExpression><![CDATA[$F{TEXT}]]></textFieldExpression> </textField> <componentElement> <reportElement x="80" y="0" width="100" height="20" uuid="0cdcdc65-ef96-4d7c-b660-5f53e2d1ec19"> <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/> <property name="com.jaspersoft.studio.table.style.table_header" value="Table_TH"/> <property name="com.jaspersoft.studio.table.style.column_header" value="Table_CH"/> <property name="com.jaspersoft.studio.table.style.detail" value="Table_TD"/> </reportElement> <jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd"> <datasetRun subDataset="Dataset1" uuid="544c6f50-1f07-4684-9297-7b22e2a19e30"> <datasetParameter name="ID"> <datasetParameterExpression><![CDATA[$F{ID}]]></datasetParameterExpression> </datasetParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> </datasetRun> <jr:column width="100" uuid="bfcaa2cb-4b81-42d4-aea8-87c5cd753369"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> <property name="com.jaspersoft.studio.unit.width" value="pixel"/> <jr:detailCell style="Table_TD" height="20"> <property name="com.jaspersoft.studio.unit.height" value="px"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> <box> <pen lineWidth="1.0"/> </box> <textField> <reportElement x="0" y="0" width="100" height="20" uuid="c343f8cf-faef-472a-864d-d20dc4f8998b"/> <textFieldExpression><![CDATA[$F{TEXT}]]></textFieldExpression> </textField> </jr:detailCell> </jr:column> </jr:table> </componentElement> </band> </detail> </jasperReport>
  12. Try this pattern on the input control. ^[0-9]{10}$ Dont use any double quotes or special characters around this pattern. java implementation if you are interested public static void main(String[] args) { String s2 = "1234567891"; String regnum = "^[0-9]{10}$"; Pattern pattern2 = Pattern.compile(regnum); Matcher matcher2 = pattern2.matcher(s2); System.out.println(matcher2.matches()); }
  13. it works after some trial and error / searching. https://howtodoinjava.com/regex/java-regex-validate-social-security-numbers-ssn/ public static void main(String[] args) { String s = "123-45-6789"; String regex = "^(?!000|666)[0-8][0-9]{2}-(?!00)[0-9]{2}-(?!0000)[0-9]{4}$"; Pattern pattern = Pattern.compile(regex); Matcher matcher = pattern.matcher(s); System.out.println(matcher.matches()); } Same pattern when used on the jasper input control, disallows any other patterns.
  14. I have been trying to put some validations on my input controls on reports server using 6.4. I have used the same pattern mentioned in the referenced question, but still no luck . http://community.jaspersoft.com/questions/539304/input-control-patterns The input control page displays an error message "This field does not match the required pattern". I have also tried using the Java regex patterns, but still it does not accept the Strings in the same pattern. I'm I missing something here ?
  15. We have written our own java deployment script using JasperserverRestClient Api. This code can publish the multiple report units onto the jasper server
  16. Even I got this error message using Jasper Server 6.4 and Jasper Studio 6.4 After investigation, I found that the machine from which I was publishing was using 32 bit jdk. After installing the 64 bit jdk, tried publishing the report and it worked fine. please check the jdk version
  17. The difference that you have observed is because of the Calculation being done. When you created a text field, the calculation was being performed inside that particular band (either group or column footer) When you created a variable, the calculation can be performed at various levels and jasper provides multiple configuration options for these calculations. If the variable configuration is not properly done, it would result in a null value. The increment type and reset type are the main options that you should be selecting carefully on a variable.
  18. You dont need a print when expression. For example an entire report size is 842 X 595 pixels. Increase the Title band height and text element height to 595 pixels and it should occupy the first page altogether.
  19. The jasperadmin user should be able to export all the report units or in fact a folder. after logging in as jasperadmin, right click on any folder and you should see export options. you can get jrxml and xml for each of the report units . jrxmls will have the layouts and datasources. xmls will have the metadata and the parameters for the report. Once the jrxml is exported, you can import these into an eclipse project or jasper studio project.
  20. This is not possible through jasper server. You need to have a java print service, which should be able to parse the jasper print object and then send it to the printer. Check this http://jasperreports.sourceforge.net/sample.reference/printservice/index.html
  21. as far as i know, there is no easy way. If you are printing each record a separate page, then you can get the page_number's from the sql itself by doing cumulative_total - for the current page number count(*) - for the total page number
  22. download the mysql driver first. In the data adapter configuration, go to Driver Classpath tab. Add the driver to this classpath and it should work fine.
  23. Create a sum variable for your field. In the Last Page Footer band, drag the REPORT_COUNT variable and your sum variable into it. The evaluation time should be now for both the fields.
  24. Try this $V{V1}.multiply($V{V2}.divide(new BigDecimal(100))).multiply(new BigDecimal(90).divide(new BigDecimal(100)))
  25. try to create the link in the below way https://jasperadmin:password@localhost:8443/jasperserver/rest_v2/reports/reports/report_name.pdf?parameter_name=parameter_value
×
×
  • Create New...