Set date Parameters to Default to Current Quarter
I have 2 date parameters in my report. I would like these parameters to be defaulted to the 1st day of the current quarter and the last day of the current quarter. I need these to be dafaulted because the report is going to be scheduled through BusinessObjects InfoView. I need the flexabilty to allow users to run the report on any date they want, but it needs to default so the scheduling works as expected. Can this be done and if so any assistance would be grateful. Thank you.
Thomas,
although you can't set a prompt / parameter to default like this, you can set a record selection to do this...here's how...
1) in your StartDate and your EndDate parameters set a default value of 1888,08,08
2) create a new formula called Start with syntax like
if {?startdate} = date(1888,08,08)
then
if month(currentdate) in [1,2,3] then date(year(currentdate),01,01) else
if month(currentdate) in [4,5,6] then date(year(currentdate),04,01) else
if month(currentdate) in [7,8,9] then date(year(currentdate),07,01) else
if month(currentdate) in [10,11,12] then date(year(currentdate),10,01)
else {?startdate};
3) create a new formula called End with syntax like
if {?enddate} = date(1888,08,08)
then
if month(currentdate) in [1,2,3] then date(year(currentdate),03,31) else
if month(currentdate) in [4,5,6] then date(year(currentdate),06,30) else
if month(currentdate) in [7,8,9] then date(year(currentdate),09,30) else
if month(currentdate) in [10,11,12] then date(year(currentdate),12,31)
else {?enddate};
4) change your record selection formula to something like
{table.datefield} in {@start} to {@end}
now if the end user doesn't actually put in custom dates, the record filter will default to the current quarter. if they use custom dates, the those dates will be used.
of course you will have to edit the above syntax to your parameter names and datefield name. this method will also pass the filter to the database to increase performance.
cheers,
jamie
Similar Messages
-
How to Set NLS parameters in SqlDeveloper for current and future connection
Hi
I've downloaded sqldeveloper version 1.5.4(build main-5940)
when I try to set NLS parameters as following it is thrwoing following error
TOOLS->PREFERENCES->DATABASE-->NLS parameters
on right side pane
I've changed
SORT----->BINARY_CI
COMP----->LINGUISTIC
then it is generating following log file
SEVERE 43 0 oracle.dbtools.raptor.nls.OracleNLSProvider Error loading nls:ORA-00600: internal error code, arguments: [qctosop:like transform], [], [], [], [], [], [], []
SEVERE 44 114 oracle.dbtools.raptor.nls.OracleNLSProvider Error loading nls:Closed Connection
SEVERE 45 7 oracle.dbtools.db.DBUtil Closed Connection
SEVERE 46 9 oracle.dbtools.db.DBUtil
SEVERE 47 1 oracle.dbtools.raptor.nls.OracleNLSProvider Error loading nls:Closed Connection
SEVERE 48 0 oracle.dbtools.raptor.nls.OracleNLSProvider Error loading nls:Closed Connection
SEVERE 49 5 oracle.dbtools.db.DBUtil Closed Connection
SEVERE 50 0 oracle.dbtools.db.DBUtil
SEVERE 51 1 oracle.dbtools.raptor.nls.OracleNLSProvider Error loading nls:Closed Connection
SEVERE 52 0 oracle.dbtools.raptor.nls.OracleNLSProvider Error loading nls:Closed Connection
SEVERE 53 5 oracle.dbtools.db.DBUtil Closed Connection
SEVERE 54 0 oracle.dbtools.db.DBUtil
SEVERE 55 0 oracle.dbtools.raptor.nls.OracleNLSProvider Error loading nls:Closed Connection
SEVERE 56 1 oracle.dbtools.raptor.nls.OracleNLSProvider Error loading nls:Closed Connection
SEVERE 57 4 oracle.dbtools.db.DBUtil Closed Connection
SEVERE 58 0 oracle.dbtools.db.DBUtil
SEVERE 59 1 oracle.dbtools.raptor.nls.OracleNLSProvider Error loading nls:Closed Connection
SEVERE 60 0 oracle.dbtools.raptor.nls.OracleNLSProvider Error loading nls:Closed Connection
SEVERE 61 4 oracle.dbtools.db.DBUtil Closed Connection
SEVERE 62 1 oracle.dbtools.db.DBUtil
SEVERE 63 0 oracle.dbtools.raptor.nls.OracleNLSProvider Error loading nls:Closed Connection
SEVERE 64 0 oracle.dbtools.raptor.nls.OracleNLSProvider Error loading nls:Closed Connection
SEVERE 65 5 oracle.dbtools.db.DBUtil Closed Connection
SEVERE 66 0 oracle.dbtools.db.DBUtil
SEVERE 67 0 oracle.dbtools.raptor.nls.OracleNLSProvider Error loading nls:Closed Connection
SEVERE 68 0 oracle.dbtools.raptor.nls.OracleNLSProvider Error loading nls:Closed Connection
SEVERE 69 6 oracle.dbtools.db.DBUtil Closed Connection
SEVERE 70 0 oracle.dbtools.db.DBUtil
SEVERE 71 0 oracle.dbtools.raptor.nls.OracleNLSProvider Error loading nls:Closed Connection
SEVERE 72 0 oracle.dbtools.raptor.nls.OracleNLSProvider Error loading nls:Closed Connection
please help me to set NLS parameters for current and future connections.
thanks,
harryHi -K-
actually I want to make SqlDeveloper to make case insensitive search.
when I google, I've found to make oracle as case insensitive I need to set NLS_SORT to Binary_CI and NLS_COMP to LINGUISTIC
Default SQLDEVELOPER NLSParmeters values are as NLS_SORT---->Binary and NLS_COMP--->Binary
Now I want to make these as NLS_SORT---->Binary_CI and NLS_COMP--->LINGUISTICS.
thanks,
harry -
Setting date parameters with yesterdays date
Hi everyone.
I have a very basic report where I have two date fields as parameters, 'From Date' and 'To Date'.
I want the From date to default to yesterday, and the To date to default to today.
I can set todays date simply by adding DEFAULT sy-datum to the parameter.
But I've been unable to figure out how to set yesterdays date.
I tried adding some code before the parameters eg:
lv_yesterday = sy-datum - 1.
and then add DEFAULT lv_yesterday to the parameter but it doesn't do anything.
Anybody able to help here? Seems rather trivial but no luck so far!
Moderator message - You're right, this is a pretty basic question. Please search before asking - post locked
Edited by: Rob Burbank on Jun 23, 2009 5:21 PM
Moderator message - OK - I'm going to unlock it long enough so that you can mark David's solution as - solved your problem (I'd use INITIALIZATION rather than LOAD-OF-PROGRAM though
Edited by: Rob Burbank on Jun 23, 2009 5:23 PMHello Kieran,
I think you need to calculate the date in the LOAD-OF-PROGRAM event block:
REPORT z_test.
DATA: gv_yesterday TYPE d.
PARAMETERS:
pa_date TYPE d DEFAULT gv_yesterday.
LOAD-OF-PROGRAM.
gv_yesterday = sy-datum - 1.
Best regards
David -
How to set "Date Modified" as default tab in Open File window
Photoshop CS5.1
When I click on Open File, the window that comes up has several default columns (FileName, Date, Size, etc).
I can right-click on the tab bar and add "Date Modified" to the tabs, but I would like to have "Date Modified" be a default column whenever I open the file selector (and no matter which folder I open up).
I cannot find a way to do this. I want to know the last date I modified a file, not when it was created.
Is there a way to universally set this column as a default?Date modified always shows for me in Details view.
I believe what columns are showing has to do with what columns you've set in Windows Explorer...
Here's an excerpt paraphrased from my Configure the Windows 7 "To Work" Options book that may cover what you need:
Open Windows Explorer...
Navigate to a folder of the type you want to see (e.g., one containing your Photoshop images) and set Details view.
Make the window look the way you'd like future Explorer windows to look. Reorganize Details view columns, e.g., to Name, Size, Type, Date Created, Date Modified, Attributes, etc. and size them so they fit.
Choose Tools - Folder options, then click the View tab.
Click [ Apply to Folders ] to apply the above settings to all folders.
[ OK ] to exit.
Hope this helps.
If the Date modified still doesn't stick for you, there are some other things I've done (and documented) to tweak the configuration of my systems that may help make my seeing the columns being set as shown in the attached image when I choose File - Open in Photoshop.
-Noel -
Date parameters for the previous fiscal quarter?
Hello Folks,
I have this requirement of selecting the dates for the previous fiscal quarter. usually a fiscal quarter is January 2011 - March 2011. But in my case the fiscal year should be December 2010 to February 2011 and if i check in june 2011 it should return Mar 2011 till May 2011 and so forth. So how can i acheive to be able to select these dates i.e 12/1/2010 till 02/28/2011 in the where clause for the current date?
create table test_A (id int, col varchar(50),change_date date);
insert into test_A values(1, 'A',to_date('20101201 000000', 'YYYYMMDD HH24MISS'));
insert into test_A values(2, 'A1',to_date('20110122 000000', 'YYYYMMDD HH24MISS'));
insert into test_A values(3, 'A1',to_date('20110202 000000', 'YYYYMMDD HH24MISS'));
insert into test_A values(5, 'A1',to_date('20110306 000000', 'YYYYMMDD HH24MISS'));
insert into test_A values(6, 'A1',to_date('20110305 000000', 'YYYYMMDD HH24MISS'));
insert into test_A values(7, 'A1',to_date('20110307 000000', 'YYYYMMDD HH24MISS'));
select * from test_A
1 1 A 12/1/2010
2 2 A1 1/22/2011
3 3 A1 2/2/2011
4 5 A1 3/6/2011
5 6 A1 3/5/2011
6 7 A1 3/7/2011
I only want to see the following
1 1 A 12/1/2010
2 2 A1 1/22/2011
3 3 A1 2/2/2011select *
from test_A
where change_date >= add_months(trunc(sysdate,'Q'),-1)
and change_date < add_months(trunc(sysdate,'Q'),2)
ID COL CHANGE_DATE
1 A 20101201 000000
2 A1 20110122 000000
3 A1 20110202 000000
3 rows selected.
SQL> SY. -
Set Date object to 4:00 pm
Hi
How can I set date object to 4:00pm current day.
I will have to find difference in milliseconds long value starting from 1st january 1970 till today 4:00 pm.
But how, can I find this value.
ThanksWill below code snippet give me 4:00pm time for current day !
DateFormat dfm = new SimpleDateFormat("HH:mm:ss");
Date pm4 = dfm.parse("16:00:00"); -
Default date parameters to trunc(sysdate,'IW') in BI Pub Reports 11G
Hi All,
I have a requirement to default the date parameters in the BI Pub Report to the following when the reprot is scheduled to run.
Start Date - Trunc(sysdate,'IW') - 8
End date - Trunc(sysdate,'IW') - 2
Steps followed:
1. I have created 2 Date parameters in the data model as :P_START_DATE and :P_END_DATE.
2. Created one data set with the query select Trunc(sysdate,'IW') - 8 "P_START_DATE" , Trunc(sysdate,'IW') - 2 "P_END_DATE
I have used the same names for the dates so that they are referenced, but its not working as expected.
Is there any other step i need to follow so that when i run the report from the dashboard, these default values populate which should be editable also.
Can anyone please help.
Thanks &Regards
GeethaHi Neeraj
Not null parameters are not supported in the current release. All you could do it either default a value in there for the user - check the doc for details. Or drop a msg into the report if that value was null and not return any data. The second is not great I admit :0)
Tim -
Default date parameters with timestamps
Hi everyone!
I have an user request that I thought should be fairly simple, but I cannot quite get it working.
We have a concurrent request with beginning and ending date parameters. The users have requested that these dates default to the beginning/end of the current day.
For example:
20-MAR-2009 00:00:00
20-MAR-2009 23:59:59
I thought this would be a simple sql statement, but Apps does not seem to agree.
The parameters are of type FND_STANDARD_DATE.
What we have tried:
select to_char(sysdate, 'DD-MON-YYYY') || ' 00:00:01' p_beg_date
, to_char(sysdate, 'DD-MON-YYYY') || ' 23:59:59' p_end_date
from dual
-- did not work, said looking for DATE format --
select to_date(to_char(sysdate, 'DD-MON-YYYY') || ' 00:00:01', 'DD-MON-YYYY HH24:MI:SS') P_BEG_DATE
, to_date(to_char(sysdate, 'DD-MON-YYYY') || ' 23:59:59', 'DD-MON-YYYY HH24:MI:SS') P_END_DATE
from dual
-- works for beg date, but not end date, both display time as 00:00:01 ( I believe i was having issues in TOAD trying to get it as 00:00:00) --
Any ideas?
Thanks!
Janel
(apologies for the double post - what exactly is the difference between the 2 EBS forums?!?!?)Your second code snippet is correct - it works in my instance :-)
SQL> alter session set NLS_DATE_FORMAT='DD-MON-YYYY HH24:MI:SS';
Session altered.
SQL> select to_date(to_char(sysdate, 'DD-MON-YYYY') || '00:00:01', 'DD-MON-YYYY HH24:MI:SS') P_BEG_DATE,
2 to_date(to_char(sysdate, 'DD-MON-YYYY') || '23:59:59', 'DD-MON-YYYY HH24:MI:SS') P_END_DATE from dual;
P_BEG_DATE P_END_DATE
20-MAR-2009 00:00:01 20-MAR-2009 23:59:59HTH
Srini -
Set the Finder's Search Box default to current folder? How?
How do I set the the Finder's default Search Box parameters to be the current folder that I'm in, instead of searching the whole flamin' computer? (I have to quickly click on the folder name) And also instead of the default being 'Contents', how can I set it to be 'File Name'? It would speed up so many of my searches. I could still click on 'This Mac' to get that, and 'Contents' likewise.
Tks in advance
DrewI complitely agree and very very frustrated with that problem too just wrote this to feedback system:
The problem that many people find is that when you have a finder windows open and that you browse a file like "Appplication" then due to the large number of application you use the search bar by taping the application name.
That's where the problem come from.
Once you tape the application name it start searching in the all computer ! instated of in the file
The second problem is that he is searching the content and it will be better to have as default by file name.
If i wanted to do that kind of search i will use the spolight button next to the clock and people want that search bar in finder to be searching in the folder you are in not all computer.
Last problem is that we don't have a custom option in spotlight preference or finder preference.
I would recommend to have that default search in finder change to search in file ONLY and to add Spotlight option in the Finder Preference for people to be able of customizing it.
When you use that search bar everyday many times a day it becomes very very frustrating. -
Post Author: tegage
CA Forum: Formula
I have many reports that allow the user to specifiy a starting and ending date range. I would like the reports to default to all dates. I can do this by defaulting the start date to "01-01-2000" and the end date to "12-31-2099", but then the calendar tool is useless since there is no TODAY button on the calendar tool and it picks up the default date, i.e., the users will have to do a lot of scrolling through the calendar tool.
The other way is to make the starting and ending date parameters strings and use values like Today, This Week, This Month,.... and reolve them in the record selection formula. This would be nice, but then if the user wants a specific date range, they don't have the calendar tool to use.
Is there a way to take advange of the user-friendliness of string values and still have the calendar tool to use?Post Author: tegage
CA Forum: Formula
Thanks much for the response.
I had done exactly what you described - I had a string parameter for Today, This Week, etc and a set of date parameters - Starting and Ending Date. But, in order to use the Starting and Ending dates in a formula, I had to provide them a default value - leaving them blank causes the record selection formula to explode. The issue here is that the calendar tool picks up the default value instead of showing today's date.
I did more web surfing and found the answer on the Business Objects web site. The solution let me do what you suggested AND keep the Starting and Ending date parameters as Date types and defaulted to blank by making them optional parameters.
From the Business Objects web site (why isn't this stuff in the user's guide?):
2. Control over default values.
3. Request for an 'ALL' value.
Both of requirements 2 and 3 are met with the new optional parameter feature of CR 2008. When a parameter is flagged as 'optional', the report can execute without that value being set. The trick here is that any formula that attempts to reference an optional parameters that doesn't have a value set will return an error. So we've introduced the new HasValue() function which allows you to check and see if the parameter has a value.
This is really powerful, because now you can reference your parameters indirectly through another formula (or custom function) that checks if the parameter has a value or not. If it does, then the formula returns the parameter value. If it doesn't, then it can return whatever default value you wish. So if you want the default to be the day before, or last Friday, then you can code that logic into your formula that uses HasValue to check if the parameter has a value set or not.
Optional parameters were also intended to solve the 'All' problem. Basically, you want a parameter to participate in a record selection formula only if it has a value. If it doesn't, then you want that filter to be disabled. By using optional parameters and HasValue() in your record selection (and new saved data section) formulas, you can include conditions in your filter only if the parameters in those conditions have a value. -
Hi everyone!
I have an user request that I thought should be fairly simple, but I cannot quite get it working.
We have a concurrent request with beginning and ending date parameters. The users have requested that these dates default to the beginning/end of the current day.
For example:
20-MAR-2009 00:00:00
20-MAR-2009 23:59:59
I thought this would be a simple sql statement, but Apps does not seem to agree.
The parameters are of type FND_STANDARD_DATE.
What we have tried:
select to_char(sysdate, 'DD-MON-YYYY') || ' 00:00:01' p_beg_date
, to_char(sysdate, 'DD-MON-YYYY') || ' 23:59:59' p_end_date
from dual
-- did not work, said looking for DATE format --
select to_date(to_char(sysdate, 'DD-MON-YYYY') || ' 00:00:01', 'DD-MON-YYYY HH24:MI:SS') P_BEG_DATE
, to_date(to_char(sysdate, 'DD-MON-YYYY') || ' 23:59:59', 'DD-MON-YYYY HH24:MI:SS') P_END_DATE
from dual
-- works for beg date, but not end date, both display time as 00:00:01 ( I believe i was having issues in TOAD trying to get it as 00:00:00) --
Any ideas?
Thanks!
JanelThank you amox!!
This gives me 3/20/2009 12:00:24 AM for p_beg_date and 3/20/2009 11:59:36 PM for p_end_date.
Do you think there is anyway to get the seconds to be 00 for p_beg_date and 59 for p_end_date?
Also, the concurrent program parameters are actually FND_STANDARD_DATETIME, not FND_STANDARD_DATE as I thought earlier.
Thanks,
Janel -
Default Date Parameters for SSRS Subscription
I have a SSRS 2008 R2 report running on a Sharepoint 2010 site.
It has two date parameters (Beginning and Ending Date).
The defaults of these dates are calculated correctly when running interactively.
For example:
=DateAdd("d",-28, Today)
=DateAdd("d",-1, Today)
However, when you create a subscription the defaults are based on when the report is submitted and not when the report is executed.
Is there anyway to set a subscription to pull the default parameters every time when executed.
Thanks in advance.Hi miguelh,
Based on my research, if we specified the report parameters with “Use Report Default Value” is checked in the subscription, we could get the report from this subscription with the default value. The default values are based on the expression when the subscription
is executed, rather than the time when we create the subscription. If today is 7/21/2014, the Beginning Date is 6/23/2014, Ending Date is 7/20/2014.
So, please double check you have typed the expressions as the default values in the two date parameters and we have select the “Use Report Default Value” as the parameter values when creating the subscription .
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
How to get Current Quarter and Fiscal Quarter for a Date - Fiscal Year starts from 1st April
Hi,
I need to calculate current quarter and fiscal quarter in my Sql query.
I have a column for DateTime Datatype.
I need to find out Current Quarter Name like Q12012, Q22012, Q32012, Q42012 and Fiscal Quarter Name as well.
Now Fiacal Year starts from 1st April, and Current Quarter starts from 1st Jan.
For Current Quarter of 2012
Jan-Mar = Q12012
Apr-Jun = Q22012
Jul-Sep = Q32012
Oct-Dec = Q42012
For Fiscal Quarter of 2012 ( starts from 1st Apr, 2011 )
Apr2011-Jun2011 = Q12012
Jul2011-Sep2011 = Q22012
Oct2011-Dec2011 = Q32012
Jan2011-Mar2012 = Q42012
means if its 1st April, 2012,
its a new Fiacal Year 2013 so Fiacal Quarter Name should be Q12013
and its Current Quarter Name should be Q22012
Can you help me to calculate this in a select query for given dates?
Thanks in advance,
NiravThis should do it..
Select
FORMAT(datepart(quarter,getdate()),'Q#')+FORMAT(getdate(),'yyyy') -
How to set date field in custom form to default to {NOW} plus one year.
I am developing a subscription site. I have the custom form for inputing a users information. I have the subscribe date set up as a default field of {NOW} that works great.
Now I need the renewal field to default to exactly one year from the subscribe date.
Any help would definitely be appreciated.
thanks in advancePHP? http://us2.php.net/manual/en/function.date-modify.php
Alec Fehl, MCSE, A+, ACE, ACI
Adobe Community Expert
AUTHOR:
Microsoft Office 2007 PowerPoint: Comprehensive Course (Labyrinth
Publications)
Welcome to Web Design and HTML (Labyrinth Publications)
CO-AUTHOR:
Microsoft Office 2007: Essentials (Labyrinth Publications)
Computer Concepts and Vista (Labyrinth Publications)
Mike Meyers' A+ Guide to Managing and Troubleshooting PCs (McGraw-Hill)
Internet Systems and Applications (EMC Paradigm) -
How to set system date as a default value in UIX/XML page?
Example: We set default values using following statements:
<set property="inputValue" target="${bindings.PoNumber}" value="${'1234'}"/>
<set property="inputValue" target="${bindings.UserName}" value="${param.MyParam1}"/>
In JDeveloper Help, we cannot find a way to set a Date attribute's default value to today's (system) date. Any suggestions?
Also, does anyone have a reccomendation on a good book for uix/xml?
Thanks, Ali.bump
Maybe you are looking for
-
ID CS4 spelling checker anomalies
Hi all, I wonder if anyone can shed any light on this? I'm trying to spelling-check a long text document in ID CS4. It's essentially a simple document -- all text, with some paragraph styles applied for formatting chapter headings, but nothing compl
-
US purchased extreme in Europe?
Just bought Airport Extreme and while using the AirPort Utility to set it up noticed that countries listed are exclusively American ones. This got me a bit worried about the settings of these devices, is their something that will prevent use of US pu
-
I have someone elses credit card information on my account.
I was trying to purchase a song on my iTunes account. I logged in and was asked to verify my billing information. In my account I had someone elses credit card number, expiration date, name, address and phone number. I emailed iTunes support 24 hours
-
How do I change the user color in a subscribed ical?
I subscibed to the same ical, but different calendars for my 2 son's sports practices and games.(Same rink, but they are different teams.) Because the calendar is not in their color, it's very confusing to me since I use my ical 98% of the time for
-
Google fonts all but unreadable in Safari
I just downloaded the latest version of Safari and happen to notice that the Google font I am using for my website--"Exo"--is completely unreadable in paragraph form. Is this intentional on the part of Apple? It looks fine in every other browser and