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

kry_1

Members
  • Posts

    10
  • Joined

  • Last visited

kry_1's Achievements

Rookie

Rookie (2/14)

  • Collaborator Rare
  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare

Recent Badges

0

Reputation

  1. It seems that it's strictly the "-" sign that is the problem. I can substitute it with an em dash or any other sign and it gets displayed. 😅
  2. It's also shown correctly when I select the locale before signing into the jasper-server and generating the report from there. Seems like it's only when I fetch the report through the API that it doesn't work.
  3. Hi I've created a custom locale which I've placed in /.../webapps/jasperserver-pro/WEB-INF/bundles. I can fetch the reports from the jasper server with the right thousand and comma delimiters, but the report does not show the minus sign for negative numbers. It does so for the default locales. Jasper reports studio shows it correctly but its wrong when I make a GET request with it from postman, where the Accept-Language cookie is set to the custom locale. The locale was made by copying the default.properties files and rename them with my locale, and I've sthudown the server and started it up again after the files were created.
  4. I found out that this isn't possible. The closest thing I got to this was by creating a Scriptlet that takes a parameter, and uses that parameter to replace parts of the string, and then returns the new string.
  5. Hi JRS-SE Yes, I looked first a the string functions but I thought that there might have a more neat way to do that. My solution was to use a Scriptlet that uses some string replace methods, and calling that Scriptlet in the field. Then the field won't be filled with hard to read function calls. Thanks for the guidance. :)
  6. Hi I'm trying to run a report that uses a scriptlet. I created a java file in src/com/av/jasper, then I Compiled it to a .class file and I then created a jar file out of the class file. I included the jar for the scriptlet in the build path for the Project folder. You can see that it's in the scr folder and Referenced Libraries. This is the Scriptlet config: I've imported them in report jrxml like this: <import value="com.av.jasper.*"/><import value="cp,.av.jasper.GetExpressionFromStringScriptlet"/><scriptlet name="GET_EXPRESSION_FROM_STRING" class="com.av.jasper.GetExpressionFromStringScriptlet"/>[/code]I've copied the file to apache-tomcat-9.0.54/webapps/jasperserver-pro/WEB-INF/lib/GetExpressionFromStringScriptlet.jar Then I restarted the server, but it still fails with: ERROR SecureExceptionHandlerImpl,pool-18-thread-1:125 - There was an error on the server. Try again or contact site administrators. (Error UID: b77e9879-0351-4a3d-a1a7-a380f1d4233b). Errors were encountered when compiling report expressions class file:1. Only a type can be imported. com.av.jasper.GetExpressionFromStringScriptlet resolves to a packageimport com.av.jasper.GetExpressionFromStringScriptlet; <-------------------------------------------->2. com.av.jasper.GetExpressionFromStringScriptlet cannot be resolved to a type value = ((com.av.jasper.GetExpressionFromStringScriptlet)parameter_GET_EXPRESSION_FROM_STRING_SCRIPTLET.getValue()).FormatString(); //$JR_EXPR_ID=26$ <-------------------------------------------->3. com.av.jasper.GetExpressionFromStringScriptlet cannot be resolved to a type value = ((com.av.jasper.GetExpressionFromStringScriptlet)parameter_GET_EXPRESSION_FROM_STRING_SCRIPTLET.getValue()).FormatString(); //$JR_EXPR_ID=26$ <-------------------------------------------->4. com.av.jasper.GetExpressionFromStringScriptlet cannot be resolved to a type value = ((com.av.jasper.GetExpressionFromStringScriptlet)parameter_GET_EXPRESSION_FROM_STRING_SCRIPTLET.getValue()).FormatString(); //$JR_EXPR_ID=26$ <-------------------------------------------->[/code] I've also tried to upload the jar file as a resource for the report but it does nothing.
  7. Thanks for the answer, @JRS-SE. Yeah, I know that I can concatenate two fields together. My problem is that the data is defined in sql, so one cell called field_1 might have the content: "My name is $F{reference_to_another_cell_that's_written_in_plaintext}, and I am from Germany", so I can't concatenate the fields together, because it's hard coded in the actual data. We're migrating from another report generator, where it was possible to create references like <<this>> and the generator would read the tag and replace it with value from what the tag was referencing. I'm trying to find if it's possible to somehow keep that functionality in Jasper Reports. I know that I can create some convoluted find a replace string mechanics when defining the text fields, or I can create a scriplet that can handle that functionality. I wondered if that kind of functionality was already in place.
  8. Hello Lets say that I have two fields, $F{INTRODUCTION} which value is "Ny name is $F{NAME}, and I am from Germany" and F${NAME} which value is "Franz Beckenbauer". Is it possible for Jasper Reports to evaluate the NAME field in the INTRODUCTIONS field, so that it says "My name is Franz Beckenbauer, and I am from Germany"?
  9. I'm trying to configure haproxy for my jasper server. The problem is that jasper.test.com/jasperserver-pro redirects to the internal server url and not the url specified in the haproxy.cfg. My haproxy settings frontend ws_frontend_443 bind :443 ssl crt /var/haproxy/test_fo.crt option http-server-close option forwardfor acl jaspertest_av_acl hdr(host) -i jasper.test.com use_backend jaspertest_backend if jaspertest_av_aclbackend test_backend #http-send-name-header Host option httpchk cookie farmID insert #assign a farmID coockie to each client option httpclose option httpchk option forwardfor server localhost localhost:8080 check[/code]I've also changed deploy.base.local.url in js.config.properties but that didn't solve it. Any help is appreciated.
×
×
  • Create New...