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

jkeri

Members
  • Posts

    90
  • 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 jkeri

  1. I have a PAGE HEADER band that contains a parameter. Sometimes the paramater is a single value and other times it consists of multiple values.

    WHat is happening: When the paramater is multiple value it will print properly. BUT,,,,

    MY PROBLEM: When it parameter is multiple values it prints on two lines and forces any remaining lines in the PAGE HEADER band to be pushed and printed over top of the detail band.

    Is there any way to set the band to vertically expand dynamiccally?

     

  2. I have a bar chart and the value axis keeps appearing in increments of .5 instead of increments of 1.   it is appears as 0, .5, 1, 1.5, 2, 2.5 etc   I want instead to show as 0, 1 2, 3, etc. I dont want decimals on the value axis.

    where do I change this setting? I thought it was in the CHART PLOT and the VALUE AXIS TICK LABEL MASK. 

  3. I have a MAIN report with a SUBREPORT.   What i want to do is to pass a field in my MAIN report ($F{USERNAME}) to the parameter in my subreport ($P{SUB_USERNAME}). Basically, for every detail record in my MAIN report I want to pass the username to the SUBREPORT.

    Not sure if or even how this can be done.... Any ideas would be appreciated.

     

  4. I have a MAIN report with an EXCEL data source and a SUBREPORT with an ORACLE datasource.

    In MAIN:

    1.  created parameter called subConn 
    2. class: java.sql.Connection
    3. Default Value Expression: java.sql.DriverManager.getConnection("jdbc:oracle:thin://mylocalhost:1521/mysid", "user","password")
    4. Added the subreport element into DETAIL band
      1. Subreport element 'Expression:' is $P{subConn}

    MY PROBLEM: When I run the subreport by itself it returns values as expected. HOWEVER, when I run the main report I get "Caused by: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection".

    As far as I can tell my Default value expression is correct eacuse it is the same value as the data source for my subreport. And the subreport runs correctly when it is run by itself.

     

    ANY ideas of what or where else i can look?

     

  5. I have a report (Jasper 6.3.0) that has an EXCEL sheet as the MAIN report and a subreport from with an oracle data source.

     

    In MAIN i created a parameter: subConn and class:  java.sql.Connection

    and Default Value Expression: java.sql.DriverManager.getConnection("jdbc:oracle://myhost:1525/mySID", "myuser", "mypassword")

    I do not know what to do in the subreport side.

     

    Do I also need to declare parameter subConn in the SUBREPORT? and what else is needed in the SUBREPORT.

     

    SubConn

     

  6. I have a request from a user that incorporates the use of an EXCEL sheet from which to pull/extract data from an oracle table.

    I have two data adapters set, one for the EXCEL nd one for the ORacle table.

    Looks like I will have to use a subreport to display the Oracle table and the main report will be the EXCEL.    Is this possible?

     

    This is our first attempt at using an EXCEL file and an ORacle Table in the same report.

     

  7. I do not know how to code the PRINT WHEN EXPRESSION for a column in the report.

    Column name is $F{DONOR_LAST_DONATION_DATE}     and I want to print blanks when the date is '31-Dec-2222'

    This is my MSSQL statement in the query...

    CASE WHEN DON_LAST_DON_DATE <> '00000000' THEN
                          format(cast(DON_LAST_DON_DATE as DATE), 'dd-MMM-yyyy', 'en-gb')
                    else
                         format(cast('22221231' as DATE), 'dd-MMM-yyyy', 'en-gb')
            end "DONOR_LAST_DONATION_DATE",  

  8. I have a report with two date parameters. Both are defined as java.sql.DATE 

     

    This is my Oracle query WHERE statement 

        'and COL.collection_date    between  $P{STARTDATE} and $P{ENDDATE}'

    PROBLEM:

    When I run with this WHERE , the report reports results 1 day after the STARTDATE value. For example , I enter date values of 10/3/2016 for STARTDATE and 10/10/2016 for ENDDATE.

    The report returns value between 10/4/2016 and 10/10/2016

     

    BUT when I change the WHERE to  'and COL.collection_date    between  $P{STARTDATE} - 1 and $P{ENDDATE}', the report returns values between 10/3/2016 and 10/10/2016 which is what I wanted.

     

    Is there anyway other than having to do a '-1' for the STARTDATE parameter?

  9. I need to create a report that uses and Excel sheet as input... It contains 'city', and 'sales' fields. For each 'City' filed in the  Excel , I want to do a query against an oracle table.

     

    What i dont know is how to even begin the design... Should i do a subreport ?    How can i use the 'city' filed in the Excel as a key/paramater to pull out data from my SQL query?

     

    Select city, sales from AnnualSales where city =  city from the excel

  10. In my Excel i have a field called 'LOCATION'.and 'TXTYPE in the Jasper report and both are defined as 'java.lang.String'.

    I have a parameter called P_LOCATION and it is defined as Java.util.List.

     

    My 'FILTER EXPRESSION' is

    ((ArrayList) $P{REPORT_PARAMETERS_MAP}.get( "P_CENTER" )).contains($F{Cardholder Identifier}.toString())

    which allows the user to enter one or more calues for the parameter P_CENTER.   This is working as I expected.

    But now my user wants to  also exclude  where the first two characters of TXTYPE = 'R-'

    What I dont know is what the 'FILTER EXPRESSION' statement should be.

     

  11. Ok,, here is what i did for the AMOUNT field.  I chnaged it from class type 'java.lang.String' to 'java.lang.Integer'.      This works!!!!

    Now I have the same type of issue with a date field.

    It is defined in EXCEL as 'CUSTOM' with a mask of' m/d/yyyy h:mm:ss AM/PM'.     I am not sure what the Class Type would be in Jasper.      I tried 'java.sql.Date' and a pattern of' MM/DD/yyyy'.  Any suggestions?

     

  12. in my Excel sheet i have an AMOUNT field. The cell is defined /formatted as a NUMBER.  The first line in the EXCEL is the header with the column headings. Data starts on the second line.

    In my jasper repoprt , by default, the AMOUNT field is defined as 'java.lang.String'.       When I run the report i keep getting   'net.sf.jasperreports.engine.JRException: Unable to get value for Excel field "AMOUNT" of class java.lang.String' error.      I have tried all other types of classes, ; big decimal, integer, long.,short, float, none of them seem to work.

    Anyone have any idea as to what class i should assign to the AMOUNT filed?

  13. I have an Excel worksheet that has a field called 'LOCATION' .   My Jasper report will read the Excel worksheet and report the contents. The report will have a paramater, P_LOCATION that the user enters a value and only those 'LOCATIONS will be reported.

     

    My question is: 

     

    Since there isnt any SQL query, how can I  report only the locations i need?

  14. I have this is my expression editor for a variable. It is a concatination of two fields, one is a date field. What I want to do is to have the date field appear as 'dd-MMM-yyyy' but becuase its concatenated, it comes across as yyyymmdd.

     

    "Reactive Field "+$F{REACTIVE_DATE}+" -- -"+$F{REACTIVE_NUMBER}

    is showing up as

    'Reactive Field 20161112 --- 5515

     

    I want it to show as

    'Reactive Field 12-Nov-2016 --- 5515

     

    I dont how to get the date into that format

     

  15. Using Jasper 6.3.0

     

     

    I have a MSSQL query as follows

     

    Select CONVERT(CHAR(8),COLLECTION_DATE,112)                  "COLL_collection_date" from MYTABLE

     

    The field is in yyyymmdd as returned by the query. I want it to appear in my report as dd-MON-yyyy.

     

    Since we are not a Java shop, i donot know if i need a 'Pattern' or Pattern Expresions' and if i do, what the java coding would be.

  16. Im not sure I was clear on what i was aking.

     

    My SQL query on a Jasper Reports Oracle datebase is something like this: Table ORACLE2 is on a different Oracle database so I had to create a LINK to it.

     

    Select Oracle1.customer, Oracle2.location from

    customer_table ORACLE1,

    location_table@SAPWORLD ORACLE2

    where..........

     

    WHAT the plan is now is to table my ORACLE2 table and move it to a MS SQL server. SO now my query will access one ORACLE table and one MSSQL table. Can this be done?   I am trying to avoid having to rewrite the SQL query .

×
×
  • Create New...