Jump to content
Changes to the Jaspersoft community edition download ×

MiditecReportDev

Members
  • Posts

    51
  • 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 MiditecReportDev

  1. Hi, I use this line of code to provide information in the footer: drb.addGlobalFooterVariable( gv ); The result is what I expect, but unfortunatly there is a vertical line which says "GLOBAL". I don't want this, how can I get rid of this "GLOBAL" text? Thanks for your help! Patrick
  2. Hi, I'm fairly new to Dynamic Jasper and would like to add a column to a table that uses a field of the property provided. As an example, in Jasper Studio, I use the expression $F{activity}.getTime() where "activity" is the field actually provided. How can I solve this in Dynamic Jasper? I tried somthing like ColumnBuilder.getNew().setColumnProperty( "activity.getTime", Date.class ) but this leads to an NoSuchMethodException: Unknown property 'getTime' Exception. Thanks for your help! Patrick
  3. Okay ... so basically you want to only display those $F{Ticket} that match your format of ######/#### and hide every other one ... So what you need to do is get your data as usual but then in the Dataset and Query Dialog go to tab Filter Expression. Put $F{Ticket}.matches(REGEX) == true there. Or == false. I'm currently not sure which one would help actually :D REGEX should be a String pattern like this: d{6}/d{4} You can check the meaning of this at https://regex101.com/ as I did too. Basically that regex checks if you've got a string that has six digits, a slash and four further digits. If so, the regex says your string is valid. As I said, I don't know if you need to say == true or == false in FilterExpression, but you can figure that out easily.
  4. $V{PAGE_NUMBER} == $V{PAGE_COUNT} should do the trick for you ;) Those two variables are system built and are usable without you having to do anything.
  5. Shouldn't that be possible by inserting ' + "n" + ' inbetween your two conditions?
  6. How about you try this PrintWhen Expression instead? I don't have time to try it out right now but that should work. $V{PAGE_NUMBER} < $V{PAGE_COUNT}
  7. You could try it with using a PrintWhen-Expression on the field, using $F{Ticket}.length == 6 if the first part of the value in your text field is $F{Ticket}. Then if the second part is some other field just use "$F{Ticket}.length == 6 && $F{OtherField}.length == 4"
  8. You could try it with using a PrintWhen-Expression on the field, using $F{Ticket}.length == 6 if the first part of the value in your text field is $F{Ticket}. Then if the second part is some other field just use "$F{Ticket}.length == 6 && $F{OtherField}.length == 4"
  9. I think (only thinking as I'm not able to open the studio right now) you can use your SQL (without the parameter that can be null) and do the rest with filter expressions to manually filter out expressions the user is not allowed to see. So basically you get *all* the data where ORDER_TYPE = 1 and say in your filter expression that the user should only be able to see those where the company ID matches his my_order_company_id and that being only the case when my_order_company_id is not null.
  10. You can do it as follows: Create a variable as you already have and set the "Calculation" to "Distinct Count" - then in the expression fill (in your case) "$F{City} + $F{Model} + $F{Ticket}" - this will result in the Variable printing out the number of unique combinations of these three fields.
  11. For this just put the following in your PrintWhen-Expression. These Variables are pre-defined so you just need to do this. $V{PAGE_NUMBER} < $V{PAGE_COUNT}
  12. I'm not too familiar with JSON but I had a similar "problem" once. Since you have a main dataset in the report the table is in, you can use my way maybe? In my main dataset I got the headers for the table and put it inside the table as parameters. Then you can put your data as you do now and put the parameter-headers inside the table- or column-header so they should get shown on each page because they'll always be known.
  13. Hi there, I'm using Jaspersoft Studio 6.3.1 and can't add any conditional style anymore. If I try to do so, the whole program crashes. I just uninstalled, deleted all Settings and installed again. Still the same bug. I have old reports containing styles which work, but if I try to edit them, the program crashes as well. Only way around this is editing stuff directly inside the XML Code which is not really what I like to do.
  14. Hey there. I know I probably don't have the right library for using barcodes (barcode4j) or using them wrong but can anyone tell me what exactly I have to do? Caused by: java.lang.NoClassDefFoundError: org/krysalis/barcode4j/impl/AbstractBarcodeBean at net.sf.jasperreports.components.barcode4j.BarcodeFillComponent.evaluateBarcode(BarcodeFillComponent.java:82) at net.sf.jasperreports.components.barcode4j.BarcodeFillComponent.evaluate(BarcodeFillComponent.java:70) at net.sf.jasperreports.engine.fill.JRFillComponentElement.evaluate(JRFillComponentElement.java:110) at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:381) at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:500) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2022) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:748) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:255) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:115) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:582) at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:396) What library would I need to include in my java project to not get this error? I used the "org.krysalis.barcode4j_2.1.0.jar" (from the install dir / plugins folder. Without renaming) one and it doesn't work ... anything else I probably missed?
  15. Ok, I didn't explain correctly. The TextField background should always be colored in the color the strColorHex says. The field $F{strColorHex} will never be empty or null, but always be "#000000" if strShownText is empty or null. I always want to read strShownText (if it's not empty or null) but also always want the complete field background to be colored exactly in the color of strColorHex. This may be possible with conditional styles, but for all RGB colors this would simply be too much. Thus the expression from above. "<style backcolor='" + $F{strColorHex} + "'>" + $F{strShownText} + "</style>" is directly inserted into the expression field of the TextField itself and sadly only works if strShownText is not empty or null and even then does strange stuff ... As you can see my dynamic coloring (colors come from my DB) works with the expression. The problem being clearly that only background behind text gets colored. What I'd like to get is the turquoise colored part to have the color the little colored parts have - as this is the full width of the text field. In the red border you see ... well, nothing. As "Text" is an empty String there. And then the background color behind the text is gone as well ... hope I got it better this time?^^°/sites/default/files/images/ForJasperForum.png
  16. Hello shertage, conditional styles won't work as the color doesn't change by specific conditions but according to the $F{strColorHex} value ... which can be any RGB value. And I don't really want to include a conditional style for all of them ;) According to my example above, what would I need to put into the expression field to realize the fieldbackground to change color? Like I said, in my example it colors the textbackground. So if we say ... value of strColorHex is "#000000" and strShownText has the value "Test" we would not be able to read "Test" because text color is black and the whole text background will be black too. So far correct. If strShownText gets the value "" (empty String) nothing would get colored and the TextField would still be white, which isn't what I need.
  17. First things first, I'm not talking about the background color you can set using the color chooser in the appearance tab of the object itself. What I want to know is if there is a way to fill the whole objects background with a color similar to this expression. "<style backcolor='" + $F{strColorHex} + "'>" + $F{strShownText} + "</style>" This colorizes only the part of the TextField where text would be visible. So ift "strShownText" would be null, nothing would be colored even though strColorHex has a value. Basically what this expression does is coloring the textbackground. But I want one to color the fieldbackground - is that possible somehow?
  18. Well, found the problem myself now, but I'm not sure why... Seems like the classes for the HTML Element are the only element classes not contained in any of the jar libraries. Any informations on why that?
  19. Hey there. I get the exception "net.sf.jasperreports.engine.JRException: Class not found when loading object from file: [path to my .jasper file]. This only happens when I'm using the "HTML element" you can activate in Jaspersoft Studio 6.3.1 and trying to print the report from java. Any idea how to solve this problem?
  20. Hi :) I'm having a slight problem once again. I have some texts I need to display which are in format of "[Number], [Title]". Now I have several cases with different results. 1) Title is short enough: It gets shown completely as intended. 2) Title is too long and is one single word: Only thing that get's shown is "[Number], " 3) Title is too long but is multiple words: Result is something like "[Number], [Title1] [Title2] " - even if title may have four words. Why does Jasper behave this way in case 2? Cases one and three I can understand. Case two does not make any sense at all. Why does it not show "[Number], [Titl]" (for example ... so just cutting off the word of title where it needs to bet cut, but not drop the whole word?
  21. @reportdev And what would I do if (and with our application this is the case) the user can freely choose the colors in our program and should see exactly those colors inside the report as well? We can save the colors inside the database and Jasper can even read them from there with a field of java.awt.Color - why can we not use this kind of field for dynamic coloring? o_O
  22. Is it in any way possible to assign colors to fields via parameter? I can get a specific data-type with content AND color from out database and need to display that content (no problem at all) in the color from the database - can I do that somehow? I didn't see a way to use a parameter or any kind of expression for colors, not even when using styles or conditional styles.
×
×
  • Create New...