CA Service Management

  • 1.  Compare Date Input Control with object Ca

    Posted Apr 19, 2017 05:26 PM

    Hi, I need help

    I'm creating a report in Jaspersoft Studio and using SDM Datasource and of course objects layer, I create parameters like input control for Start_date and End_date all is fine but when I compare this parameters in my SQL query doesn´t found any result.

     

    My sql query is like this:

     

    select cr.open_date from cr

    where cr.open_date between $P{Start_date} and $P{End_date}

     

    There is no any message error only no data.

     

    I believe that type of object cr.open_date is not a correct type for comparison, Start_date and End_date are the type java.sql.Date

     

    Thank you.



  • 2.  Re: Compare Date Input Control with object Ca

    Posted Apr 20, 2017 02:06 AM

    Hi,

     

    Date parameters must be unixdate format (as integer),

     

    Best Regards

    Türker



  • 3.  Re: Compare Date Input Control with object Ca

    Posted Apr 22, 2017 04:02 PM

    I worked with CA objects and these are in MM:dd:yyyy hh:mm:ss



  • 4.  Re: Compare Date Input Control with object Ca

    Broadcom Employee
    Posted Apr 20, 2017 03:17 AM

    HI Rohlf,

    How are you trying to create a report .. Jasper Server report or Jasper Studio..

    There are some issues related to Date conversion if your using Jasper Server.. I would recomend you to use Studio instead.

    ~Vinod.



  • 5.  Re: Compare Date Input Control with object Ca

    Posted Apr 20, 2017 10:26 AM

    Hi, I said that I used Studio and the expression editor is very complicated to people that is continue working with BOXI and his SQL language for expressions editor, It's very different.

     

    Finally I could find the problem, I had to build a filter in Dataset Editor and no in my SQL Query.

     

    The filter has to be like this and It´s worked:

     

    AND($F{cr2.open_date}.getTime() >=$P{FecIni}.getTime(),$F{cr2.open_date}.getTime() <=$P{FecFin}.getTime() )

     

    now What do you think about this?