Java_Jasper
Members-
Posts
71 -
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 Java_Jasper
-
JasperReports PDF export and fully embedded fonts
Java_Jasper replied to fvaleri-'s topic in Products
Here is a link about embedding fonts from Adobe this is a pdf by the way. http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/FontPolicies.pdf B.- 9 replies
-
- jasperreports library
- font
-
(and 1 more)
Tagged with:
-
JasperReports PDF export and fully embedded fonts
Java_Jasper replied to fvaleri-'s topic in Products
Hello, Here is a link to get you started. http://www.prepressure.com/pdf/basics/fonts B.- 9 replies
-
- jasperreports library
- font
-
(and 1 more)
Tagged with:
-
Hello, You will want to use Sytles, this is locatd in the "Report Inspector" Then you will se a "Style Properties" window here is where you can specify a font color. You will then want to attach it to your paramater. Click Add, then you will right click on the new style and choose "Add Conditional Style" this will open up a "Condition Properties window" where you will want to set the "Condition Expression" use the little box to open up the expression wizzard and choose your paramater and a condition to trigger on. The final result should look something like this in the XML. <style name="style_yourStyle"> <conditionalStyle> <conditionExpression><![CDATA[$P{YOUR_PRAM}.equals(YOUR_CONDITION)]></conditionExpression> <style mode="SOME STYLE" textcolor="#FFFF00"/> </conditionalStyle> </style> Hope this helps Enjoy!
-
See commnet above, not sure if comments notify a user of a post.
-
import java.text.DateFormat; import java.text.FieldPosition; import java.text.NumberFormat; import java.text.ParsePosition; import java.util.Date; import net.sf.jasperreports.engine.JRAbstractChartCustomizer; import net.sf.jasperreports.engine.JRChart; import org.jfree.chart.JFreeChart; import org.jfree.chart.axis.NumberAxis; public class BubbleDateCustomizer extends JRAbstractChartCustomizer { public void customize(JFreeChart chart, JRChart jasperChart) { NumberAxis domainAxis = (NumberAxis) chart.getXYPlot().getDomainAxis(); final DateFormat dateFormat = DateFormat.getDateInstance(); domainAxis.setNumberFormatOverride(new NumberFormat() { public StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos) { return format((long) number, toAppendTo, pos); } public StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos) { return dateFormat.format(new Date(number), toAppendTo, pos); } public Number parse(String source, ParsePosition parsePosition) { throw new UnsupportedOperationException(); } }); } This example was written by Lucian a member on this community. I am posting it as an example of a custom chart.
-
This link will give a better understanding of the customizaiton options in regards to charts. http://mdahlman.wordpress.com/2010/08/18/chart-customizers-1/ Hope this gets you going. B.
-
This link may help get you started: http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/ChartFactory.html#createBubbleChart B.
-
I want to display the Image at the bottom of first Page
Java_Jasper replied to rajini_kudurimothi's topic in Products
It sounds like you would want to use the page footer and specify like the condition listed above. -
I am glad you found the error, don't forget to mark the correct answer for this post. B.
-
A Hug, This is a classic copy and paste which will reformat your post. I kind of figured the pdfFileName was the path. I would recommend you set up the debugger and go through the entire flow. You may have a report or two that just dont work based on the data. B.
-
Sorry, did not mean to be cryptic. I am refering to opening and closing of the PDF. Example: ByteArrayOutPutStrem byteArrayOuputStream = new ByteArrayOutputStream(); Jasper ExportManager.exportreprotToPdfStream(impression, pdfFileName); Your_Servlet_ect.write(byteArrayOutputStream.toByteArray(); Your_Servlet_ect.flush(); Your_Servlet_ect.close(); Your_Connection.close(); B.
-
This may help: http://www.tutorialspoint.com/jasper_reports/jasper_report_fonts.htm Short answer Yes, 1. jar your TTF file. 2. Include the jar file as an external jar into your project. 3. In the report template, set the PDF font to the name of the TTF file. For example: pdfFontName="MICR.ttf"4. isPdfEmbedded ="false" Enjoy!
-
Are you opening and closing as well?
-
In iReports you can create input controls, go to properties by right clicking the input control that would be your 2nd paramater. In properties --> Input control details tab --> Edit local resource. Then go to the query tab and add a query witht the first select box value as a paramater. This paramater should be declared in your report under the paramater section. Example: Select Name, Title From Company INNER JOIIN Clients ON Clients.new = Company.ID Where Title = $P{title} Note that $P{Name} is the value from the frist select box. Enjoy!
-
can I user jasper reports to create pdf reports without any server?
Java_Jasper replied to kmentzelos's topic in Products
Make sure you mark the correct answer so people will not be confused later. -
Parameter allowing user to select multiple Dates to Filter on
Java_Jasper replied to nguy0861's topic in Products
Ok, I see what you are asking for now. In sql you can use a "Between" to put the desired range into the paramaters you want and then do this for each date selected. yourTable.tableName $P{startDate} AND $P{endDate} AND If you are trying only to get data of the 1st, 15, and 25th you will need to decide on how to make a range. In the example above it would be startDate == 1st and endDate == 25th. Now if you are trying to trigger records for each date 1st, 15, and 25th the range would be more of a time frame like 24hrs. Keep taking it through though.- 4 replies
-
- filters
- ireport designer
- (and 3 more)
-
Parameter allowing user to select multiple Dates to Filter on
Java_Jasper replied to nguy0861's topic in Products
Hello, Yes this is possible, you will want to implemnt the whole calandar popup in your java enviromnet. But in order to set a date you would work into the sql statement said query and set it to a paramater. This pramater is one you create in iReport. below is an example. Java Side: Stirng startDate = " "; String endDate = " "; Date date = new dateFormat("your fromat"); Map pram = new HashMap(); paramater.put("Start", startDate); paramater.put("End", endDate); SQL: select your table with the date from your table where your table = $P{START_DATE} your table = $P{END_DATE} iReport: Report Inspector --> paramater --> add a new on and call it start date and end date Place them in the template. This is of course very rough outline however the basic flow is like so. Enjoy!- 4 replies
-
- filters
- ireport designer
- (and 3 more)
-
You'll have to modify the ireport.conf file to specify the JDK you want iReport to use. Going through the install Windows 7 x64 will specify the default path to the x86 program files. I.E. "Program Files (x86)" Change this to "Program Files" then make the changes in the config file. You'll find the ireportpro.conf file under [ireport_install_directory]\etc\ireportpro.conf. If you installed iReport with the installer, there's an ireport folder in the folder where you installed JasperReports Server. There are two lines in that file that I would change: Uncomment out the jdk home setting, and point it explicity to where you've installed th 64-bit JDK 1.7. Change it from: #jdkhome="/path/to/jdk" To something like what you see below: jdkhome="C:\Program Files\Java\jdk1.7.0" I would also change the "default_options" line from: default_options="-J-Xms24m -J-Xmx512m -J-Dorg.netbeans.ProxyClassLoader.level=1000 -J-XX:MaxPermSize=256m" to something that gives the JVM running iReport more memory and a lower MaxPermSize value. An default_options="-J-Xms1024m -J-Xmx1024m -J-Dorg.netbeans.ProxyClassLoader.level=1000 -J-XX:MaxPermSize=128m" Enjoy!
-
Hello, With Java there is no support to work with BMP files by default. You need a special library to load images from files with formats other then JPG and GIF. You could use advanced imaging APIs provided by Oracle, if so you would load the image yourself by calling the API and return to the report an java.awt.Image object for display. Short answer use a JPG or GIF image, they work well in Blobs and such nicely as well. But if you would like more info on image processing read the PDF in the link below. Here is a link how Jasper does images it may help: http://www.ece.uvic.ca/~frodo/publications/icassp2004.pdf
-
Here is a code snipit as well to try: BufferedImage img = ImageIO.read(new File(wo_image_path)); height = img.getHeight(); width = img.getWidth(); jasperSubDesign = JasperManager.loadXmlDesign(context.getRealPath("/WEB-INF/reports/decoration_sheet_header.jrxml")); JRDesignImage image = (JRDesignImage)jasperSubDesign.getPageHeader().getElementByKey("wo_image"); image.setX(3); image.setY(69); image.setHeight(new Long(height - Math.round(height*.35)).intValue()); image.setWidth(new Long(width - Math.round(width*.35)).intValue()); JasperCompileManager.compileReportToFile(jasperSubDesign, context.getRealPath("/WEB-INF/reports/decoration_sheet_header.jasper"));
-
Hello, 1. You can format the field using the pattern option. Properties --> Text Field Properties --> Pattern 2. For the cross tab see the following link. http://www.tutorialspoint.com/jasper_reports/pdf/jasper_crosstabs.pdf Enjoy!
-
Hello, 1. Yes you can map multiple parameters to said PDF. Use the following: parameter.put(“parameter_name_declared_in_template”, URL_String_Name) Example: pramater.put(“Logo”, image); 2. Setting the page number is done in iReprot you will find this in the components pallet, also see the “Jasper Ultimate Guide” for more info on subject.
-
Hello, It sounds like you have a hash map issue, make sure you are verifying in the debugger that your hash map is in fact being made. 1. Make sure you a creating a map: Map parameter = new HashMap(); 2. Make sure you are passing said map into the fill manager: JasperPrint print = JasperFillManager.fillReport(REPORT_NAME, parameter, DATABASE_CONNECTION);