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

giroe

Members
  • Posts

    50
  • 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 giroe

  1. You have to create a subreport. In the subreport properties (on the main report) you have to fill in the data source expression. For you this expression will be something like: new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource.JRBeanCollectionDataSource($F{lineItems}). These linItems you should add as field, and these lineItems are of the type: java.util.List That should do the trick. It worked for me :) On the subreport you can add the two fields you wanted (name, id)
  2. I am using jasperreports 3.0.0 The .ttf file is in the classpath.. I added the folder: war/web-inf/lib to my classpath and in the lib folder I put the ttf files for lucida.ttf I'm not really getting what I'm doing wrong. Help would be appreciated Thanks
  3. Ok, then I'm understanding the problem (a bit). Thanks for your replies. If I take a pdf font that is on linux and on windows. Like: LucidaSansRegular.ttf than it should also work fine? I tried this, but than I get error: Could not load the following font : pdfFontName : LucidaSansRegular.ttf pdfEncoding : Cp1252 isPdfEmbedded : true (I get this also when I say isPdfEmbedded false) I did ad the ttf files to a folder in my eclipse project. And I did add that folder to "java build path=> libraries tab => add class folder". Am I doing something wrong? Thanks in advance, Nick EDIT: I am using java 1.5 (so 1.6 is not an option) Post Edited by giroe janssen at 04/03/09 11:16
  4. I did read that FAQ already. But I'm not getting much wiser. I know what the problem is, but not what the solution is :) So the problem is: PDF fonts do not match the Java fonts? But what to do about this :)? Helvetica is a pritty standard font..? Btw, If I say the font of a textfield (in iReport) is helvetica. I don't see that in the jrxml file.. Because it's the standard? Or why? (when I use Helvetica Bold, I do see it in the jrxml file btw) How can I check what fonts are available on the linux machine? Sorry about all the questions, but when text is missing it's pritty irritating :) Thanks for your help, Nick EDIT, I tried to find how I can see what fonts are available in java.awt. And I found this: GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); String[] fontNames = ge.getAvailableFontFamilyNames(); for(String font:fontNames){ System.out.println(font); } When I run this in windows (where everything is fine). I also don't see Helvetica. Hmm, getting more confused by the minute EDIT 2: When I run this on Linux, I dont see the font helvetica either (Linux has much less fonts btw, around 20, windows has around 250). The fact that it is correct on windows is just pure luck than? Linux & Windows pick a default font to calculate space & stuff? And because they use different defailt fonts, the text is truncated on linux sometimes? Post Edited by giroe janssen at 04/03/09 09:00
  5. That's pritty nice such a frame! It also has a print when expression. Didn't every see that element :) Thanks, you solved (all) my problems :) Greetings, Nick
  6. Good morning to you all, This will be a very stupid question, but how can I add a folder to the Fonts Path? I don't see anything, nothing is listed at the tab In version 3.0.0 I do see lot's of lines. And I see that it also searches for fonts in the directory of fonts (in the install directory of iReport) Any help would be appreciated. Greetings, Nick
  7. Good mornging, My problem is, I got some 'long' textfields. En everything looks fine when I run my webapp on windows (for development). But when I run it on Linux some text is missing. Example of a textfield on Windows: This is just a test, on windows it does not get truncated, nananananana On linux: This is just a test, on windows it does not get tru (this is not a 'real' example, but just to let you know what my problem is) I sometimes get te same problem that my text goes out of it's field. I got a border around my textfield. En the text just goes over the border. I use Helvetica pdf font. I know this is some kind of font type issue. I know that there are threads about this problem. But I'm not able to get this working. I hope I can get some 'personal' assistence from you guys. Is there an easy way to solve this (perhaps with another font or so) I've read that you can embed the pdf font? But than you have to have the TTF file or am I wrong? (I dont got the TTF file for helvetica, because it's not free?) Thanks in advance Nick
  8. Ok, I made a very simple example Field 2 will hide, Field 3 should move up (it does) Field 4 is anchored to the bottom, so it should not move up, but it does.. Thanks for your help, Nick
  9. I already tried that. But that does not do the trick. I do believe it should do the trick :) When you 'click' on the position type it sais: How to anchor elements. And thats just what I want, to anchor it to the bottom. This is a small bug? Or are there any other solutions? I think I'll create a footer for the things I want to be at the bottom :) Btw, I dont know if its a bug, or it is something wrong with me. But when I say to windows: open all jrxml files with iReport. In 3.0.0 it did not open iReport, in 3.1.4 it does open iReport, but it doesn't open the report. (just opens iReport) Btw, is it better to use 3.1.4 or is 3.0.0 still fine? Because I do like 3.0.0 better to work with. A lot has changed in 3.1.4 :) Thanks for you replies, Nick
  10. Should have tested it myself. I saw that option. But I didnt think it would work with the 'print when' expression. This was exactly what I needed. But is there a way to say that 'some' elements should NOT move up :)? I dont want the things at the bottom to shift up. It's some sort of footer, but it is not located in the footer-band. Thanks in advance!
  11. Good morning, I have a question. I have some textfields that have a print when expression. And these textfields are pritty large, so when the print when returns false, I dont want a blanc block. I want the other field(s) to move UP. Example ABCABC EFGEFG <=this has a print when expression HIJHIJHIJ => output is now ABCABC HIJHIJHIJ => I want: ABCABC HIJHIJHIJ I hope someone can help me? Thanks in advance
  12. Good morning all, I got the problem that my reports are not rendered the same on linux and windows. I'll explain a bit: I always watch my report on windows (firefox). But I got a version of my webapplication running on windows and I got exactly the same version running on linux. The font of my reports is Times New Roman (pdf font: Times Roman). I got some textboxes with borders that containt something like 5sentences. These sentences are typed like on big sentence (no newlines etc). The windows version shows everything is OK, but on the linux version half of the last line is missing. And the line could easily fit in the textbox (it's shorter than the other lines) example windows: this is the text this is the text this is the text this is the text this is the text this is the text this is the text this is the text this is the text this is the text this is the text this is the text this is the text this is the text this is the text this is the text on linux: this is the text this is the text this is the text this is the text this is the text this is the text this is the text this is the text this is the text this is the text this is the text this is the text this is the text this is the text this is the Does anyone know the solution to my problem? I make my reports in IReport. I also got another question Is there a way to see exactly the same report in IReport than on the pdf? Because IReport layout is not the same than my PDF document(s) even when I generate an example pdf report in IReport it's not the same then the pdf rendered on my webapp. textbox example IReport: this is a test this is a test testin testing textbox on pdf using example function in IReport: this is a test this is a test testin testing textbox on pdf on Linux: this is a test this is a test testin testing textbox on pdf on Windows: this is a test this is a test testin testing Is it possible to see always the same layout? I hope someone can help me? I can send the 'real' pdf's also It is pritty important. Thanks in advance!
  13. So you probably want to use multiple queries also? There could be an other solution, but I'm pritty sure you can do this with Subreport(s).
  14. Hey, sorry. I wasnt critisising you. Just wanted to know if it was only with the internal script support. Now I know, thnx
  15. codyjasperForge wrote: Then your scriptlet filename should be myReportScriptlet.jrxml This is only when you use ireport internal scriptlet support? I wrote my own scriptlet and it was not named like that @topic starter: on this site there are certainly some working examples with a scriptlet, those helped me with writing my scriptlet classes in the past Post edited by: giroe, at: 2007/07/30 13:12
  16. I did some research, and the EDIT way is not possible :) Hi, If you successfully managed to generate some JasperReports documents, you probably realized by now that JasperReports is not a Web application, but rather a library that cannot run by its own and has to be embedded into some other parent application. So I guess you are using JasperReports in a Web application of your own. It means that you should know by now how Web applications work. And if you do, then you must figure out that when a hyperlink is clicked, there is a servlet or a JSP on the server that responds to that call and sends you back a response. If this does not make any sense to you so far, then you should give up this approach. You should probably get JasperServer and try to go from there. JasperServer comes with a sample data base in which one of the reports has a link in it pointing to another report with a parameter. I hope this helps. Teodor But it isnt that hard to achieve what you want. Are you working with a webapplication like Teodor mentioned? (I am, and than its pritty easy to solve this like I mentioned in my earlier post)
  17. there certainly is a linkparameter tab :) I'll try to test the EDIT way :) I'll respond here in an hour or something
  18. fariszuriekat wrote: Try to make the pathname dynamic, you should be able to include that in the system properties. so if you run it on different system your reports will still work without the need to hard code the pathname. Create a parameter in your report that holds the pathname. and fill that dynamicly with the correct path when you upload the report online. Hope this idea helps Faris Zuriekat This is the way to do it imo, thats the way I do it, and it seems a LOT easier than working with jarfiles etc. Just put String path=request.getRealPath("path to the map where your report is located, starting with WEB-INF") in a parameter of your report. path will be dynamic, if your tomcat is located on your E drive it will start with E, if it will be on C than path wil start with C etc..
  19. Euhm, I think you are making it a bit too difficult. His path to his .jrxml file just seems to be incorrect. Just try to put to complete path to test it, so instead of "MyWebApp/jasper/sampleReport.jrxml" type: c:/.../.../.../.../sapleReport.jrxml (if you want to make the path more dynamical you can use: String path=context.getRealPath("/WEB-INF/path_to_reportmap"); like lukkumar said. than the string path will be: c:/your path to your webapp/WEB-INF/path_to_reportmap) Post edited by: giroe, at: 2007/07/30 10:21
  20. I dont really understand your question. But I think you want to run/compile/open your report in iReport? Have you included the scriptlet class in your classpath? (or do you just want to define the scriptlet class in iReport? than you have to go to: edit=>report properties, and there you go to the tab scriptlet class and select: use this scriptlet class and then you type your scriptlet class. if you want to compile it in iReport you have to add that class to your classpath: options=>classpath)
  21. Normally you're report will be A4 I think, and thats not really small imo. But you can make it as big as you want. in iReport go to: edi=>report properties, there you can choose A4/A3/A2/A1/... or custom. Hope this will help?
  22. Yeah, I already mentioned that I certainly used the same .jar files. But it seems a java bug. Not really anything to do with jasperreports. But still thnx for trying to help
  23. Or make three textfiels on the same place and for the first textfield the print when expression: new Boolean($V{cars}.stringValue == new String("BLACK")) for the second texftield print when: new Boolean($V{cars}.stringValue == new String("RED")) ..... But codyjasperforge his solution is nicer I think :) mine is easier to understand (I think?) Post edited by: giroe, at: 2007/07/27 07:15
  24. I think the hyperlink is perfect to do that. I assume you use some kind of (struts) webapplication? I do use the hyperlink to go to other report. First you go to the hyperlink tab from your textfield. And select Hyperlink Type: Reference. And as Hyperlink Reference Expression you put something like: "stafdetail.do?staffnumber=" + $P{staffnumber} The webapplication processes this link, and sees the parameter like: staffnumber=5. You take this number from the request and put it in a hashmap and than generate the new report (the sales performance of that guy). This way it certainly works because I do it like this EDIT: I think you can also link directly to the sales performance report (without the webapplication processiong the url). I think the only difference is that the Hyperlink Reference Expression should than be something like salesperformance.jasper. And the parameter Staffnumber you should set in the linkparameters (tab linkparameters). I did not test this. Post edited by: giroe, at: 2007/07/27 07:09 Post edited by: giroe, at: 2007/07/27 07:10
  25. lucianc wrote: Note that most of the people keep the source *.jrxml files on CVS and generate the *.jasper files as part of the build process, so the scenario of *.jasper files on CVS is not common. Yeah, for normal reports I also keep the *.jrxml file and compile it to *.jasper in my build proces. But for my subreport I didnt do that. But now I also do it for the subreports and it works fine, thnx for all the help
×
×
  • Create New...