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

rathi

Members
  • Posts

    15
  • Joined

  • Last visited

rathi's Achievements

  1. I have a report, that has been internationalized. I have added the resource bundles (.properties) files on server and the reports are reading them too. However, the characters other than english are not recognized. For example in burmese, the word Field Staff is "Équipe de terrain" but to me it appears as "Ãquipe de terrain". This is how it looks The way the report is used is we code the jrxml and then publish it into the jasper server and from the server the report is called through its URL. That's it So where must I configure the utf8? In my jrxml the field names have been changed to new String($R{FieldStaff}.getBytes("ISO-8859-1"), "UTF-8"). But I am not able to achieve this with input control localization Any help on this would be of great help Thanks Rathi
  2. I have a report wherein I am trying localization. I have the resource bundles ready. The localization is working for column headers. But not working for the parameter names at JasperReports Server. The jrxml and .properties is as follows. Any ideas on why the parameters names do not reflect in the locale selected would be of great help. I am logging in with pt-BR locale <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="testinterntionalization” pageWidth="595" pageHeight="842" columnWidth=“555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin=“20" resourceBundle=“testinterntionalization" uuid="c3bdcfb8-c39a-4ce6-b38c-e7f05aa12d1b"> <property name=“ireport.jasperserver.url" value="http://54.169.66.240/jasperserver-pro/"/> <property name=“ireport.jasperserver.report.resource" value="/organizations/organization_1/Clients/DEV/testinterntionalization_files/main_jrxml"/> <property name=“ireport.jasperserver.reportUnit" value="/organizations/organization_1/Clients/DEV/testinterntionalization"/> <!-- some styles here --> <subDataset name="Dataset1" uuid="1d6f72b2-0f11-41ac-b81e-e83ff3318002"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="mysqldev"/> <parameter name="Name" class="java.lang.String"/> <parameter name="Country" class="java.lang.String"/> <parameter name="State" class="java.lang.String"> <parameterDescription><![CDATA[]]></parameterDescription> </parameter> <queryString> <![CDATA[select * from testinternationalization;]]> </queryString> <field name="country" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="state" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="name" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="age" class="java.lang.Integer"> <fieldDescription><![CDATA[]]></fieldDescription> </field> </subDataset> <parameter name="Name" class="java.lang.String"/> <parameter name="Country" class="java.lang.String"/> <parameter name="State" class="java.lang.String"> <parameterDescription><![CDATA[]]></parameterDescription> </parameter> <queryString> <![CDATA[select * from testinternationalization]]> </queryString> <field name="country" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="state" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="name" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="age" class="java.lang.Integer"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <summary> <band height="200" splitType="Stretch"> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> <componentElement> <reportElement x="0" y="100" width="510" height="100" uuid="808bf878-b921-4858-b9d4-4dee5c866c89"/> <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="169432ea-4c71-4fae-ab33-f344d48e7612"> <datasetParameter name="Country"> <datasetParameterExpression><![CDATA[$F{country}]]></datasetParameterExpression> </datasetParameter> <datasetParameter name="State"> <datasetParameterExpression><![CDATA[$F{state}]]></datasetParameterExpression> </datasetParameter> <datasetParameter name="Name"> <datasetParameterExpression><![CDATA[$F{name}]]></datasetParameterExpression> </datasetParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> </datasetRun> <jr:column width="100" uuid="6a314d61-4759-4396-9796-bc890f4018d0"> <property name="com.jaspersoft.studio.unit.width" value="pixel"/> <jr:detailCell style="Table_TD" height="30"> <property name="com.jaspersoft.studio.unit.width" value="px"/> <textField> <reportElement x="0" y="0" width="100" height="30" uuid="700b5c4a-53ee-4c25-9202-a7cf5960b8f1"> <property name="com.jaspersoft.studio.unit.width" value="pixel"/> </reportElement> <textFieldExpression><![CDATA[$F{country}]]></textFieldExpression> </textField> </jr:detailCell> </jr:column> <jr:column width="100" uuid="96d38f9c-1461-4cf6-b43d-5ddc7b031a19"> <property name="com.jaspersoft.studio.unit.width" value="pixel"/> <jr:detailCell style="Table_TD" height="30"> <property name="com.jaspersoft.studio.unit.width" value="px"/> <textField> <reportElement x="0" y="0" width="100" height="30" uuid="07dbe77e-5f72-44b8-981c-62f4dd5a7fcd"> <property name="com.jaspersoft.studio.unit.width" value="pixel"/> </reportElement> <textFieldExpression><![CDATA[$F{state}]]></textFieldExpression> </textField> </jr:detailCell> </jr:column> <jr:column width="100" uuid="c26b379e-d8aa-4ede-a79c-b4e521f2bd00"> <property name="com.jaspersoft.studio.unit.width" value="pixel"/> <jr:detailCell style="Table_TD" height="30"> <property name="com.jaspersoft.studio.unit.width" value="px"/> <textField> <reportElement x="0" y="0" width="100" height="30" uuid="7d71e238-237a-4ff3-83f4-8768995cab50"> <property name="com.jaspersoft.studio.unit.width" value="pixel"/> </reportElement> <textFieldExpression><![CDATA[$F{name}]]></textFieldExpression> </textField> </jr:detailCell> </jr:column> <jr:column width="100" uuid="4581f4df-2aa4-474f-925c-c2d7e4cb7795"> <property name="com.jaspersoft.studio.unit.width" value="pixel"/> <jr:detailCell style="Table_TD" height="30"> <property name="com.jaspersoft.studio.unit.width" value="px"/> <textField> <reportElement x="0" y="0" width="100" height="30" uuid="50be640f-e779-4ba7-95c7-a92377628278"> <property name="com.jaspersoft.studio.unit.width" value="pixel"/> </reportElement> <textFieldExpression><![CDATA[$F{age}]]></textFieldExpression> </textField> </jr:detailCell> </jr:column> </jr:table> </componentElement> <textField> <reportElement x="0" y="70" width="100" height="30" uuid="73e572e7-39ab-4366-a8b9-2ef5ecfbcc6d"/> <textFieldExpression><![CDATA[$R{country}]]></textFieldExpression> </textField> <textField> <reportElement x="100" y="70" width="100" height="30" uuid="0b662ca2-f379-458f-bf5c-e9d3cba4766c"/> <textFieldExpression><![CDATA[$R{state}]]></textFieldExpression> </textField> <textField> <reportElement x="200" y="70" width="100" height="30" uuid="65697c5f-c12c-4151-98a3-ff9059e98a84"/> <textFieldExpression><![CDATA[$R{name}]]></textFieldExpression> </textField> <textField> <reportElement x="300" y="70" width="100" height="30" uuid="a043231c-db12-4c08-a8bd-5e058c0acb36"/> <textFieldExpression><![CDATA[$R{age}]]></textFieldExpression> </textField> </band> </summary></jasperReport>[/code] The properties file - testinterntionalization_pt_BR.properties # portugesecountry:paísstate:Estadoname:nomeage:eranet.sf.jasperreports.prompt.label.Country=paísnet.sf.jasperreports.prompt.label.State=Estadonet.sf.jasperreports.prompt.label.Name=nome ThanksRathi
  3. -1down votefavorite I have a tabH Hi, I have data as follows. And I want the crosstab to be developed as shown. I am unable to add closurestatus and completiondate. These 2 get repeated for every attribute present in the activity. Any idea on this would be greatly appreciated
  4. Hi, In jasper report, I have created 2 parameters in the main dataset, p1 which of type date and p2 which also of date datype. Now, I copy paste the same 2 parameters in subdataset too. In the parameter map, for p2 , I create this expression, p2 = DateUtils.addMinutes(p1,someconstant) When I run the report I do not get any error. But p2 always returns null even if p1 is not null. Any ideas on what am I doing wrong would be very helpful. Thanks in advance Rathi
  5. Hi, I am unable to use date_add in the query editor. I am connected to mysql database select DATE_ADD(Registrationdate, INTERVAL $P{UtcOffSet} DAY) from farmer I get the following errors : a. no viable alternative at input 'INTERVAL' b. mismatched input $P{UtcOffSet} exepecting FROM Any idea on this would be of great help Thanks Rathi
  6. Hi, Its working now. Its just that the case statement must not be surrounded by brackets .... and 1= (case when .... then ... end) does not work but ... and 1 = case when.., then ... end works Thanks Rathi
  7. Hi , The suggested case expression is not working. Does jasper not support case? Thanks Rathi
  8. Hi, I have a jasper report. I have a table element inside a page header. The table element returns a single row all the time. In the Summary, I have another table element which returns a set of rows. I want the table in the page header to repeat on all pages, hence, I enabled 'Summary with Page Header and Footer'. From the time I enable this, my report is generation time has increased. And when I turn that option off, the report generation is very quick. Any idea on why this is happening ? Please help Thanks in advance Rathi
  9. Hi, I have 2 table elements, one table element is being used as the column header (gives out only one row) and the other to display all data. I am using a table element as a column header for 2 reasons, to hide/show columns and also change the header names dynamically I am able to achieve the above. But, how do I make the table element used as column header appear on every page? Thanks in advance Rathi
  10. Hi, I have a query in the main data set. And then another query in the subdata set. I have a table element made out of subdata set. Now for the query in the sub data set I want to pass a filter condition in the where clause. The parameter that I would create should be usable in the subdataset. As of now when I create a parameter, I am unable to use it as a where clause in the subdata set. In the parameter map, it only shows the main data fields. How do I associate the parameter to the fields in the sub data set? Thanks in advance Rathi
  11. Hi, I have a query as Selectattribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9, attribute10From farmer dfwhere df.CompanyId =$P{company_id}and 1= (case when $P{current_history} = 'Active' and df.partitionflag = 1 then 1when $P{current_history} = 'Inactive' and df.partitionflag = 0 then 1else 0end) The case part in the 'where' clause isn't working. Any help on understanding how to solve this would be greatly appreciated ThanksRathi
  12. Hi, The following steps were followed 1. create a variable called v1_enabed (string) and v1_display(string) in the main dataset. I also assigned the required fields(from the main data set) to these variables 2. I created a parameter p1(string) in subdataset 3. I use the subdataset fields for table creation. I used the table element. 4. I go the table and map the parameter p1(string) to the table. And I assign the expression ($V{v1_enabled} == Character.toString('1')) ? $V{v1_display} : $V{v1_display} to it Until here whenever I run the report, I do not get any error. 5. Now, I go the table. Pick up the 5th column and assign this in the print when expression section -- $P(p1) Now, comes the error, java.lang.String cannot be cast to java.lang.Boolean How do I solve this? Thanks in advance Rathi
  13. Thank you for the response. I tried this by assigning that expression to a parameter. But I got a cast rfom string to map error. How do I use the main dataset variables inside the table element of sub dataset?? Thanks again !
  14. Hi, I have a column header that is a part of the table element. And this table and its dataset are not a part of the main data set. I want to the column header to change dynamically based on values in the main dataset. The main dataset and sub data set return different resultsets The steps I followed were, 1. For the dataset in main dataset, I created a variable (v1) to hold the value of a particular column. (The main dataset returns only one row) 2. I create a parameter p1, in sub dataset and get it the value of variable v1. 3. Then I assign p1 to the static label of column header (of sub data set) in the "print when expression". Also, I want the same column to appear dynamically which I achieved. What I am unabe to achieve is that dynamic display of static label column header along with hide/show functionality Any help on this would be greatly appreciated Thanks in advance Rathi
×
×
  • Create New...