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

Apolo

Members
  • Posts

    24
  • 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

Posts posted by Apolo

  1. Hi, I have next problem:

    I have 2 subreports

    1st: return time and integer value

    2nd: return time and string value

     

    1st subreport return this records

    06.10.2006 3:41:56 PM; 1

    06.10.2006 2:35:34 PM; 2

    06.10.2006 3:47:09 PM; 3

    06.10.2006 2:26:27 PM; 4

     

    2nd subreport return this records

    06.10.2006 2:30:56 PM; str1

    06.10.2006 2:45:34 PM; str2

     

    between data from subreports there are no ties

     

    I need create report which will contain this result:

    06.10.2006 2:26:27 PM; 4

    06.10.2006 2:30:56 PM; str1

    06.10.2006 2:35:34 PM; 2

    06.10.2006 2:45:34 PM; str2

    06.10.2006 3:41:56 PM; 1

    06.10.2006 3:47:09 PM; 3

     

    Somebody have any idea how can I do this?

    Thanx in advance.

  2. about pagination for specific rows in table:

    you can use simple scriptlet

    Code:
    private Integer counter = 0;
    public String resetCounter()
    {
    return "";
    }

    public String incCounter()
    {
    counter ++;
    return "" + counter;
    }

     

    and text fields with expression

     

    Code:
    [code](""+$P{REPORT_SCRIPTLET}.incCounter())
    or
    (""+$P{REPORT_SCRIPTLET}.resetCounter())

     

    --------

    about colors of rows:

    you need create 2 text fields "($V{DBField})" with different colors and use parameter

    "print when expression" =

    "($V{COLUMN_COUNT}%2)==0" for 1st text field

    and

    "($V{COLUMN_COUNT}%2)==1" for 2nd text field

  3. Hi, can somebody tell me how to export report with images in html?

    problem: when I generate report in html - address of image file is wrong and image is not displayed.

     

    in report image expression = ("C:\image.gif")

    in HTML img src = "file:///C:/image.gifimg_0_0_0"

     

    And is there an opportunity to export all report in one html file together with images?

  4. 1. You need to make the following:

     

    -set left margin = 0 for subreport (Edit > Report properties > page margin), after do not forget to recompile subreport!

     

    -place subreport on main report with parameter left = 0

     

    The rest I shall try to make later.

  5. I have added one more returnable value with calculation type: “Sumâ€

    Code:


    Property of variable var:

    Code:

    Text field with variable var is in “Summaryâ€
    Property of text field:
    Evaluation time: “Bandâ€

    Result: variable var contain last value from subreport instead of sum of returned values.

    Maybe you have a sample how calculate sum of values returned from subreport?

  6. I understand your problem. You need using something dataset for your subreport.

    For example:

    If query in subreport return 3 records the subreport will be render 3 times.

    If you do not use dataset for subreport or query return 0 records – you can not see subreport.

     

    In attach sample with subreport.

     

    [file name=reports.zip size=4224]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/reports.zip[/file]

     

    Post edited by: Apolo, at: 2006/09/13 18:36

    Post edited by: Apolo, at: 2006/09/13 18:37

  7. How are you using the value returned from the subreport in your other variable?

     

    I need find sum of returned values. + In the future more complex data processing from subreport can be necessary.

     

     

    I solved this problem by using very simple scriptlet:

     

    Code:

    + 2 text fields:

    1. field1:

    a. textfield expression: "" + $P{REPORT_SCRIPTLET}.addcount($V{icount}.intValue())

    b. evaluation time: “Bandâ€

    c. band: “Detailâ€

    2. field2:

    a. textfield expression: "" + $P{REPORT_SCRIPTLET}.getcount()

    b. evaluation time: “Nowâ€

    c. band: “Summaryâ€

     

    result:

    Value, which is returned from subreport, processed in the scriptlet.

  8. Hi

    Maybe anybody know, how returned value from subreport use in variable in main report?

    I have:

    1. <returnValue subreportVariable="icount" toVariable="icount"/>,

    2. Text field in main report with “Textfield expression†= “$V{icount}†and “Evaluation time†= “Bandâ€

    3. Variable “var†in main report with “Variable expressionâ€=“$V{icount}â€

    4. Text field in main report with “Textfield expression†= “$V{var}†and “Evaluation time†= “Bandâ€

     

    When I generate report value of text field (icount) is correct, however value of test field (var) is null.

     

    How solve this problem?

     

    Thanks.

     

    P.S.

    Sorry for bad English.

×
×
  • Create New...