Group by date and print for every week

Crystal defaults to using Sunday-Saturday as its weekly breakdown when grouping.  I need to group by week but need to show a Monday-Saturday week.  Any help will be appreciated.
Thanks,
John

I figured it out. I grouped on a formula containing:
datediff("ww",date(year(currentdate),1,1),{PR_GLDET.Pay_Date},crMonday)

Similar Messages

  • Continuation: need data grouped for every week

    SELECT * FROM aetnah_file_emp_cust_hist
    WHERE pctl_employee_seqnum= 133774This query returns too many rows.
    Now my requirement is that I need to get the most recent contrib_amt from this table for every week based on date column CTL_INS_DTTM.
    This column CTL_INS_DTTM stores data about when a row wass inserted into this table.
    pctl_employee_seqnum CTL_INS_DTTM(MM/DD/YYYY) contrib_amt
    133774 01/01/2009 100
    133774 01/02/2009 200
    133774 01/03/2009 300
    133774 01/04/2009 400
    133774 01/05/2009 500
    133774 01/06/2009
    133774 01/07/2009 700
    133774 01/08/2009 800
    133774 01/10/2009 900
    133774 01/12/2009 1000
    133774 01/13/2009 1100
    133774 01/14/2009 1200
    I will need 52 columns (1 year = 52 weeks) totally and the most recent data for each week.
    Ex:
    Desired output:
    01/07/2009 01/14/2009 01/21/2009 01/28/2009
    700 1200 NULL 200
    SELECT pctl_employee_seqnum, CTL_INS_DTTM, contrib_amt
      FROM (
              SELECT pctl_employee_seqnum, CTL_INS_DTTM, contrib_amt, ROW_NUMBER() OVER(PARTITION BY TO_CHAR(CTL_INS_DTTM, 'WMONYYYY')ORDER BY CTL_INS_DTTM DESC) RNO
                FROM aetnah_file_emp_cust_hist
               WHERE pctl_employee_seqnum= 133774
    WHERE rno = 1This code above is doing that but I need to transpose this row wise data into column wise as mentioned on Desired output.
    Total # of columns:52
    Apologize for opening a new thread.....please help on this transpose issue
    Thank You All

    Hi,
    TO_CHAR (ctl_ins_dttm, 'WMONYYYY') will result in 59 or 60 groups per year, since all months (except February in common years) have (incomplete) 5th weeks.
    If you want 52 equal-sized groups, then TO_CHAR (ctl_ins_dttm, 'WWYYYY') will get you closer. (You'll still have an incomplete week 53.)
    To pivot those rows into one column, you can do something like:
    SELECT  MAX (CASE WHEN TO_CHAR (ctl_ins_dttm, 'WW') = '01' THEN contrib_amt END)   AS week_01
    ,       MAX (CASE WHEN TO_CHAR (ctl_ins_dttm, 'WW') = '02' THEN contrib_amt END)   AS week_02
    ,       MAX (CASE WHEN TO_CHAR (ctl_ins_dttm, 'WW') = '03' THEN contrib_amt END)   AS week_03
    ,       ...If you want data (like "01/07/2009") as the columns headers, then you'll have to use dynamic SQL.

  • SCCM 2012 R2 changing date and time for patching software update groups

    I recieve this error when changing date and time for software update group. worked fine yesterday before patches to the server were applied last night. we removed patches but still get error below. Any help would be great.
    ConfigMgr Error Object:
    instance of SMS_ExtendedStatus
    Description = "Property array AssignedCIs exceeded the max allowed";
    ErrorCode = 1078462259;
    File = "e:\\nts_sccm_release\\sms\\siteserver\\sdk_provider\\smsprov\\sspupdatesassignment.cpp";
    Line = 94;
    Operation = "PutInstance";
    ParameterInfo = "";
    ProviderName = "ExtnProv";
    StatusCode = 2147749889;
    Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlQueryException
    The SMS Provider reported an error.
    Stack Trace:
    at Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlResultObject.Put(ReportProgress progressReport)
    at Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlResultObject.Put()
    at Microsoft.ConfigurationManagement.AdminConsole.SmsDialogData.Put(IResultObject resultObject, List`1 resultObjectsPut, Boolean retainLock)
    at Microsoft.ConfigurationManagement.AdminConsole.SmsDialogData.Put(Boolean retainLock)
    at Microsoft.ConfigurationManagement.AdminConsole.DialogFramework.Forms.SmsPropertySheet.Put(ActionTrigger trigger)
    System.Management.ManagementException
    Generic failure
    Stack Trace:
    at Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlResultObject.Put(ReportProgress progressReport)
    at Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlResultObject.Put()
    at Microsoft.ConfigurationManagement.AdminConsole.SmsDialogData.Put(IResultObject resultObject, List`1 resultObjectsPut, Boolean retainLock)
    at Microsoft.ConfigurationManagement.AdminConsole.SmsDialogData.Put(Boolean retainLock)
    at Microsoft.ConfigurationManagement.AdminConsole.DialogFramework.Forms.SmsPropertySheet.Put(ActionTrigger trigger

    no it is the final version... is working today after cleaning up database... is working now...thanks
    Hello Robert,
    would you please give some more informations, as I have the same issue and don't get what you mean bye "cleaning up databases".
    Regards ooGDoo
    ooGDoo

  • Can I use Acrobat 11to download pdf that only allows me to read, enter data, and print?

    I need to complete gov. forms available online as pdf.  I can review, enter data and print, but I cannot save to my computer or anywhere else.  I need to be able to save so I can return to the form and enter information as I access it.  Can this be done if I purchase Acrobat 11 and, if so, can I get the Standard edition?  I currently only have Reader.

    Yes, if you upgrade to at least Acrobat Standard you will be able to save. Since you can't save with Reader (assuming 11), the forms are probably XFA forms (created with LiveCycle Designer), which must be Reader-enabled in order to be saved with Reader. Reader 11 can save non-enabled AcroForms (forms created with Acrobat), but not non-enabled XFA forms. If you have a Reader version prior to 11, try using Reader 11 to see if it will save.
    If you can provide a link to one of the forms, I can tell you for sure what the minimum requirement for saving is.

  • What are the settings for apn data and mms for iphone 4 on straight talk?

    what are the settings for cellular data network APN DATA and MMS for Straighttalk sims on IPhone 4?I cant send or recieve pictures.My service keeps losin signal constantly saying no service then 1 bar,2 bars,3 bars...then back down to no service.It drops calls.Iv been trying to find out the answer to this problem for 2 weeks!I have no Profile selection in my settings either to do wat its showing online on one website.and have entered numerous diffrent APNs and none have worked!!!!PLEASE HELP!!!

    They're asking a question about carrier settings for their iPhone. I think that has everything to do with Apple.
    Maybe they did already ask Straight Talk. I've called Straight Talk before... they're not too helpful.
    You know, this forum would be much friendlier if people in this forum would quit squabbling, & posting comedic replies, not too mention name calling (like I did), when people are just needing some help.
    It's also frustrating that people stick up for the guy who doesn't help, but rather takes the time to post some smart alec reply. Granted, I shouldn't have name-called... some people just frustrate me when they act like that.
    Admittedly, there ARE some grey areas when it comes to carrier questions... but let the moderators do their job when someone is asking innappropriate stuff. And if the mods aren't chiming in, then that's a good indication that what the thread is about IS in fact Apple related.

  • How to remove unnecessary data and print only the required data in JSP

    Hi all
    The following output is from TCP/IP connection of RFID Reader.
    Connected to: /192.168.0.3
    EVT:DCE DCEVERSION 3.2.0.0
    EVT:DCE READER IM5 RFID Reader Ver 3.29
    EVT:DCE READERINFO Basic Reader Interface Version Q
    EVT:DCE READERINFO FCC 915Mhz
    EVT:DCE READERINFO Copyright (C) 2002-2006 Intermec Technologies Corp.
    EVT:DCE FIXEDATTRIB CHKSUM=OFF
    EVT:DCE FIXEDATTRIB TTY=OFF
    EVT:DCE FIXEDATTRIB ECHO=OFF
    OK>
    EVT:TAG H02000031323334000151E62B 1 1
    EVT:TAG H02000031323334000151B775 1 1
    For my JSP case I have converted above output's program in javabean I want to print only tagID and other values in a table in my JSP page. Could anybody let me know how to ignore the unnecessary data and print only values after EVT:TAG in three columns and rows, besically rows are not fixed because it depends on reader how many tags it detects?
    Thanx
    kvijai

    Hi,
    Try this
    private function doFilter(item:Object):Boolean
         var searchString:String = myTextIp.text.toLowerCase();
         if (item.name.search(searchString) == 0)
         return true;
              else
         return false

  • How to control the data to display for every users?

    Hello Experts,
    Im creating a module in ORACLE forms6i and I want to control all the data to display for every USERs. I have 1 Table and it has 5 columns.
    My module has 5 columns and 5 rows of records to display.
    Problems:
    For USER1, I want to display all DATA in column3 and column4 only and all remaining columns shoud be null.
    For USER2 , I want to dislplay all data in Column1 only and all remaining columns should be null.
    How can i control all the data to display for each columns? Can you help me please. Im using the Clear_Items but its not working only the first row are null but the remaining
    rows has its records.
    Thanks.
    Lala

    I understand that you want certain columns not to show at all on the canvas when a certain user opens the form. Then, in the when-new-form-instance trigger, you should set_item_property(x_item, visible, property_false) for each item you do not want to be dislayed, depending on the user.

  • How can I create a recurring appt/event on calendar on ipad3?  Ex:  12-1pm on Tuesday and Thursday for 2 weeks.

    When I try to create an appointment that occurs for more than a day it appears on my calendar for the entire day and not the time that I want. Example:  create an appointment on Monday, Wednesday and Friday for 12-1pm and goes for two weeks. I just want the appointment to show up on those 3 days for 2 weeks for that hour only. This task was very easy in Outlook but I can't seem to do it on my iPhone or iPad. I should mention that my phone  is a 3GS and the iPad is 3rd generation. Thanks in advance for your help.

    Thanks for responding. I'm an outside sales person and I create the vast majority of my appointments while I'm out of the office. When I'm in the office I certainly create them this way.  It would be great if Apple could make this option available.

  • I'm doing a scan around a line by sampling data 360 degrees for every value of z(z is the position on the line). So, that mean I have a double for-loop where I collect the data. The problem comes when I try to plot the data. How should I do?

    I'm doing a scan around a line by sampling data 360 degrees for every value of z(z is the position on the line). So, that mean I have a double for-loop where I collect the data. The problem comes when I try to plot the data. How should I do?

    Jonas,
    I think what you want is a 3D plot of a cylinder. I have attached an example using a parametric 3D plot.
    You will probably want to duplicate the points for the first theta value to close the cylinder. I'm not sure what properties of the graph can be manipulated to make it easier to see.
    Bruce
    Bruce Ammons
    Ammons Engineering
    Attachments:
    Cylinder_Plot_3D.vi ‏76 KB

  • Reminder app not working correctly, issue started around Sept. 1,2014. Will not allow me to set date and time for a reminder.

    Today I noticed an issue with my Reminder app on my IPhone 5s. Using OS 7.1.2. I called Apple, and the tech didn't know what he was doing and just trying different things.The reminder app will not let me set a date and time for reminder. Finally he escalated the call to a senior advisor who was rude, arrogant and unprofessional. He insisted the Reminder App was updated with the new update of IOS September/October 2013. Not true, the issue just started about 5 days ago August 31,2014. Now there is an additional reminder line for reminder entries that I have to use and have to transfer all my reminders manually from the other part of the app. The feature does exist; if I try to set a date and time for the reminder it appears for 1-2 seconds and then disappears.
    Has anyone else noticed this issue?

    He insisted the Reminder App was updated with the new update of IOS September/October 2013. Not true
    Yes, it is true.
    iOS 7 was released 18 Sep 2013. At this time, the Reminders app was updated (with most everything else).
    the issue just started about 5 days ago August 31,2014.
    Your issue just started but the app was not updated 5 days ago.
    Now there is an additional reminder line for reminder entries that I have to use
    I don’t understand what this means...
    Open Reminders, type the reminder, tap the i at the end, turn on Remind me on a day and enter the date/time.

  • PowerShell Script to get the details Like Scope,Last Deployed date and Name for a Solution Deployed in the Farm.

    Hi Experts,
    I am trying to  build a PowerShell Script to get the details Like Scope,Last Deployed date and Name for a Solution Deployed in the Farm.
    Can anyone advise on this please.
    Regards

    Get-SPSolution|Select Name,Scope,LastOperationResult,LastOperationEndTime|Export-CSV "SPInstalledSolutions.csv" -NoTypeInformation
    SPSolution properties
    Get-SPSolution
    This post is my own opinion and does not necessarily reflect the opinion or view of Slalom.

  • Adjust Date and time for all Photos in an event?

    Would some one tell me how to adjust the date and time for all photos in an event. For some reason when I change the date, it only changes the first photo in the event and I am left with a range of dates in the event, but I would rather they all have the same date in the event. Any thoughts or ideas?

    How are you selecting the photos and changing them? How much of a change are you trying to make? A total change of date and time or just a delta change either plus or minus?
    Using the Photos->Adjust Date and Time... menu option will apply the time/date difference to all of the photos in the Event if you click on the Event icon in the Photos mode or the Event mode.

  • Difference between execution mode of Print preview and Print for Output

    Hello,
    Can anybody tell the difference between execution mode of print preview and print for an output (For eg. PO output or Invoice)?. I am trying to download some documents linked to Purchase order to desktop. The code is written in the same driver program for printing PO and it is executed after smartform function module is called. It works fine in print preview mode and it fails in print mode. The reason why download fails in print mode is that GUI not available (just found from debugging).
    Any ideas?
    Thanks
    Anil

    HI
    try using any other printer and find out if you are getting the correct output. The printer needs to support Multiple Unicode encoding schemes like UTF 8, UTF 16BE, and UTF 16LE, plus special characters and logos, bi-directional text layout, and custom characters..

  • Getting last login dates and times for graphical/xwindows logins?

    Hi,
    How do I get the last login date and times for users who just use the GUI (and don't launch terminals)?
    So far such logins don't seem to show up when I do "last -f /var/adm/utmpx" or for wtmpx.
    What should I be using on solaris to get the last login dates and times for all users, whether they log in on the text console, graphical console, or remotely via ssh etc?
    Thanks,
    Link.

    Hi,
    How do I get the last login date and times for users who just use the GUI (and don't launch terminals)?
    So far such logins don't seem to show up when I do "last -f /var/adm/utmpx" or for wtmpx.
    What should I be using on solaris to get the last login dates and times for all users, whether they log in on the text console, graphical console, or remotely via ssh etc?
    Thanks,
    Link.

  • Unable to Determine the Change Date and Time for records in infotype 2011

    Hi Everyone,
    We need to know on when the clock-in and clock-out records were interfaced to SAP in infotype 2011.
    The change date/time field in infotype 2011 is blank/not populated. Hence, we're unable to determine on when the clock-in records were updated in infotype 2011.
    It is not possible to get the audit logs for infotype 2011 as it is switched off.
    We found this table TEVEN and just the same thing, the field "change on" is blank.
    Kindly help us on how we can determine the change date and time for records in infotype 2011.

    Hi Prasad,
    Here's the scenario.
    On June 3, it was reported that staff's clock-in record on june 1, 7:00AM is missing in infotype 2011.
    However, when I checked infotype 2011, the record is there.
    So, they are now asking me on when this record was updated in infotype 2011 as they are thinking that there might be some delays in sending of the data to SAP.
    The created on and created at in table TEVEN shows the same, june 1, 7:00AM which seems to be not true as on june 3, it was reported to be missing.
    Can you help further on this?

Maybe you are looking for