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

sprilukin

Members
  • Posts

    10
  • 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 sprilukin

  1. What version of JasperReports Server do you use?

    This issue can appear in JRS v4.7

    but it should not appear in latest versions. (If i remember correctly >= JRS v5.0)

     

    Also please check jasperserver_config_<YOUR_LOCALE>.properties

    it should contains consistent date format for both

    date.format, datetime.format, time.format and

    calendar.date.format, calendar.datetime.format, calendar.time.format properties
     

    Properties with calendar.* prefix are used to configure jQuery datepicker calendar plugin which is used in JRS

    while properties without such prefix are used in java backend to parse/format strings (see javadoc)

    so for example

    values date.format and calendar.date.format should provide SAME parse/format results for same dates.

     

    P.S. these properties are duplicated because jQuery calendar plugin is a little bit different from java DateFormat pattern

     

    Hope this helps.

     

  2. Hello, Daning.

    There is no fully dynamic way to change color, font or other properties of input controls.

    There are two supported ways for now:

    1. Add css class for input controls definition in jasperserverWEB-INFjspmodulesinputControlsInputControlTemplates.jsp - this will change look&feel of controls in all reports which use default report parameters form. (works for JasperReports Server of version 4.7.1 or later)

    2. Change report parameters form for specific report(s) - go to Edit report -> Customization -> JSP Location   

    and set path to custom parameters form jsp (you can copy&paste DefaultParametersForm.jsp and customize it). This way allows you to customize input controls only for specific report(s)

     

    Thanks,

    Sergey.

  3.  

    Please check that you log in to jasperserver using same timezone as you database, and jasperserver instance. 
     
    If this not help check type of your datasource JDBC or JNDI?
    If JDBC then try to switch to JNDI.
     
    If nothing helps as a last resort you can edit datasource and select different timezone for it, so in runtime it will show correct value but it is not recommended way, better is just to upgrade to 5.0 there  several timezone issues was fixed.
     
    thanks,
    Sergey.
  4. You can use DateRange type to define ranges like day-1, week, year, quarter  etc. and use this ranges as a query parameters.

    For example lets say you have following parameter:

     

    <parameter class="net.sf.jasperreports.types.date.DateRange" name="dateRange"><defaultvalueexpression><!--[CDATA[new net.sf.jasperreports.types.date.DateRangeBuilder("WEEK").toDateRange()]]--></defaultvalueexpression>
    </parameter>

     
     
    and following query:
     
    <querystring>
    <!--[CDATA[select * from test_table where $X{EQUAL, orderDate, dateRange}]]-->
    </querystring>

    when you will run such query you will get similar SQL:

    select * from test_table where orderDate >= "START DAY OF CURRENT WEEK" and orderDate <= "END DAY OF CURRENT WEEK"[/code]

     

     

    As an expression for DateRangeBuilder you can use following syntax:

    "DAY+/-n"   - (for example "DAY+1", "DAY-23"  - no spaces and all uppercase) means n-th day after (or before) current day,

    "WEEK+/-n", "QUARTER+/n", "SEMI+/-n", "YEAR+/-n"

     

    This type is compatible with Date type thus if you will create filed of such type then you will be asked to fill it you can enter either relative date expression as described above or regular date.

     

    Also you can read javadoc for DateRangeBuilder class in sources of JasperReports library to find all possible cases how to use it.

    Hope this helps.

     

    Thanks,

    Sergey.

     

×
×
  • Create New...