Date Range and Format
Post Author: cht104
CA Forum: Formula
I'm new to Crystal Reports so please bear with me. I know this is easy and I'm just overlooking something obvious. I've got my report formatted and working except for the getting the date range or prompt to work and the format of the date itself. In my db, I"ve got a business_date field. I've got that showing line by line in the report as yyyymmdd, but would like to be formatted as "Sept 11, 2007" if possible. Also, for the date range, do I create a new formula or a new parameter field? How exactly is that written out? What other fields do I need to make this work?
Thanks
Post Author: cht104
CA Forum: Formula
{svc_at_dtl.svan} in ["6036281297496447218", "6036281364474453041", "6036281475774461110", "6036282939574448316", "6036283115974448365", "6036283168796454200", "6036283395374462621", "6036283428674464130", "6036283753674445017", "6036283917774448418", "6036284153974449933", "6036284173996439566", "6036284257574445663", "6036284361474459493", "6036284371896470723", "6036284564874451909", "6036284758774459807", "6036284826974450872", "6036285282174468325", "6036285293874448033", "6036285529874453024", "6036285878174449855", "6036285999874448376", "6036286146296452491", "6036286186574458053", "6036286295596460760", "6036286335874446410", "6036286646674450703", "6036286674874445497", "6036286684874459826", "6036286879696436611", "6036286931974449860", "6036287191974445657", "6036287211774459063", "6036287254874446061", "6036287383874459108", "6036287395174475302", "6036287623696439776", "6036287911274449966", "6036287957774450009", "6036287972296473818", "6036289199196440994", "6036289336796478839", "6036289461796466359", "6036289792974471912", "6036289991196439695", "6275291111939468538", "6275291157455722999", "6275291342555724487", "6275291349939479559", "6275291437655724303", "6275291762455755275", "6275291867155724609", "6275291881655723946", "6275291886155724011", "6275292136155723957", "6275292195855724215", "6275292343855800229", "6275292363155724577", "6275292365155724637", "6275292431555731180", "6275292566755724381", "6275292632355723225", "6275292782455724172", "6275292851255723933", "6275292878655723921", "6275292953555723341", "6275293164155723919", "6275293169955723998", "6275293186455724649", "6275293318855723908", "6275293356655724478", "6275293373655724684", "6275293393739479064", "6275293553155724455", "6275293563655724004", "6275293586555778116", "6275293685955724201", "6275293757339475631", "6275293831955724141", "6275293834955730584", "6275293839562464447", "6275293884455723803", "6275293891639475878", "6275294142955724627", "6275294225939469203", "6275294244755724273", "6275294288755724162", "6275294326839466482", "6275294372355724667", "6275294446455724442", "6275294544655723239", "6275294595362458066", "6275294789855747474", "6275294965255727665", "6275295235155724432", "6275295284562503051", "6275295464555724584", "6275295543955724533", "6275295627755723584", "6275295787355723841", "6275295794955723386", "6275295812555723983", "6275295843555791857", "6275295862755722759", "6275295886755724259", "6275295914155723433", "6275295926255723304", "6275296134855724618", "6275296221455724401", "6275296317755723398", "6275296367355723312", "6275296369339471746", "6275296395339476301", "6275296663855724390", "6275296685255723246", "6275296714755724469", "6275296726455767720", "6275296746555724281", "6275296765355724086", "6275296772362502797", "6275296786862497240", "6275296997255724379", "6275297253355723475", "6275297266655724182", "6275297333955724555", "6275297497155723555", "6275297524455723179", "6275297573255724675", "6275297577455724220", "6275297741455812692", "6275297792755724410", "6275297869455724110", "6275297869455724110", "6275297899755723655", "6275297937155723570", "6275298123755730444", "6275298141555724499", "6275298269755791964", "6275298321455723972", "6275298361655724339", "6275298483355724658", "6275298658455722739", "6275298713155724108", "6275298747639512868", "6275298786555723464", "6275298854355724511", "6275298949755724320", "6275298993755724244", "6275299172655724547", "6275299224655724095", "6275299261439479425", "6275299271562505976", "6275299287155767711", "6275299417555724234", "6275299445555724363", "6275299463755727679", "6275299497755724052", "6275299561855724508", "6275299721255723338", "6275299743555724319", "6275299745855724293", "6275299755255769069", "6275299792555723668"]anddate(tonumber({svc_at_dtl.business_date}[1 to 4]), tonumber({svc_at_dtl.business_date}[5 to 6]), tonumber({svc_at_dtl.business_date}[7 to 8])) in {?date_range}
I dont' know if my problem is with the "and", running 2 different things in here or just the date prompt. Without the date prompt, I get my number information correctly
Similar Messages
-
Moving multiple files by date range and/or file name filtered
I need to move multiple files by date range and/or by filename (using a filter) to another directory.
OR
How can I get the attributes of files in a directory, something you would see when typing in "dir" in a DOS or ls in UNIX. I can parse this info and then make a array of files to move.
The reason for needing this is that I need to move files that are located in another country, and sort them into different directories based on date. Having to read each file for it's file information adds wasted time that I can't afford. I am about to create a dos terminal to do a "dir" command to get the information and parse it out.. but I was hoping LV had a function that can get me that info so I don't have build it.
THanks.You should use the 'File/Directory Info' functionality.
This will return the last modificatoin of the file.
Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be! -
Mailbox Export - Filtered for Date Range and Body Content
I have been pulling my hair out with this one and hopefully someone can help.
I need to search a mailbox and export all (sent & received) messages that fit in a date range and also have a specific word in the body. The query I am using doesn't seem to find the term at all, but the messages it does find fit within my date range,
so part of it seems to work. The request was to not use wildcards too, only looking for the specific word in the body. Here is my one-liner...
New-MailboxExportRequest -ContentFilter {(Body -like "Something") -and (Received -gt "07/01/2012") -and (Received -lt "07/31/2012") -or (Sent -gt "07/01/2012") -and (Sent -lt "07/31/2012")} -Mailbox "SearchMailbox"
-Name "Label1" -FilePath \\server\temp\pst\Export.pst
I've also tried to search for a common word like "the" just to make sure it wasn't a case of the term simply not being in mailbox. No dice.Hi,
Agree with Nickeyclayton, you can use (body -like "*something*") instead of (body -like "something").
I recommend you refer to the following article:
Filterable Properties for the -ContentFilter Parameter
Property
Description
Values
Example syntax
Body
This property returns messages that have the specified string within the message body.
String
Wildcard
-ContentFilter {Body -like "*prospectus*"}
Hope this helps!
Thanks.
Niko Cheng
TechNet Community Support -
Dear all,
I am very new to Sharepoint designer 2010. Its better to say, i am just stepping in.
I have sharepoint site which is accessible for all the users to update few information. But i want this site not to be accessible during a date range, say from 15th to 20th of every month.
I am planning to have something like this: If any user tries to access this sharepoint site between 15th to 20th date range of everymonth, then the browser must show an pop-up alert saying "This site is not accessible during this date range" and Redirect
this sharepoint site to someother site (Say http:// somesitename.xx.com) immidiately.
I know very little about how to add Javascript in sharepoint webpart.
Please provide the Javascript or any best alternate solution to my concern.
Thanks in advance.Hi,
From your description, my understanding is that you want to redirect sharepoint site to another site between 15th and 20th every month.
I agree with what Sudip says. If you still want to use JS code,You could try these steps
below:
Open your site with SharePoint Designer.
Click Master Pages in left navigation.
Find file v4.master, and backup it(it is very important).
Right click your v4.master,
choose "Edit File in Adavance Mode".
Add the code below into the <head/> tag.
<script src="https://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script><script
type="text/javascript">
$(document).ready(function(){
var today = new Date();
var day = today.getDate(); // get current day
var id = _spPageContextInfo.userid; // get the id of current logon in user
var boolFlg = false;
$.ajax({
url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/SiteGroups/GetByName(\'"+"sharepoint Owners"+"\')/Users", //get users in a specified group can access the sharepoint site from 15th to 20th every
month
type: "GET",
headers: {"accept": "application/json;odata=verbose"},
success: function (data) {
if (data.d.results) {
var src = data.d.results;
for(var i = 0; i < src.length; i++){
if(src[i].userid==id){ //check the logon in user in the specified group or not
boolFlg = false;
break;
if(!boolFlg){
if(day <= 20 && day >=15){
alert("This site is not accessible during this date range"); // alert the message
location.href = "http:// somesitename.xx.com"; // redirect to another site
error: function (xhr) {
alert(xhr.status + ': ' + xhr.statusText);
})</script>
Best Regards
Vincent Han
TechNet Community Support -
Line graph date sorting and formatting
Hi Gurus
We've recently upgraded to 11.1.1.7 and noticed that our Publisher line charts with date on the x-axis are no longer sorting correctly i.e. May comes before March. The reason for this is because in <11.1.1.7 we have a formatted date mask (to_char) in our data model but sorted by the underlying canonical date which worked. Now in 11.1.1.7 it is no longer sorting by the data model sort but by the formatted date string therefore numeric values of 30 April sorted after 1 May.
We have tried a number of options to resolve:
1. using the canonical date and sorting on that corrects the sort problem but the default formatting used in long YYYY-MM-DDT00:00:00-00:00 and not readable as our chart is showing daily totals. Changing to time-series chart can allow you to format the date but see problem 2 next...
2. Time series = yes doesn't display the chart if we have a number of entities in our series i.e. multiple lines and the interactive viewer shows a red error icon. I think this may be due to the fact that our date range is not continuous ie we have a sparse data set.
3. Workaround we used was a bar chart (our users preference is line charts) with time series = false but the date format is still long.
Any advice / suggestions would be helpful.
Thanks
Nick.for #1: numbers does what is called a "stable" sort. Meaning that the previous sort order is preserved. i.e. do your sort in reverse order. Amount, then name, then date. Just did it with sample data and it was perfect. It keeps them in the original order, so if there is a match in name after you sort, you should see the amount still in the proper order.
#2: What in your formula isnt working? I just made a formula that did math on the columns to the left, sorted and it worked. Sorted by static data columns and the formula column. I know it was broken originally, years ago, but it seems to be working correctly now, at least in my quick test. You might have an issue if you are using formulas that refer to data on other rows or tables.
#3: yeah formatting can be a pain. But it is easier to do in the desktop program. No, you cannot get it for windows, sorry. If the formatting the only thing you need to do on the desktop side, then i dont see much tying you to it. I do 90% or more on the ipad and iphone now.
Jason -
Defining Date range and using the same range to search the documents.
Hi Sap Gurus,
in our business there are some documents which do have Validity period, like say Inspection certificates and valid for say 10 months, ex.. JAN 25th 2009 to Oct 24th 2009
we store this certificate in DMS and link to some SAP object say an Asset,
we have a requirement to list all the documents based on the expiry date range. say to get a list of documents which are about to expire in 15 days, or the list of documents which have already expired
I tried to define a characteristic in date format, but it is a single value field, and search is only supported on that specific value only.
like we cannot serch the DIR falling in between this Date Ranges.
also report of Documents which are to expire in 15 days could not be got.
is there a way to meet this requirement , if it is through a development also please tell me how the logic could be built
Thanks and regards
Priya SHi SAP Gurus,
Thanks much Thomas for your Promt reply.
The solution provided by Thomas really works but the same thing is not possible in EDMS,
in Easy DMS we cannot manually give any value in the date characteristics field, the system will ask to fill from the date window format.
so we cannot enter < or > <> value in characteristics, hope there is any note or other procedure to get the same funtionality.
please if any one worked on the same with EDMS let me know
Thanks and kind regards
Priya S -
Support date range and as of date in Universe
Hi,
I have some questions on Universe design best practices. Can you please help ?
We are using BO4 SP7 and UDT for universe design.
Little bit on our schema: snow flake schema with multiple fact tables. Most of our table are 'Pure Type 6' dimension tables in which start date and end date are used to track historical data. We also have date dimension table. We want to support both 'As of date' and custom 'date range' type reporting.
Out typical use cases are like
1. All items As of date
2. All items between dates etc.
How can we model it in the Universe ?
1. We can not join every dimension with date_d dimension. So we have decided to put default conditions at Folder level. Our typical date conditions as below.
date_d.end_full_date_utc between diminetion1_d.start_date AND diminetion1_d.end_date
But problem is, table condition are not always applied. If we have A, B and C folders and if I create report by using objects from A and C then non of the condition applied to B appears in the query. This is problem for us.
2. Other approach we thought is to define start and end prompt and define a restriction condition for each and every table.
diminetion1_d.start_date > [start_date_prompt] AND diminetion1_d.end_date < [end_date_prompt]
We thought it will be too munch work as we have more than 150 tables and also 2 prompts will always appear, even of as of date, which may not look good.
3. Is there a way apply to apply these date conditions at the individual table level so that they will appear in Query when ever the table is involved in the join path ?
3. What is the best way to handle this kind of requirements, please suggest ?
ThanksHi,
I have some questions on Universe design best practices. Can you please help ?
We are using BO4 SP7 and UDT for universe design.
Little bit on our schema: snow flake schema with multiple fact tables. Most of our table are 'Pure Type 6' dimension tables in which start date and end date are used to track historical data. We also have date dimension table. We want to support both 'As of date' and custom 'date range' type reporting.
Out typical use cases are like
1. All items As of date
2. All items between dates etc.
How can we model it in the Universe ?
1. We can not join every dimension with date_d dimension. So we have decided to put default conditions at Folder level. Our typical date conditions as below.
date_d.end_full_date_utc between diminetion1_d.start_date AND diminetion1_d.end_date
But problem is, table condition are not always applied. If we have A, B and C folders and if I create report by using objects from A and C then non of the condition applied to B appears in the query. This is problem for us.
2. Other approach we thought is to define start and end prompt and define a restriction condition for each and every table.
diminetion1_d.start_date > [start_date_prompt] AND diminetion1_d.end_date < [end_date_prompt]
We thought it will be too munch work as we have more than 150 tables and also 2 prompts will always appear, even of as of date, which may not look good.
3. Is there a way apply to apply these date conditions at the individual table level so that they will appear in Query when ever the table is involved in the join path ?
3. What is the best way to handle this kind of requirements, please suggest ?
Thanks -
01.01.0000 date parse and format
Could somebody explain is wrong here?
SimpleDateFormat frm = new SimpleDateFormat("yyyyMMddHHmmss"); // formatter
frm.setTimeZone(TimeZone.getTimeZone("UTC")); // UTC time zone
// --- No problem for the next code ---
String inDate = "19700101000000"; // 01.01.1970 input date
long stamp;
try {
stamp = frm.parse(inDate).getTime(); // input date in long
} catch (ParseException ex) {
System.out.println("Interruption");
stamp = 0;
String outDate = frm.format(stamp); // output date
System.out.println("inDate=>" + inDate + "_longDate=>" + stamp + "_outDate=>" + outDate);
// --- No idea why next code is working wrongly ---
inDate = "00000101000000"; // 01.01.0000 input date
try {
stamp = frm.parse(inDate).getTime(); // input date in long
} catch (ParseException ex) {
System.out.println("Interruption");
stamp = 0;
outDate = frm.format(stamp); // output date
System.out.println("inDate=>" + inDate + "_longDate=>" + stamp + "_outDate=>" + outDate);I try to parse and format the time stamp 01.01.0000 00:00:00. On the finish I have 01.01.0001 instead of the correct 01.01.0000
inDate=>19700101000000_longDate=>0_outDate=>19700101000000
inDate=>00000101000000_longDate=>-62167392000000_outDate=>00010101000000You are calling format with a long parameter. The only format that matches that signature that I can see would be Format.format(Object) assuming autoboxing is changing the long to a Long.
Format.format(Object) eventually calls DateFormat.format(Object, StringBuffer, FieldPosition). I have never used this method so I am not sure what it does.
Was your intention to actually call this method?
See the following example:
System.out.println("Test 1: " + frm.format(new Long(0l), new StringBuffer(), new FieldPosition(0)));
System.out.println("Test 2: " + frm.format(new Long(-62167392000000l), new StringBuffer(), new FieldPosition(0)));
Test 1: 19700101000000
Test 2: 00010101000000Edited by: jbish on Apr 26, 2013 12:43 PM
Edited by: jbish on Apr 26, 2013 1:09 PM -
SUMIFS with Date Range and Condition
Hi, I have search in the forums and read the online numbers guide but can't seem to get the formular working in Numbers.
I want to sum up a column of durations, if they are in between 2 dates and meet the condition to belong to one project. I have the following table:
project
total duration
project
start
end
duration
date range start
date range end
one
0
one
02.01.2013
02.01.2013
15:30
01.01.2013
31.01.2013
two
0
one
03.01.2013
03.01.2013
15:30
three
two
04.01.2013
04.01.2013
15:30
four
two
05.01.2013
05.01.2013
15:30
five
three
06.01.2013
06.01.2013
15:30
six
three
07.01.2013
07.01.2013
15:30
seven
three
08.01.2013
08.01.2013
15:30
I have the following formular but it does not give me any value: =SUMIFS(F,C,A5,D"≥"$G$2,E"≤"$H$2)
What am I doing wrong
Thank you for your help.Hi Barry,
thank you very much for your detailed reply.
The first difference I spot is that my duration is in hours:minutes 00:00 but this should not make a difference, right? I attach you here some sample data:
Project
Start date
Start time
End date
End time
Duration
Project 1
07.01.2013
11:00
07.01.2013
11:42
00:42
PINC: 1
07.01.2013
16:11
07.01.2013
17:11
01:00
Theatro
07.01.2013
19:50
07.01.2013
19:54
00:03
Project 3
08.01.2013
11:19
08.01.2013
13:30
02:11
Project 1
09.01.2013
12:32
09.01.2013
13:02
00:30
PINC: 1
09.01.2013
17:55
09.01.2013
18:29
00:34
Project 3
09.01.2013
18:29
09.01.2013
19:36
01:06
And I will go through my formular again and check if everything is correct.
Many greets, Andreas -
Find intersections in date ranges and concatenate aggregated labels
Hello All,
The original source of data will be a table of persons with their member ship:
Description StartDate EndDate
18 Smith John Poker Club 01/01/2009 NULL
18 Smith John Library 05/01/2009 18/01/2009
18 Smith John Gym 10/01/2009 28/01/2009
26 Adams Jane Pilates 03/01/2009 16/02/2009
The challenge will be to find each intersection of membership date ranges for each person and produce for this each unique range:
a new line with the StartDate and EndDate of the range
Concatenate in the description the descriptions of the memberships for this range with:
“/” as separator
order by membership StartDate
This is the table of results expected:
18 Smith John Poker Club 01/01/2009 04/01/2009
18 Smith John Poker Club / Library 05/01/2009 09/01/2009
18 Smith John Poker Club / Library / Gym 10/01/2009 18/01/2009
18 Smith John Poker Club / Gym 19/01/2009 28/01/2009
18 Smith John Poker Club 29/01/2009 NULL
26 Adams Jane Pilates 03/01/2009 16/02/2009
Sample Script:
SET DATEFORMAT dmy
DECLARE @Membership TABLE (
PersonID int,
Surname nvarchar(16),
FirstName nvarchar(16),
Description nvarchar(16),
StartDate datetime,
EndDate datetime)
INSERT INTO @Membership VALUES (18, 'Smith', 'John',
'Poker Club', '01/01/2009', NULL)
INSERT INTO @Membership VALUES (18, 'Smith', 'John',
'Library', '05/01/2009', '18/01/2009')
INSERT INTO @Membership VALUES (18, 'Smith', 'John',
'Gym', '10/01/2009', '28/01/2009')
INSERT INTO @Membership VALUES (26, 'Adams', 'Jane',
'Pilates', '03/01/2009', '16/02/2009')
Note:Make sure that your solution uses a single query that starts either with "SELECT" or "WITH" or ";WITH".
Can you please share suggestions.
Regards,
VaishuThis query
;WITH RS AS -- RangeStart
SELECT PersonID, StartDate AS RangeStart
FROM @Membership
UNION
SELECT PersonID, DATEADD(day, 1, EndDate) AS RangeStart
FROM @Membership
WHERE EndDate IS NOT NULL
RE AS -- RangeEnd
SELECT PersonID, DATEADD(day, -1, StartDate) AS RangeEnd
FROM @Membership
WHERE StartDate IS NOT NULL
UNION
SELECT PersonID, EndDate AS RangeEnd
FROM
@Membership
R AS -- Ranges
SELECT RS.PersonID, RS.RangeStart, RE.RangeEnd
FROM
RS CROSS APPLY
SELECT TOP (1) RE.RangeEnd
FROM RE
WHERE
RE.PersonID = RS.PersonID
AND (
RE.RangeEnd >= RS.RangeStart
OR RS.RangeStart IS NOT NULL AND RE.RangeEnd IS NULL
ORDER BY
ISNULL(RE.RangeEnd, '99991231')
) RE
SELECT R.*,
STUFF( (
SELECT '/' + m.Description
FROM
@Membership m
WHERE
m.PersonID = R.PersonID
AND (m.StartDate <= R.RangeEnd OR R.RangeEnd IS NULL) AND (m.EndDate >= R.RangeStart OR m.EndDate IS NULL)
FOR XML PATH('')
1, 1, '') AS Description
FROM
R
Returns this result:
PersonID
RangeStart
RangeEnd
Description
18
2009-01-01
2009-01-04
Poker Club
18
2009-01-05
2009-01-09
Poker Club/Library
18
2009-01-10
2009-01-18
Poker Club/Library/Gym
18
2009-01-19
2009-01-28
Poker Club/Gym
18
2009-01-29
NULL
Poker Club
26
2009-01-03
2009-02-16
Pilates
EntityLite: A Lightweight, Database First, Micro ORM -
Restrict Query Data based on Date range and Users
Hi All,
I have a few web reports that I need do restrict data based on Users.
In all the queries i have an infoobject 0CALDAY, and a User Entry range variable on it. Because of performance issues I need to restrict the range of dates a User can see. Typically most of users could go to a max date range of 1 month back. But some others would need the ability to see data for much bigger range of dates.
Pls suggest how should i go about with this. Should I have to enforce this at Variable level(user exit).... but then i might have to maintain a table for the users.. Is there any other way of doing it.
thanks
RajAny thoughts ?
-
Difficulty working with overlapping date ranges and sums
I have data like the following and need help querying it for a specific result:
startdate enddate place class number
03-30-2006 04-18-2006 A 22 2000
04-01-2006 04-30-2006 A 22 6000
03-30-2006 04-15-2006 B 11 1700
03-15-2006 04-12-2006 B 11 2900
I'd like to return the sum of the averages for any given day, by place, and by class, like this:
day place class average
03-15-2006 B 11 100
03-16-2006 B 11 100
03-30-2006 A 22 100
03-30-2006 B 11 200
03-31-2006 A 22 100
03-31-2006 B 11 200
04-1-2006 A 22 300
04-01-2006 B 11 200
04-30-2006 A 11 200
I'm stuck, any help would be GREATLY appreciated.307b218a-cebe-46f1-87b6-946b4076ce79 wrote:
Here is what I said in my original post:
I'd like to return the sum of the averages for any given day, by place, and by class.....Then gave an example of output.
I think that sentence describes the relations perfectly succinctly.
How can it, when there's no SUM involved
307b218a-cebe-46f1-87b6-946b4076ce79 wrote:
For the date of 3-30-2006, the sum of the averages for region A in class 22 is 100, since from 3-30-2006 to 4-18-2006 is 20 days, and 2000/20 = 100, and there are no other class 22's in place A in that date range. Same goes for 3-31-20006.
However for 4-1-2006 the sum of the averages is 300, since I have one record who's average is 100 (2000/20), and another (6000/30 = 200) and 200 + 100 = 300.
For 4/30, I have one average in that range for place A class 22, and its average for that period is 200.
Does that help?
Much better, thank-you ..
try this:
WITH data AS (
SELECT TO_DATE('03-30-2006','mm-dd-yyyy') startdate, TO_DATE('04-18-2006','mm-dd-yyyy') enddate, 'A' place, 22 class, 2000 cnumber FROM DUAL UNION ALL
SELECT TO_DATE('04-01-2006','mm-dd-yyyy') startdate, TO_DATE('04-30-2006','mm-dd-yyyy') enddate, 'A' place, 22 class, 6000 cnumber FROM DUAL UNION ALL
SELECT TO_DATE('03-30-2006','mm-dd-yyyy') startdate, TO_DATE('04-15-2006','mm-dd-yyyy') enddate, 'B' place, 11 class, 1700 cnumber FROM DUAL UNION ALL
SELECT TO_DATE('03-15-2006','mm-dd-yyyy') startdate, TO_DATE('04-12-2006','mm-dd-yyyy') enddate, 'B' place, 11 class, 2900 cnumber FROM DUAL ),
data2 AS ( SELECT startdate, enddate, enddate-startdate+1 numdays, place, class, cnumber
FROM data d
SELECT startdate+x.lvl day, place, class, cnumber/numdays avg
FROM data2 d,
( SELECT level lvl FROM dual CONNECT BY level <= 10000 ) x
WHERE x.lvl <= numdays
ORDER BY d.startdate, x.lvl
It helps to be specific and detailed -
Find totals of a date range and sum
How do I find totals between a date range like from 0 up to 60 days from today, 61 to 90 days from today, 91-120 days, 120 and above. Please advise.
Do I use a Add_Months function to convert to days?Try this,
This may help you
SQL> select sysdate,sysdate+interval '60' day from dual;
SYSDATE SYSDATE+INTERVAL'60'DAY
5/5/2008 2: 7/4/2008 2:17:16 PM
SQL>G. -
Generate a report with date range and year as POV with Hyp Planning ?
Hi everybody,
I am starting with hyp planning and i need your help please.
I have to create some forms. In those forms, the final user is supposed to be able to display data in the forms between 2 dates and for a specific year.
My first problem : I don't know how you can display data in a form between 2 dates and for one specific year. I just have one dimension YEAR and one PERIOD, so if i selected them as a PAGE, the final user will just be able to choose the month and the year for his form ... and not displaying data between 2 dates.
My second problem is with the dimensions YEAR, SCENARIO and VERSION. I don't want to put the dimensions VERSION and SCENARIO as PAGE (it easier for the final user to just choose a year than to choose a year, scenario, and version) but as POV with a relationship with the dimension YEAR (because if the user chooses YEAR = actual_year (2012) the VERSION and the SCENARIO won't be the same than if the user chooses YEAR= last_year). IF YEAR = next_year, VERSION=Propuesta, SCENARIO=Forecast
IF YEAR = actual_year, VERSION=Propuesta, SCENARIO=Forecast AC
IF YEAR = last_year, VERSION=Actual, SCENARIA=Real
How can i do that?
Thank you for your help
Edited by: 932573 on May 7, 2012 3:44 PM
Edited by: 932573 on May 7, 2012 4:27 PMI am not sure if you are using RAS or Enterprise SDK, but here are some code snippets to set range report parameters:
For scheduling:
// oReport is IReport object holding the crystal report.
oReportParameter = oReport.getReportParameters().get(i);
currentRangeValue = oReportParameter.getCurrentValues().addRangeValue();
currentRangeValue.getFromValue().setValue(dateParameter);
currentRangeValue.getToValue().setValue(dateParameter);
For viewing:
ParameterFieldRangeValue pfrv = new ParameterFieldRangeValue();
pfrv.setBeginValue(dateTimeValue);
pfrv.setEndValue(dateTimeValue1);
pfrv.setLowerBoundType(RangeValueBoundType.inclusive);
pfrv.setUpperBoundType(RangeValueBoundType.inclusive);
pf.getCurrentValues().add(pfrv);
f.add(pf);
f is Fields object and pass that to viewer. -
Best Data rate and format for Big Screen Playback
I am a video producer supplying content for a tradeshow display consisting of 18 flat screens oriented vertically, 8 over 8. Very heavy duty Windows playback machine, with 3 graphics cards, 1 for each set of 6 monitors. The total pixel size is 3240x 1280 px. We have produced a number of full screen and smaller movies that the interactive programmer is trying to intergrate into a Flash program where some videos will play full screen, and others in smaller windows (those were produced in 1920x1080). All videos were mastered at the specified pixel count, square pixels, progressive, and output in Pro Res 422, 44.1K audio. Flash is being used to create the interface, and I am transcoding to .F4V at lower bit rates like 4, 6, and 9 Mbps. They are having trouble playing these movies back smoothly. We have done similar projects in the past with Director without issue. Of course they are blaming the video, I am offering to encode in any format at any data rate they suggest. Can anyone suggest a direction here?
Are you trying to burn a standard DVD or are you trying to put a QuickTime .mov file on DVD media?
A standard DVD doesn't worry about file size (only the duration).
A "data" DVD is limited to the type of media used. A single layer DVD is about 3.7 GB's.
In order to make a data DVD you need to keep the data rate low enough to not exceed the DVD media playback abilities. They can't handle the higher rates found in many of the preset options.
You can avoid all of these headaches by telling the viewer to "copy" the .mov file from the DVD to their Desktop. Then nearly any of the presets option will work.
H.264 is a great video codec and the "automatic" preset should work just fine. Use "multi-pass" for best quality (takes a very long time). Remove the check mark for "Audio" since your file has none. Leave it checked and you waste file size because a silent audio track would be added.
Maybe you are looking for
-
Multiple Datasource creation in Production system
We are facing connection pool issues from middleware, is it suggestable to create multiple datasources with same connection
-
Hi all, With Sun Studio 10 we get "arguments out of order error" which we don't get with any other comiler or Sun Studio 11. The error is as below: "/build/builds/bczar/Studio/ACE_wrappers/TAO/tao/BD_String_Argument_T.inl", line 14: Error: Arguments
-
Save Illustrator PDF for unknown usage
Does anyone have any thoughts/recommendations for how to best save an Illustrator file as a PDF when the end use of the PDF is unknown? Here's the context: I'm designing a logo in for a client who is not currently working with any specific printer an
-
Size limitation for system-jazn.xml
Hi helping hands, In sytem-jazn-data.xml and users-properties.xml , I want to include 1 lakh users. When I tried 1 lakh users,the bpel engine is not getting restarted. However I tried with 50k list of users, it works very fine. Is there any file size
-
Grading SCORM content on SharePoint with SLK (SharePoint Learning Kit)
Hi everyone, My name is Kevin and I am currently working in a company to develop E-Learning materials to help train new hires. I am using Articulate Storyline to make quiz content and uploading the content to SharePoint with the SharePoint Learning K