Search Results

Search found 79 results on 4 pages for 'ireport'.

Page 2/4 | < Previous Page | 1 2 3 4  | Next Page >

  • Trend analysis using iterative value increments

    - by Dave Jarvis
    We have configured iReport to generate the following graph: The real data points are in blue, the trend line is green. The problems include: Too many data points for the trend line Trend line does not follow a Bezier curve (spline) The source of the problem is with the incrementer class. The incrementer is provided with the data points iteratively. There does not appear to be a way to get the set of data. The code that calculates the trend line looks as follows: import java.math.BigDecimal; import net.sf.jasperreports.engine.fill.*; /** * Used by an iReport variable to increment its average. */ public class MovingAverageIncrementer implements JRIncrementer { private BigDecimal average; private int incr = 0; /** * Instantiated by the MovingAverageIncrementerFactory class. */ public MovingAverageIncrementer() { } /** * Returns the newly incremented value, which is calculated by averaging * the previous value from the previous call to this method. * * @param jrFillVariable Unused. * @param object New data point to average. * @param abstractValueProvider Unused. * @return The newly incremented value. */ public Object increment( JRFillVariable jrFillVariable, Object object, AbstractValueProvider abstractValueProvider ) { BigDecimal value = new BigDecimal( ( ( Number )object ).doubleValue() ); // Average every 10 data points // if( incr % 10 == 0 ) { setAverage( ( value.add( getAverage() ).doubleValue() / 2.0 ) ); } incr++; return getAverage(); } /** * Changes the value that is the moving average. * @param average The new moving average value. */ private void setAverage( BigDecimal average ) { this.average = average; } /** * Returns the current moving average average. * @return Value used for plotting on a report. */ protected BigDecimal getAverage() { if( this.average == null ) { this.average = new BigDecimal( 0 ); } return this.average; } /** Helper method. */ private void setAverage( double d ) { setAverage( new BigDecimal( d ) ); } } How would you create a smoother and more accurate representation of the trend line?

    Read the article

  • Jasper report not showing detail section

    - by Jawad Ahmad
    I have designed a report in iReport and now I am using it in my application. The problem is that the report is generated showing all the data except the detail section data. There is no database connectivity problem, as the column header shows data which is coming from database. Only the detail section of the report shows nothing, neither data from database nor any static data. What is going on?

    Read the article

  • Detect start of a new band

    - by Dave Jarvis
    Using iReport, how do you set a variable (could be a parameter, or a value in the REPORT_PARAMETERS_MAP) to Boolean.TRUE at the start of a new band? There are some fields in the header that should only be displayed after a specific band has started being filled. Thank you!

    Read the article

  • Run a JasperServer reprt via PHP and pass over the querystring.

    - by Ronedog
    I'm using Web Services to run some reports created in iReport on JasperServer. Inside the .jrxml file I can see the xml that holds the SQL for the report. Is it possible to pass this querystring over to JasperServer via Web Services, instead of hard coding the definition inside the .jrxml file. This is the string I would build in PHP, then pass over to JasperServer to be used in the execution of the report. <queryString> <![CDATA[SELECT * FROM table WHERE j=2]]> </queryString> Basically, I'm trying to find a way to dynamically create the SQL in PHP, then pass the SQL over to Jasper to run the report...is it even possible? Thanks.

    Read the article

  • PHP variable passed to JasperServer for reports

    - by Ronedog
    Is it possible to pass a variable from php to a report in JasperServer? For example, in my php application I keep the department_id stored in a session variable. I would like to pass the department_id over to my reports running on JasperServer and display the information appropriate for that department. in the iReport I have a query like: "SELECT * FROM employees WHERE department_id = $P{dept_id_from_php}", but I have to build a dropdown select list to pass the dept_id parameter. The end result is I would like the user logged into my PHP application to view the employee information that is related to the department the logged-in-user belongs to. I don't want to pass this over using the querystring because the user could just change the id in the querystring and have access to other departments information. Ideally I would like to only pass that parameter once, then reuse it in all the reports, like a global variable. Is this possible?

    Read the article

  • Multiple unrelated in JasperReports

    - by Laren Mortensen
    I am using iReport with JasperReports. I want to include multiple subreports that have unrelated sql queries. I would like to be able to put these all on one report. The problem I am facing is that when I leave the master report sql query empty, none of my subreports have any data. There isn't really anything that the master report sends to the subreports since they are unrelated. Basically how do you throw multiple unrelated reports together into one report.

    Read the article

  • Prevent the groupfield from repeating every three rows

    - by Aaron
    I have a web app and I need to integrate some JasperReports in this app. So I downloaded iReport and I used the templates. I choose the LeafGreen template, but I have a problem. When I have more than 4 elemets in my list, my headers gets repeated every 4 elements (see the image:) - I don't want this; once is enough. The problem: http://i39.tinypic.com/9kcp6p.jpg This is the template: http://i44.tinypic.com/2ags1w1.jpg What I'm doing wrong?

    Read the article

  • RTF formatting in jasper reports

    - by ed1t
    I have a report which I generate RTF format off that. It displays fine on the jsp page or in the ireports preview but when it generates the RFT format, it gives me the "Invalid text height" error. I have no idea which field is causing this error, is there a way in ireports to drill down exactly which field is causing it?

    Read the article

  • Subreport within Subreport

    - by ysa
    Hi, I need to create a sub-report within a subreport, I'm using xpath as my query language. Any suggestion on how I can create it. To Illustrate it: Line Details - 1st sub-report Line Detail Info - 2nd sub-report Each Line Details can have 1 Line Detail Info. Thanks

    Read the article

  • How to stretch textfield in a JasperReport as per dynamic content?

    - by Debadatta Viva la Vida
    http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="tree-template" pageWidth="595" pageHeight="842" columnWidth="481" leftMargin="57" rightMargin="57" topMargin="72" bottomMargin="72" want this field to auto stretch as per content <textField isStretchWithOverflow="true" isBlankWhenNull="true"> <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="80" width="463" height="20"/> <textElement> <font size="10"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{goals}==null ? "Not Defined":$F{goals}]]></textFieldExpression> </textField> want this field to auto stretch as per content <staticText> <reportElement stretchType="RelativeToTallestObject" x="0" y="100" width="98" height="20"/> <textElement> <font isBold="true"/> </textElement> <text><![CDATA[Status Details]]></text> </staticText> <textField isStretchWithOverflow="true"> <reportElement stretchType="RelativeToTallestObject" x="2" y="120" width="463" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{statusDetails}==null ? "Not Defined":$F{statusDetails}]]></textFieldExpression> </textField> <staticText> <reportElement stretchType="RelativeToTallestObject" x="0" y="140" width="98" height="20"/> <textElement> <font isBold="true"/> </textElement> <text><![CDATA[Risk Mitigation]]></text> </staticText> <textField> <reportElement stretchType="RelativeToTallestObject" x="18" y="160" width="463" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{mitigation}==null?"Not Defined":$F{mitigation}]]></textFieldExpression> </textField> <textField> <reportElement stretchType="RelativeToTallestObject" x="79" y="40" width="100" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[new SimpleDateFormat("MMM dd,yyyy").format($F{releaseDate}.getTime())]]></textFieldExpression> </textField> <line> <reportElement x="0" y="180" width="481" height="1"/> </line> </band> </detail> <columnFooter> <band height="12" splitType="Stretch"/> </columnFooter> <pageFooter> <band height="13" splitType="Stretch"> <frame> <reportElement mode="Opaque" x="0" y="0" width="477" height="13" forecolor="#D0B48E" backcolor="#9DB1B8"/> <textField pattern="EEEEE dd MMMMM yyyy"> <reportElement style="Column header" x="2" y="0" width="197" height="13" forecolor="#FFFFFF"/> <textElement verticalAlignment="Middle"> <font size="10" isBold="false"/> </textElement> <textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression> </textField> <textField evaluationTime="Report"> <reportElement style="Column header" x="450" y="0" width="27" height="13" forecolor="#FFFFFF"/> <textElement verticalAlignment="Middle"> <font size="10" isBold="false"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression> </textField> <textField> <reportElement style="Column header" x="370" y="0" width="80" height="13" forecolor="#FFFFFF"/> <textElement textAlignment="Right" verticalAlignment="Middle"> <font size="10" isBold="false"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression> </textField> </frame> </band> </pageFooter> <summary> <band splitType="Stretch"/> </summary>

    Read the article

  • How to configure iReports to use grails domain class ?

    - by fabien-barbier
    I'm using JasperGrails plugins (http://www.grails.org/Jasper+Plugin) to generate reports. When I configure iReports dataSource with Database JDBC connection everything works well. But how to configure iReports with grails and Jasper plugin ? I try to configure my dataSource by selecting "JavaBeans set data source", but I have this error message : ClassNotFoundError ! (I try to add my domain in classpath by pointing to my IDEA project folder, but I have always same message). What is the best way to configure iReports with grails/groovy ?

    Read the article

  • Best fit curve for trend line

    - by Dave Jarvis
    Problem Constraints Size of the data set, but not the data itself, is known. Data set grows by one data point at a time. Trend line is graphed one data point at a time (using a spline/Bezier curve). Graphs The collage below shows data sets with reasonably accurate trend lines: The graphs are: Upper-left. By hour, with ~24 data points. Upper-right. By day for one year, with ~365 data points. Lower-left. By week for one year, with ~52 data points. Lower-right. By month for one year, with ~12 data points. User Inputs The user can select: the type of time series (hourly, daily, monthly, quarterly, annual); and the start and end dates for the time series. For example, the user could select a daily report for 30 days in June. Trend Weight To calculate the window size (i.e., the number of data points to average when calculating the trend line), the following expression is used: data points / trend weight Where data points is derived from user inputs and trend weight is 6.4. Even though a trend weight of 6.4 produces good fits, it is rather arbitrary, and might not be appropriate for different user inputs. Question How should trend weight be calculated given the constraints of this problem?

    Read the article

  • Jasper Reports HTML Preview problem

    - by payal
    I have a jrxml file which is displayed properly when previewed in PDF, but the same file doesn't display correctly when previewed in HTML. Overlapped objects are not displayed. The alignment and formatting also changes. Please help.

    Read the article

  • Jasper Sub reports not showing in main report

    - by BlackPanther
    I am having one jasper report.Inside of the that main report I am adding one sub report.I am passing collections and parameters using java class(Not using sql query directly).It is compiling successfully. But while running it shows only main report.It is not showing the sub report.And also it is not making any error. It is just giving some empty space for that place. Can any one tell me how to solve this? What are all the rules I have to follow while adding subreport in jasper?

    Read the article

  • Long text input from user and PDF generation

    - by Petteri Hietavirta
    I have built a web application that can be seen as an overcomplicated application form. There are bunch of text areas with a given character limit. After the form submission various things happen and one of them is PDF generation. The text is queried from the DB and inserted in the PDF template created in iReports. This works fine but the major pain is overflowing text. The maximum number of characters is set based on 'average' text. But sometimes people prefer to write with CAPS or add plenty of linefeeds to format their text. These then cause user's text to overflow the space given in PDF. Unfortunately the PDF document must look like a real application form so I cannot allow unlimited space. What kind of approaches you have used to tackle this? Clean/restrict user input? Calculate the space requirement of the text based on font metrics? Provide preview of the PDF? (too bad users are not allowed to change their input after submission...)

    Read the article

  • Master report and subreport communication

    - by Dave Jarvis
    How do you determine whether the content for the detail page being displayed is filled by a specific subreport? For example, consider two subreports on the same master report, using different detail bands: Detail 1 Detail 2 The header on the master report should show certain fields on pages where the subreport in the Detail 2 band is printed. A Return Value from the subreport in the Detail 2 band only seems to be set after the report has finished, even though the Reset type for the variable (in both the master and the subreport) is set to Page. (Setting it to Report also does not help.)

    Read the article

  • Web framework with JasperReports integration?

    - by Dave Jarvis
    What web development frameworks natively support JasperReports? Consider the following form as an example: <form name="report" method="post"> <input type="hidden" name="REPORT_PATH" value="reports/Names" /> <input type="hidden" name="REPORT_FILE" value="List" /> <input type="hidden" name="REPORT_FORMAT" value="pdf" /> <input type="hidden" name="REPORT_EMBED" value="false" /> Name: <input type="text" name="report_Name" value="" /><br /> Date: <input type="text" name="report_Date" value="" /><br /> <input type="submit" name="View" value="View" /> </form> The framework would pass the report_ parameters to JasperReports, which in turn runs reports/Names/List.jasper, and then sends a PDF attachment to the browser. In general: Ability to configure report (i.e., the hidden REPORT_ variables) Web FORM for setting report parameters (i.e., the report_ variables) Framework handles configuring database connection, report execution, etc. I don't care about the technical minutia on how the integration works. The example above is just one possibility of many.

    Read the article

  • Sql - add row when not existed

    - by Nguyen Tuan Linh
    Suppose I have a query that returns result like this: Project Year Type Amt PJ00001 2012 1 1000 PJ00001 2012 2 1000 PJ00001 2011 1 1000 PJ00002 2012 1 1000 What I want: Every Project will have 2 rows of Types for each Year. If the row is not there, add it to the result with Amt = 0. For example: - PJ00001 have 2 rows of type 1,2 in 2012 -- OK. But in 2011, it only have 1 row of Type 1 -- We add one row:PJ00001 2011 2 0 - PJ00002 have only 1 row of type 1 -- add:PJ00002 2012 2 0 Is there a way to easily do it. The only way I know now is to create a view like: PJ_VIEW. And then: SELECT * FROM PJ_VIEW UNION ALL SELECT t.PROJECT, t.YEAR_NO, 1 AS TYPE_NO, 0 AS AMT FROM PJ_VIEW t WHERE NOT EXISTS (SELECT 1 FROM PJ_VIEW t2 WHERE t2.PROJECT = t.PROJECT AND t2.YEAR_NO = t.YEAR_NO AND t2.TYPE_NO = 1) UNION ALL SELECT t.PROJECT, t.YEAR_NO, 2 AS TYPE_NO, 0 AS AMT FROM PJ_VIEW t WHERE NOT EXISTS (SELECT 1 FROM PJ_VIEW t2 WHERE t2.PROJECT = t.PROJECT AND t2.YEAR_NO = t.YEAR_NO AND t2.TYPE_NO = 2)

    Read the article

  • How to solve this problem in JasperReport?

    - by Kumar
    Hi friends, I want to print a table in pdf document. I need to use two javabean datasource to populate the data in the table. So i used two subreport parallely to map the data.The problem what i am facing is i could not able to organize the second subreport content corresponding to first subreport.That is , if any field's width is big in the first subreport then content in the second report will not align properly corresponding to the first subreport.The below sample will give a good idea about the problem My expected Output SubReport1 SubReport2 S.No Value S.No Value 1 value from first 1 value from second bean java bean value bean 2 value from first bean 2 value from second bean Result which i am getting SubReport1 SubReport2 S.No Value S.No Value 1 value from first 1 value from second bean java bean value 2 value from second bean bean 2 value from first bean Please kindly help me to sort out this problem.

    Read the article

  • Reporting Trend Line

    - by Dave Jarvis
    Hi, How would you create a line in JasperReports that follows the trend for the data, in addition to showing the data points? Here are before and after shots: Before After The Time Series report does not appear to have any such option to draw the orange line. (The orange line should be smooth, and thinner, but that's the general idea.) Any ideas how to craft such a report?

    Read the article

< Previous Page | 1 2 3 4  | Next Page >