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

jmurray

Members
  • Posts

    401
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Downloads

Posts posted by jmurray

  1. This can be fixed.  My solution might not be 'the correct' way to do it, but in the absence of any useful documentation it'll have to do.

    Open iReport and select Tools - Options from the menu

    Push the Advanced Options button

    Under IDE Configuration expand the System and File Types branches

    Select the file type called Jrxml files and copy it (<ctrl>-<c> or use the right mouse button to select Copy)

    Select the File Types branch and paste a copy of Jrxml files in.  It should be pasted in as something like jrxmlResolver_1.xml

    Rename the new file to xml files using the right mouse button menu

    Select the new file type definition (ie. xml files)  and press the text editor button next to All Files on the right hand panel

    Select all the text and copy it using <ctrl>-<c>

    Open your favourite text editor (jEdit, WordPad, NotePad, etc) and choose File - Open from the menu

    Paste the copied text into the path text box (note: if you use jEdit you need to rub out the filename off the end of the path).  NOTE: only do this step ONCE (ever) or you'll bugger up the MIME type parser and you'll be in for a neat game of "let's try to delete the offending file type definitions before the blinking error message pops up". Not fun.

    Open the file which should look like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE MIME-resolver PUBLIC "-//NetBeans//DTD MIME Resolver 1.0//EN" "http://www.netbeans.org/dtds/mime-resolver-1_0.dtd">
    <MIME-resolver>
        <file>
            <ext name="jrxml"/>
            <resolver mime="text/x-jrxml+xml"/>
        </file>
    </MIME-resolver>

    Change the blue line so that it reads <ext name="xml"/> and save the file.
     

    Restart iReport to make the changes come into effect.

     

     

     

  2. It is definitely not from hibernate beans. I don't even know what they are :)

     

    If you read the comments at the top of the ddl you'll see that it is adapted from the MySQL ddl script that is packaged with JasperServer. The original ddl had a few minor issues that caused major headaches, so they were fixed along the way.

     

    As you can see from the post following the one with the Oracle patch in it there are still some data dependencies that need to be taken care of for everything to work.

     

    Good luck.

  3. Sorry badrishpandya and HBK, I have no idea. My original solution revolved around the Oracle patch, not the java version.

     

    Unfortunately I'm using j2sdk1.5 so I'm not even able to replicate your problems. Maybe someone else on the forum will have an answer.

  4. Each TextField / StaticTextBox can only display a single font style at report generation time. So you cannot mix plain text with bold text in the same report element.

     

     

    You can change the font style for an entire TextBox on a row-by-row basis using conditional styling, but you are still limited to a single font style within the TextBox at any one time.

     

     

    You can't even fake it when using HTML output by putting inline HTML code in to achieve the result. Jasper re-renders the inline HTML code so that it is displayed as part of the text!

     

     

     

    .

    Post edited by: jmurray, at: 2007/10/24 05:39

  5. Unfortunately the HTML output is in table format. You cannot have overlapping table elements in HTML, and therein lies your problem. It's not a JasperReports issue, simply the way that HTML has been implemented.

     

     

    They might have been able to achieve the desired result using transparent DIVs, but not all browsers support them properly so the desired results cannot be guaranteed.

     

     

    This might work for you: it's ugly and fiddly and difficult to manage, but you can get the desired result.

     

     

    For this solution you need to take a copy all of the elements in the detail band so you have two identical sets.

     

     

    One set of elements has a PrintWhen Expression of new java.lang.Boolean(($V{BACKGROUND}.intValue() % 2)==1) and the background colour of your choice (eg. light grey). The other set has a PrintWhen Expression of new java.lang.Boolean(($V{BACKGROUND}.intValue() % 2)==0) and no background colour set.

     

     

    Now move the copied set of elements over the top of the original set of elements so that they are in identical positions. This will give you the alternating background colour for each of the elements, but will leave gaps between them.

     

     

    Fill the gaps with rectangles that have a PrintWhen Expression of new java.lang.Boolean(($V{BACKGROUND}.intValue() % 2)==1) and the background colour of your choice (eg. light grey). You'll need to fiddle with the horizontal placement and pen settings to get the space fillers to work properly.

     

     

     

    .

    Post edited by: jmurray, at: 2007/10/23 04:06

  6. No. Not at all. Each of the reports built from the template are merely snapshots of the template.

     

     

    If the template changes then the changes will only be applied to new reports created using the template.

     

     

    That is why the subreport method can be better in some respects.

  7. There's no include file option, but you can create your own with a standard subreport or two. All your common header and footer attributes can be set in just a few files, and any information that changes from report to report can be passed in as parameters.

     

     

    It takes a little bit of work to configure the first report, but after that life is simple. Any changes to a subreport ripple through to all reports once the new jasper file is deployed.

     

     

    Alternatively you could define a report template with various styles predefined. Then it's just a matter of copying the report template and modifying the report query and a just a few report elements.

  8. You can't 'call a stored procedure', but you can select from a function that references a stored procedure:

     

     

    eg1. SELECT myFunction() FROM DUAL;

    eg2. SELECT site_code, getSiteNameFromCode(site_code) FROM ActiveSitesVw;

     

     

    A function can only return a single value per row to an SQl query, so if you want more than one value to be returned then you have to set up multiple functions or call the same function mutliple times with different parameter settings.

     

     

    For most iReport applications it would be better not to call a function that retrieves information from a procedure that is based on a cursor. Instead, put the cursor statement into the main report or a subreport and simply call the function that acts on the contents of the cursor's return values, like in eg2. above.

  9. When you export to Excel you lose control of the cell formatting because Excel defaults to "General". With General formatting, all numbers with leading zeroes are shown as numbers without any leading zeros (sam goes for trailing zeros in the fractional component too!).

     

     

    If you try to force it to be a string using an apostrophe or surrounding it in quotes then those extra characters will be displayed because Excel sees the incoming data as data, not a user's keyboard entry.

     

     

    You cannot get around the problem by exporting to CSV either. The same things happen.

     

     

    So join the masses Evie and rest assured that there is not likely to be a solution to your problem in the near future.

  10. You are missing the hyperlink definition.

     

     

    You don't need to create a new field, just use static text. Here's how:

     

     

    Create a new TextField of type java.lang.String. Set the TextField Expression to "mailto:email@company.com" under the Text Field tab.

     

     

    Now select the Hyperlink properties tab. Change the Hyperlink Type to "Reference". In the Hyperlink Reference Expression enter "mailto:email@company.com".

     

     

    And that's all you need to do to get a static text hyperlink entry to work.

     

     

     

    If you actually want to retrieve email addresses from your database and display them as email hyperlinks then you do exactly the same thing, except you need to replace the TextField Expression and Hyperlink Expression with "mailto:" + $F{emailaddress}

  11. You problem is that java is case sensitive: use doubleValue() not DoubleValue().

     

     

     

    If your field is an Integer then you can always grab its intValue(), like this:

     

     

    new java.lang.Double($F{FIELDNAME}.intValue()/100)

     

     

    You TextField is still a java.lang.Double. You can force it to be a java.lang.Integer if you want, just recast the result like this:

     

     

    new java.lang.Integer(new java.lang.Double($F{FIELDNAME}.intValue()/100).intValue())

     

     

     

    .

    Post edited by: jmurray, at: 2007/10/11 22:43

  12. Well it's pretty clear that $P{CUST_ID} is empty. So you need to do two things:

     

     

    1) make sure that $P{CUST_ID} is set up with a default value (eg. new java.lang.Double(0))

     

     

    2) make sure that you have set up the subreport parameters correctly in the main report because it appears that you haven't done this.

  13. Return the values you want from the subreports to variables in the main report in the normal way.

     

     

    You can return as many variables from each subreport as you need. You'll need the same number of variables in the main report, and the variables in the main report need a Calculation Type of "System".

     

     

    Once you have all your variables sorted out you can display the total simply by adding them together in a Text Field. An example TextField Expression might look something like this:

     

     

    Code:
    new java.lang.Double ( $V{var1}.doubleValue() + $V{var2}.doubleValue() + $V{var3}.doubleValue() + $V{var4}.doubleValue() + $V{var5}.doubleValue() )

×
×
  • Create New...