Solved

Application Server Task Quick Report Parameters

  • 22 October 2021
  • 5 replies
  • 350 views

Userlevel 2
Badge +7

Hello Everyone,

I have created a quick report for use in an Application Server Task.  Everything is working fine, but I was curious if in the parameter section is it possible to have a dynamic date for the value?  Are there any keywords that IFS recognizes that would allow me to have this report run for data from the previous day?

The help at ...ifsdoc/f1doc/Foundation1/040_administration/230_bckgrnd_processing/030_app_server_tasks/default.htm#QuickReport_job_parameters just has “To be written...” so not a whole lot to go off of there.

If there is not, the System Info doesn’t have any information regarding that form, but is it possible that there is an API that could be used to update that value?

Thanks

 

 

icon

Best answer by lopespetro 22 October 2021, 22:31

View original

This topic has been closed for comments

5 replies

Userlevel 5
Badge +12

Hello Everyone,

I have created a quick report for use in an Application Server Task.  Everything is working fine, but I was curious if in the parameter section is it possible to have a dynamic date for the value?  Are there any keywords that IFS recognizes that would allow me to have this report run for data from the previous day?

The help at ...ifsdoc/f1doc/Foundation1/040_administration/230_bckgrnd_processing/030_app_server_tasks/default.htm#QuickReport_job_parameters just has “To be written...” so not a whole lot to go off of there.

If there is not, the System Info doesn’t have any information regarding that form, but is it possible that there is an API that could be used to update that value?

Thanks

 

 

Hi,

have you tried using the system variables?

 

Userlevel 2
Badge +7

Thanks @lopespetro  for the response

That’s what I originally thought.  I did try #YESTERDAY# and I received this:

ORA-01841: (full) year must be between -4713 and +9999, and not be 0

 

With this as the parameters (that was sent in the exported excel):

Parameters:  (Fnd_View)  
   cursor/OUT (Text) = 
   from_date/IN (Text) = #YESTERDAY#
   to_date/IN (Text) = #YESTERDAY#

 

So I am going to assume that it doesn’t work? I know that #YESTERDAY# format for custom events is YYYY-MM-DD and my quick report has this: TO_DATE('&From_Date', 'YYYY-MM-DD').

 

 

Userlevel 5
Badge +12

Thanks @lopespetro  for the response

That’s what I originally thought.  I did try #YESTERDAY# and I received this:

ORA-01841: (full) year must be between -4713 and +9999, and not be 0

 

With this as the parameters (that was sent in the exported excel):

Parameters:  (Fnd_View)  
   cursor/OUT (Text) = 
   from_date/IN (Text) = #YESTERDAY#
   to_date/IN (Text) = #YESTERDAY#

 

So I am going to assume that it doesn’t work? I know that #YESTERDAY# format for custom events is YYYY-MM-DD and my quick report has this: TO_DATE('&From_Date', 'YYYY-MM-DD').

 

 

I’m not sure if it’s possible. But one thing I did and works is to set the dynamic date direct in the quickreport query.

 

   NVL(to_date('&start_date', 'DD/MM/YYYY'), TRUNC(SYSDATE)) AND
       NVL(to_date('&end_date', 'DD/MM/YYYY'), TRUNC(SYSDATE)) +
       (1 - 1 / 24 / 60 / 60)

Userlevel 2
Badge +7

@lopespetro 

Yeah, thanks for that.  I just went the route of creating two quick reports.  One which I can run in the Application Schedule Task which will run for the previous day.  Then I created a second one where the user can request multiple days if they want on their own.

Userlevel 5
Badge +12

@lopespetro

Yeah, thanks for that.  I just went the route of creating two quick reports.  One which I can run in the Application Schedule Task which will run for the previous day.  Then I created a second one where the user can request multiple days if they want on their own.

Glad You’ve got it.

I’m take a look another time if it’s possible using variables or another dynamic way.

Br.

Lopes