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

luked

Members
  • Posts

    49
  • 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 luked

  1. Hi there, Have you tried casting {Auto_dis1} into a substring to pull only the numbers?
  2. Hi there, Have a look at the below in regards to adding aparmeters into an SQL statement, this may help. https://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-user-guide/v60/using-parameters-queries
  3. I am interested in what your error means too. I recently upgraded to 6.13.0 from 6.6.0 and all reports I had made in 6.6.0 that are imported to 6.13.0 now have the same error message you are getting - "Parse Error at line 233 column 42: cvc-complex-type.3.2.2: Attribute 'textAdjust' is not allowed to appear in element 'textField'." I have to change the line in the source to read </textField> for my report to run now.
  4. Good morning, There is a built in Variable for your created group. It will be called YOURGROUPNAME_COUNT.
  5. Hi there, If you are using an SQL query to pull your data you will need to adjust the format in the query. Using the pattern in the field will not change the SQL format.
  6. I am unsure of how your fields are set up but I had a similar issue and I used the below - Boolean.valueOf($F{my field}.contains("light")) ? "Lighting" : "$F{my field}" Hope this helps.
  7. Hi there, The builtin parameter SORT_FIELDS could be used to handle dynamic data sorting. This parameter should contain a list of dynamic JRSortField elements, based on user's input at runtime.
  8. luked

    variable

    Below is a snipet from the docs which you might find helpful. Using an If-Else Construct in an ExpressionA way to create an if-else-like expression is by using the special question mark operator. For example: (($F{name}.length() > 50) ? $F{name}.substring(0,50) : $F{name}) The syntax is (<condition>) ? <value on true> : <value on false>. It is extremely useful, and can be recursive, meaning that the value on true and false can be represented by another expression which can be a new condition: (($F{name}.length() > 50) ? (($F{name}.startsWidth(“A”)) ? “AAAA” : “BBB”) : $F{name}) This expression returns the String AAAA when the value of the field name is longer than 50 characters and starts with A, returns BBB if it is longer than 50 characters but does not start with A, and, finally, returns the original field value if neither of these conditions is true.
  9. Make sure your page number variable is in your Page Footer band
  10. Give the below a try - Boolean.valueOf($p{}==1) ? 26 : 0 So what the above will do if your parameter equals 1 then return 26 else 0
  11. In your variable have the Value Class Name set to java.math.BigDecimal and try putting the same infront of your $F{QTYONHAND}. BigDecimal.valueOf($F{QTYONHAND}).subtract(BigDecimal.valueOf($V{qtyToFulfill_1})). Keep your field class for $F{QTYONHAND} as java.math.BigDecimal and your variable class for $V{qtyToFulfill_1} as java.lang.Double. Only change the class in your calculation variable. Hopefully that helps you out
  12. Try changing your $V{qtyToFulfill_1} field to BigDecimal. $F{QTYONHAND}.subtract(BigDecimal.valueOf($V{qtyToFulfill_1}))
  13. Incrementer Factory Class NameThe calculation functions are useful but are also generics and limited to the numeric types. You may have a case where something more specific is needed. Suppose you have a field of type String and you want to concatenate the value read. You can do this by defining a new Incrementer. An incrementer is a piece of java code that extends the interface JRIncrementerFactory, and can build a personalized calculation function to do what you need. Every calculation function receives the expression value and the variable value and returns the result of the increment, so there is everything needed to do the calculation and return the right value.
  14. I use the below for my date parameters in my SQL queries AND cast(open_date as date) BETWEEN to_date($P{Start Date YYYYMMDD}, 'YYYYMMDD') AND to_date($P{End Date YYYYMMDD}, 'YYYYMMDD') Then you create the 2 parameters Start Date YYYYMMDD & End Date YYYYMMDD
  15. Have you tried selecting print when/group changes and selecting your date group for all your fields?
  16. If you are using java.math.BigDecimal as your class you will need to use .divide and .multiply $F{CompletedWithinDeadline}.divide($F{TotalCases}).multiply(100)
  17. Not sure if you have tried this yet - https://community.jaspersoft.com/wiki/dynamically-set-table-row-height-data
  18. Have you tried using the open and close brace {} so your parameter will be - SELECT * FROM $P{language}
  19. Not sure if you have tried this already but when creating the calculation part of the crosstab you can select sum, as the default is count.
  20. You could remove the band title and have the logo and title placed into the column header band, that way it will print on each page.
  21. I use the Java.util.Date but insert it tusing the report designer, here is the xml - </staticText> <textField pattern="MMMMM dd, yyyy"> <reportElement x="560" y="1" width="109" height="29" uuid="9f22a089-7341-4537-a1cf-db061593f94c"/> <textElement verticalAlignment="Middle"> <font isBold="true"/> </textElement> <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> </textField>
  22. Hi Anubha, I found the below which might be helpful for you IN and NOTIN ClausesJasperReports provides a special syntax to use with a where condition: the clause IN and NOTIN. The clause is used to check whether a particular value is present in a discrete set of values. Here is an example: SELECT * FROM ORDERS WHERE SHIPCOUNTRY IS IN ('USA','Italy','Germany') The set here is defined by the countries USA, Italy and Germany. Assuming we are passing the set of countries in a list (or better a java.util.Collection) or in an array, the syntax to make the previous query dynamic in reference to the set of countries is: SELECT * FROM ORDERS WHERE $X{IN, SHIPCOUNTRY, myCountries} where myCountries is the name of the parameter that contains the set of country names. The $X{} clause recognizes three parameters: •Type of function to apply (IN or NOTIN) •Field name to be evaluated •Parameter nameJasperReports handles special characters in each value. If the parameter is null or contains an empty list, meaning no value has been set for the parameter, the entire $X{} clause is evaluated as the always true statement “0 = 0”. Source: http://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-us... Using this, you can place the whole condition within a conditional parameter like; $P{XYZ} ==1 ? $X{IN, ... , ....} : $X{NOTIN, ... , ...} ; Regards Luke
  23. Hi there, You could try the .contains syntax. $X{parametername}.contains'%ABC%'
×
×
  • Create New...