Jump to content
Changes to the Jaspersoft community edition download ×

slow

Members
  • Posts

    268
  • 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 slow

  1. from http://dynamicjasper.sourceforge.net/docs/features.html JRXML template files support: You can use a base template jrxml file in which common styles, company logo, water mark, etc can be pre defined. JRXML can be created with iReport... you can make some tests to verify it...
  2. try to take a look to your report structure... I'm sure that you have created cells taht don't match perfectly. if you want a perfect excel you must create a perfect report... with no space between elements... I have created very very large excels... (more tahn 80 columns * more than 1000 rows...) without problems... read this for help: http://fecplanner.com/jasperreports/docs/tips.tricks.html#friendly give us a feedback... _________________________________________ if you like it... give me KARMA points please! : ) _________________________________________ listening: Almamegretta - Sole "sole quando sorgerai su di me su di noi? vorrei sole su di me su chi non l’ha visto mai…"(a.) Post Edited by slow at 09/08/2010 09:23
  3. this is a good question for a rainy day like today... there is no way to convert the number from arabic (1,2,3...) format to roman format (I,II,III...) automatically... you must create your own converter (with java) and then use it in you report... so, I have made one for you using code from net. try to do this to have your roman numbers: -download the attached JAR and add it in you ireport classpath (tools-->option-->classpath-->add jar) -in your main report node, click and in the properties windows, scroll down and find "import" -set this import: ireport.util.slow.number.romanconverter.RomanConverter -define a textfield of type String, setting this expression: RomanConverter.toRoman($V{variable}.intValue()) where $V{variable} is an Integer value from 1 to 3999. and run your report... give us feedback... _________________________________________ if you like it... give me KARMA points please! : ) _________________________________________ listening: Almamegretta - Gramigna "lassame sta’ nun me tucca’ lassame sta’ nun me ‘nquita’ chesta È a vita mia e voglio campa’ comme dico io" (a.) Attached an example of use... Post Edited by slow at 09/08/2010 09:26
  4. take a look to dynamicjasper... http://dynamicjasper.sourceforge.net/
  5. I repeat: I think ireport hasn't rules that can change dinamically the horizontal position of elements, but only vertically (as I have suggested before) so you must change your subreport position or reduce the subreport dataset to one elements if you can (with "distinct" sql clause) I have taken a look to your image and it's hard to me figure why to you set a subreport in the bar above your data... listening: Joy Division - Shadowplay
  6. sorry... I haven't read your post correctly. I apologize... I have read the word horizontal only now... The jrxml isn't complete... but viewing the image, why do you set two subreport? it seems that there is one near TOTAL and one below it... The one near TOTAL, if has multiple elements overrides the other elements (and this is correct!) and I think ireport hasn't rules taht can change dinamically the horizontal position of elements, but only vertically (as I have suggested) (here I'm not able to test or correct your jrxml... I'm in a office at work!) listening: Joy Division - Dead Souls
  7. try this: set the "Position Type" of all elements besides the subreport to "float" or "Fix Relative to Bottom". give us feedback... _________________________________________ if it works... give me KARMA points please! : ) _________________________________________ listening: Almamegretta - Sanacore
  8. I'm sorry but I still do not understand where is the difficulty... are your values in a String format? if they are in a double/Double format... why you don't you use a simple definition as you wrote? ($V{v1}/$V{v2}) Post Edited by slow at 09/02/2010 13:15
  9. Hi memory... thanks for the mail and for appreciate my previous answers unfortunately I don't use Jasper Server (with "IS" do you mean it?) so I can't suggest to you any methods to solve this issue. Anyway, if you have a java.lang.ClassNotFoundException error, it's an error better than other. Why? you can find where is located this class, I mean to find the jar that contains it and then place it in the application classpath. It isn't so hard to do. try to do this little trick: in your report main node click and then in the properties windows , at the bottom, click on import. add: com.jaspersoft.jasperserver.api.metadata.user.domain.User try to run your report. if it doesn't work, try to find the jar that contains user class and add it in the ireport classpath.
  10. try this: --click on the main report node. --in the properties find the "imports" button and click... (it's at list bottom) --add your class name (with package !!) --save, recompile, run... give us a feedback... _________________________________________ if it works... give me KARMA points please! : ) _________________________________________ listening: Death in Vegas - Dirge
  11. try this in your condition: new Boolean($F{Field}.toString().equalsIgnoreCase("MAN")) change the "Field" word properly with your field name. if you have a String field you can remove the toString() function. give us a feedback... _________________________________________ if it works... give me KARMA points please! : ) _________________________________________ listening: Muse - Plug In Baby [Live From Wembley Stadium] Post Edited by slow at 08/31/2010 10:12
  12. rajuchacha007, I spended more and more words to suggest to you how use the Joda library , or Java Object to show or manipulate milliseconds... but in the late post you wrote i read this sentence: "Also, how to view milliseconds in mysql. I have been trying to get milliseconds column but not successful yet." when I show millisecond in my example, I obtained them from java object (Date) or Oracle columns... I haven't a MySql installation on my work pc. but... you can try more and more times... you'll never obtain milliseconds if you start from date coming from mysql DB. why this? MySql time object (timestamp or date) doesn't support millisecond... so each date(or time) has details only from year to seconds. read here: http://dev.mysql.com/doc/refman/5.1/en/date-and-time-types.html http://bugs.mysql.com/bug.php?id=8523 http://dev.mysql.com/doc/refman/5.1/en/datetime.html "However, microseconds cannot be stored into a column of any temporal data type. Any microseconds part is discarded." As you can see... milliseconds aren't supported by MySql... so, your dates (I wonder how you have not noticed it before) have exactly 0 milliseconds each time you print them in the pdf files in the long format... So... you can try to store in a different column in your mysql db the milliseconds you want...or save it in the long format or in the string format...but if you have date and time already stored in mysql DB, I think there ins'nt a way to obtain milliseconds from your mysql data object. (I did a quick check ... and only the last post you mentioned using mysql!!!) _________________________________________ if you like it... give me KARMA points please! : ) _________________________________________ listening: MUSICA NUDA - Sacrifice Post Edited by slow at 08/31/2010 09:52
  13. you can use your variable names... but don't change the java object... $V{jodaPeriod} is a Joda Period object... or, if you prefer, you can create a String variable or a String textfield that uses a Period to show data (as I show in the perviuos post)... if you use long , i think it's impossible show hours, minutes etc etc if you don't create a function that translate it in you format ore use one that do it for you. you can try to use the java SimpleDateFormat object if you prefer to use the long values but not the Joda Object... in a TextField of type String you can use: (new SimpleDateFormat("HH 'hh', mm 'mm,' ss 'ss',SS 'ms'")).format(new Date($V{ms}.longValue()-3600000)) where $V{ms} is a Long Object and 3600000 (=60min*60sec*1000ms=1hour) is the amount of millisencond I subract to regain the extra time (1 hour) that the default SimpleDateFormat give to print the 0 GMT time in my Locale. _________________________________________ if you like it... give me KARMA points please! : ) _________________________________________ listening: Prodigy- Narayan
  14. hi rajuchacha007, as I wrote, "Time_diff uses the joda Period to create a time difference and print only the details you prefer (hours, minutes, seconds, milliseconds...)" you can read here: http://joda-time.sourceforge.net/apidocs/org/joda/time/Period.html and here: http://joda-time.sourceforge.net/key_period.html and here: http://stackoverflow.com/questions/1440557/joda-time-period-to-string about Joda Period... so, in your report you must define a variable with Joda Period object, (suppose we call it $V{joda_period} and the a textfield with the expression: $V{joda_period}.getHours()+"hh "+$V{joda_period}+"mm "+$V{joda_period}+"ss "+$V{joda_period}+"ms " or in a simpler way, a TextField with this expression: " "+(new Period($V{start_time}.getTime(),$V{now}.getTime())).getHours()+"hh"+ " "+(new Period($V{start_time}.getTime(),$V{now}.getTime())).getMinutes()+"mm"+ " "+(new Period($V{start_time}.getTime(),$V{now}.getTime())).getSeconds()+"ss"+ " "+(new Period($V{start_time}.getTime(),$V{now}.getTime())).getMillis()+"ms" where $V{start_time} and $V{now} are java.util.Date Object and the getTime() method returns the millisecond representing this date. (you can use your millisecond if you have it) I hope this can help you... Keep in mind that I never used Joda and did not know it before you cite it, and it is really easy to use... _________________________________________ if you like it... give me KARMA points please! : ) _________________________________________ listening: Tiromancino - E' necessario "E’ necessario che io sia coerente con me stesso per dare il peso giusto e un senso a tutto il resto" (t.)
  15. uhm... can you be more clear? what is your issue? printing the result in your format? or capture in a variable the division result?or what else?
  16. Oh...! Sorry for the misunderstanding... in this case you can set a lot of parameters for the pdf exportation. take a look at this code for an idea: ..... ..... import net.sf.jasperreports.engine.export.JRPdfExporter; import net.sf.jasperreports.engine.export.JRPdfExporterParameter; import com.lowagie.text.pdf.PdfWriter; .... .... JRPdfExporter exp = new JRPdfExporter(); exp.setParameter(JRPdfExporterParameter.IS_128_BIT_KEY, Boolean.TRUE); exp.setParameter(JRPdfExporterParameter.IS_ENCRYPTED, Boolean.TRUE); exp.setParameter(JRPdfExporterParameter.USER_PASSWORD, "user_pwd"); exp.setParameter(JRPdfExporterParameter.OWNER_PASSWORD, "owner_pwd"); exp.setParameter(JRPdfExporterParameter.PERMISSIONS,new Integer(PdfWriter.ALLOW_COPY|PdfWriter.ALLOW_PRINTING) ); take a look here: http://jasperreports.sourceforge.net/api/net/sf/jasperreports/engine/export/JRPdfExporterParameter.html and here: (some concepts involve IText library...) http://api.itextpdf.com/com/itextpdf/text/pdf/PdfWriter.html if you make some google search you can find examples regarding iText pdf encryption (http://www.itextpdf.com/examples/index.php?page=example&id=219 ) or jasperReport simpler code method to so this. I hope this may help ... good work :) leave us feedback! _________________________________________ if you like it... give me KARMA points please! : ) _________________________________________ listening: Almamegretta E'guagliun d'o Sole "young fellah young fellah keep on fighting keep on fighting young fellah young fellah stay united stay united" (a.)
  17. this is a good question... :) thanks... try to make this: define a variable, of type string, (we call it "tot_var"), setting the calculation type to nothing, reset type to Report, Increment to none, initial value to "" and expression to: $V{tot_var}+"'"+$F{VALUE}+"'," (suppose VALUE is the name of your Fund_Id column) then define a new variable, we call it "final_var", with the same settings but with the initial value "" and expression: "("+$V{tot_var}.substring( 0, $V{tot_var}.length()-1 )+")" now you can put a textfield under your detail band, in the column footer band or page footer one... that shows your variable "final_var". This textfield shows the data in the format you want... so you can pass its value to a subreport. give us a feedback... ____________________________________________ if you like it... give me KARMA points please! : ) ____________________________________________ listening: Il Parto Delle Nuvole Pesanti - RAGGIA "E' forte è forte è forte e vo parrari Runamu forza e vuce a sta speranza E' forte è forte è forte e vo parrari Runamu forza e vuce a stu bisogno Quannu amu cuminciatu era na fera Attento a chini ti sta vicino mo..." (ipdnp)
  18. It's so beautiful try to find new checkbox in the menu... and I'm not speaking of hidden menu... but simple menu :) try to do this from the ireport interface: Tools->Option->Ireport->ExportOption->Pdf->Encryption... this is the menu item... try to make some tests... I think that not all checks work in the right manner. _________________________________________ if you like it... give me KARMA points please! : ) _________________________________________ listening: Nine Inch Nails - Only
  19. you can try to avoid the division intercepting the value of the second 0 (the b value)... imagine a textfield (of type String) that show a division a/b then you can set the expression: ($F{b}.doubleValue()==0?"!!division by zero!!":""+$F{a}.doubleValue()/$F{b}.doubleValue()) if you want to catch the NaN value then you can use this: (imagine the same String textfield with the expression:) (Double.isNaN($V{a}.intValue()/0.0)?"NO RESULT":"GOOD RESULT") so the method you must use is [boolean Double.isNaN(double)] take a look here: http://download-llnw.oracle.com/javase/1.4.2/docs/api/java/lang/Double.html#isNaN(double) _________________________________________ if it works... give me KARMA points please! : ) _________________________________________ listening: Afterhours - La Verità Che Ricordavo "e il sole sale sopra il continente del male sopra il quale sto crescendo, migliorando e dove fingo di non essermene accorto che non sto vivendo sono morto" (a.)
  20. as you can see here: http://download.oracle.com/javase/6/docs/api/java/lang/String.html#replaceAll(java.lang.String,%20java.lang.String) the replace method works only with char sequence... so, the dot '.' means only a dot :) replaceAll works instead with regular expression...
  21. from russia... wow :) try to import your class as I have explained in the previous post, then, in the texfield use the expression: (new InWords("1234")).toString() and not new InWords("1234").toString() check if the cell type of the textfield is String it seems to be a JVM problem... have the two machines where you run the report the same JVM? make a test and then give us a feedback :) listening : Marlene Kuntz - Sonica Post Edited by slow at 08/24/2010 09:40
  22. have you tried the same report on two computer? not similar report, but exactly the same... you can also try to import your class... (it's a bean class, an help class or what else?) clicking on the main node of your report and then in the properties window on the "import" button setting the package of your class. I use custom class but I'm not having problem.
  23. this is a good question... but there is something unclear when you describe your issue: "It compiles prefectly but doesn't fill data. I have this error: java.lang.IllegalAccessError and message that my class can't be accessed from reports class." how it can compile perfectly also giving you an error? can you be more clear (maybe reporting the exact error...) ? listening: Marlene Kuntz - Impressioni di settembre Post Edited by slow at 08/23/2010 14:30
  24. Hi rajuchacha00, I read only this morning your post (in the weekend I turned off my pc :) ) so excuse me for the delay. I think you should sometimes look more far than a single example can suggest to you. So try to read my suggestion: A time difference is a subtraction between two dates, or similar: a subtraction between two instants. As you can think, a time istant can be represented as a long value of millisenconds... so a time difference can be viewed as a long values subtraction. The result of this operation is a number of milliseconds between two instants... and so it's a Period (in the Joda "language"). I made the report I have attached to suggest to you how It can works. Time_diff(ms) is calculated as the subraction of the two values in the long format $V{now} representing the instant when the row is printed and $V{start_time} representing the instant when the report is launched. Time_diff uses the joda Period to create a time difference and print only the details you prefer (hours, minutes, seconds, milliseconds...) I used JodaTime as you asked, but I think the report can be done without it, simply using java Date, long etc. :) Stop worrying about the potholes on the road and enjoy the ride. (Arabic proverb) _________________________________________ if you like it... give me KARMA points please! : ) _________________________________________ listening: Smashing Pumpkins - Cherub Rock
  25. thanks to rajuchacha007 to remeber my explanation... :) (here a present to him : http://jasperforge.org/plugins/espforum/view.php?group_id=83&forumid=101&topicid=77802 )
×
×
  • Create New...