Help with CF Reports and Dates

Can anyone here help me with
This
post ? I have been waiting for 3 days and after 4 posts no one
has been able to answer, please help!! I'm stuck on my project only
because of this. Thank you very, very much.
Nelson.

Sorry, I don't use cfreport so I would not be any help with
what may be inside the total_sales_report_by_date.cfr template.
However, shouldn't you be executin your query inside of your .cfm
emplate, then passing the query result to your report as a query
parameter within your cfreport tag, rather than passing the date
parameters in cfreportparam tags?
Phil

Similar Messages

  • Help with SQL Query and dates

    I am trying to return results between a year or 365 days. I need to run this at any time and return a year prior. I'm not getting any results? Any help? THX!
    SELECT
    NAME.ID,
    Activity.UF_2,
    Name.FIRST_NAME,
    Name.LAST_NAME,
    Name.EMAIL,
    Activity.TRANSACTION_DATE
    FROM
    Activity INNER
    JOIN Name
    ON Activity.ID
    = Name.ID
    Where
    activity.TRANSACTION_DATE
    BETWEEN
    CAST(CAST(DATEADD(DAY,
    -365,
    GETDATE())
    AS
    DATE)
    AS
    DATETIME)
    AND
    DATEADD
    (SECOND,
    -1,
    DATEADD(DAY,
    1,
    CAST(CAST(DATEADD(DAY,
    -365,
    GETDATE())
    AS
    DATE)
    AS
    DATETIME)))
    and Activity.UF_1
    =
    'a'
    and Activity.UF_2
    =
    'NAT'

    Where activity.TRANSACTION_DATE >= DATEADD(YEAR, -1, GETDATE()) AND activity.TRANSACTION_DATE < GETDATE()

  • Help with LAG () OVER () and dates

    I have the following query right now
      SELECT "DATE",
              "CELL_SITE",
              "LASTV_ATTCNT",
              "LASTV_ATTCNT2",
              "LASTV_BLKCNT",
              "LASTV_DRPCNT",
              "V_ATT_CNT",
              "V_CUST_BLK_CNT",
              "V_DRP_CALL_CNT",
              "LASTD_ATTCNT",
              "LASTD_BLKCNT",
              "LASTD_DRPCNT",
              "D_ATT_CNT",
              "D_CUST_BLK_CNT",
              "D_DRP_CALL_CNT"         
         FROM (  SELECT DATE,
                       CELL_SITE,
                        LAG (SUM (V_ATT_CNT), 24)
                           OVER (PARTITION BY BSM_NM ORDER BY DATE)
                           AS "LASTV_ATTCNT",
                        LAG (SUM (V_CUST_BLK_CNT), 24)
                           OVER (PARTITION BY BSM_NM ORDER BY DATE)
                           AS "LASTV_BLKCNT",
                        LAG (SUM (V_DRP_CALL_CNT), 24)
                           OVER (PARTITION BY BSM_NM ORDER BY DATE)
                           AS "LASTV_DRPCNT",
                        LAG (SUM (D_ATT_CNT), 24)
                           OVER (PARTITION BY BSM_NM ORDER BY DATE)
                           AS "LASTD_ATTCNT",
                        LAG (SUM (D_CUST_BLK_CNT), 24)
                           OVER (PARTITION BY BSM_NM ORDER BY DATE)
                           AS "LASTD_BLKCNT",
                        LAG (SUM (D_DRP_CALL_CNT), 24)
                           OVER (PARTITION BY BSM_NM ORDER BY DATE)
                           AS "LASTD_DRPCNT",
                        SUM (V_ATT_CNT) AS "V_ATT_CNT",
                        SUM (V_CUST_BLK_CNT) AS "V_CUST_BLK_CNT",
                        SUM (V_DRP_CALL_CNT) AS "V_DRP_CALL_CNT",
                        SUM (D_ATT_CNT) AS "D_ATT_CNT",
                        SUM (D_CUST_BLK_CNT) AS "D_CUST_BLK_CNT",
                        SUM (D_DRP_CALL_CNT) AS "D_DRP_CALL_CNT"
                   FROM DMSN.DS3R_FH_1XRTT_FA_LVL_KPI
                  WHERE DATE >
                             (SELECT MAX (DATE) FROM DMSN.DS3R_FH_1XRTT_FA_LVL_KPI)
                           - 2
               GROUP BY DATE, CELL_SITE)
        WHERE DATE >=
                 (SELECT MAX (DATE) - NUMTODSINTERVAL (12, 'HOUR')
                    FROM DMSN.DS3R_FH_1XRTT_FA_LVL_KPI)What I've noticed is that the LAG function is doing kind of what I want but not exactly. Lets say I have data for hours 12AM, 1AM, 2AM, 3AM, 4AM, 5AM, 6AM, 7AM, 8AM, 9AM, 10AM, 11AM, 12PM, and that the current hour is 12PM, the LAG function goes back to 12AM, which is what it should be doing.
    but lets say I have data for 12AM, 1AM, 2AM, 3AM, 4AM, 5AM, 7AM, 8AM, 9AM, 10AM, 11AM, 12PM, but am MISSING 6AM (no data for 6AM). The lag function will now go back to 11PM instead of 12AM since the 6AM hour is missing.
    if I have data for 12AM, 1AM, 2AM, 3AM, 4AM, 7AM, 8AM, 9AM, 10AM, 11AM, 12PM and am MISSING 5AM and 6AM, the data will go back to 10PM then and not just 12AM.
    Can I prevent this from happening and always just go back 12 hours?
    Edited by: k1ng87 on Apr 25, 2013 1:27 PM

    Hi,
    k1ng87 wrote:
    LAG (SUM (V_ATT_CNT), 24)
    OVER (PARTITION BY BSM_NM ORDER BY DATE)
    AS "LASTV_ATTCNT",
    LAG (SUM (V_CUST_BLK_CNT), 24)
    OVER (PARTITION BY BSM_NM ORDER BY DATE)
    AS "LASTV_BLKCNT",
    LAG (SUM (V_DRP_CALL_CNT), 24)
    OVER (PARTITION BY BSM_NM ORDER BY DATE)
    AS "LASTV_DRPCNT",
    Since you want so many columns from the same previous row, it would probably be simpler and more efficient to do a self-join, rather than so many LAG functions.
    What I've noticed is that the LAG function is doing kind of what I want but not exactly. Lets say I have data for hours 12AM, 1AM, 2AM, 3AM, 4AM, 5AM, 6AM, 7AM, 8AM, 9AM, 10AM, 11AM, 12PM, and that the current hour is 12PM, the LAG function goes back to 12AM, which is what it should be doing.You're always passing 24 as the 2nd argument to LAG; that means "Return the value from the 24th precding row." If there's a row for every hour, and the current row is 12PM, then wouldn't 24 rows back would be 12PM yesterday, not 12AM? Maybe you meant to pass 12, not 24, as the second argument to LAG. I'll assume you really want the 24th row rom now on, but the technique is the same whether that number is 24 or 12.
    but lets say I have data for 12AM, 1AM, 2AM, 3AM, 4AM, 5AM, 7AM, 8AM, 9AM, 10AM, 11AM, 12PM, but am MISSING 6AM (no data for 6AM). The lag function will now go back to 11PM instead of 12AM since the 6AM hour is missing.
    if I have data for 12AM, 1AM, 2AM, 3AM, 4AM, 7AM, 8AM, 9AM, 10AM, 11AM, 12PM and am MISSING 5AM and 6AM, the data will go back to 10PM then and not just 12AM.
    Can I prevent this from happening and always just go back 12 hours?A self-join would handle this automatically: it will look for the matching row, without regard for which other rows might be present or absent.
    If you really had to do this with analytic functions, you could use MIN or FIRST_VALUE with a range window:
    RANGE BETWEEN  1 + (.5 / 24)  PRECEDING
          AND      1 - (.5 / 24)  PRECEDINGWhen you ORDER BY a DATE column (don't call it "DATE"), the units are 1 day, so 1+(.5/24) days ago is 24.5 hours ago; that is, the window only includes DATES between 24.5 and 23.5 hours ago.
    If, for some reason, you really wanted to call LAG, then you could do an outer join to guarantee that a row was present for each of the preceding 24 hours.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ {message:id=9360002}

  • Help with relocate master and date metadata

    Hi,
    I run into trouble while trying to relocate my masters.
    Here are 2 pictures taken within a few minute.
    http://rapidshare.com/files/366853944/Archive.zip.html
    IMG_9336.jpg 28.10.07 12:01:29
    IMG_9337.jpg 28.10.07 12:16:18
    Obviously the year of theses pictures is 2007 but when I try to "relocate master" to a folder with the year of the picture, one of them is put in a 2010 (IMG_9336.jpg) folder and the other one in a 2007 folder (IMG_9337) ?
    They are both supposed to be put in a "2007" folder as they were shot in 2007, so why is aperture thinking one of them was shot in 2010 ???
    I am desperate to find a solution as It happens to a bunch of pictures in my library and I can't figure out what is wrong with them!
    Do you experience the same with theses pictures ?
    Hope you understand what I mean and that you can help !
    Dag

    How can I let you download the 2 pictures I have trouble with then?
    I don't see a way to attach them to my post, is there a way to do it ?
    Dag

  • Pie chart with two measures and date dimension navigation not working

    Hi Experts,
    Pie chart with two measures and date dimension navigation not working. Any help is appreciated.
    Thanks
    V

    Hi Deepak,
    I had time dimension in the RPD.
    I have stacked bar chart with same time dim like year & month in the report. when I go to legand and set navigation it is working fine. But not with pie chart.
    I am not not sure what is the problem. When I click on Pie chart it is not navigating to the target report. Can it be any other issues..???

  • Prepare templates of the existing reports and data objects.

    Hi,
    I'm trying to create templates of the reports and dataobjects created in oracle BAM. I've created some reports on a server and i need the same reports with same dataobjects on other servers. Is there any method to create the template of existing reports and data objects.
    Thanks,
    Rajdeep

    Hi
    You will have to export the Data Objects and Repots and import in the other environments using icommand.
    TO preserve the report id's you can use option preserveid
    and also supposeyou have 1 report which internally calls three other reports you can export the main report using dependencies option with icommand export use dependencies 1 and this will export all ur sub reports with main report..
    If u need more help on icommand check this doc
    http://www.oracle.com/technology/products/integration/bam/10.1.3/TechNotes/TechNote_BAM_Migration.pdf

  • Download internal table data into excel sheet with column heading and data

    Hi,
      I am having one internal table with column headings and other table with data.
    i want to download the data with these tables into an excel sheet.
    It should ask the user for file name to save it on their own name. They should give the file name in runtime and it should be downloaded into an excel sheet.
    Can anyone tell what is the right function module for downloading these two internal table data with column heading and data.
    what we have to do for storing the file name in runtime.
    Can anyone help me on this.
    Thanks,
    Rose.

    Hi Camila,
        Try this
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        FILENAME                        = PATH2
       FILETYPE                        = 'XLS'
      TABLES
        DATA_TAB                        = IT_DATA
       FIELDNAMES                      = IT_HEADINGS
    EXCEPTIONS
       FILE_WRITE_ERROR                = 1
       NO_BATCH                        = 2
       GUI_REFUSE_FILETRANSFER         = 3
       INVALID_TYPE                    = 4
       NO_AUTHORITY                    = 5
       UNKNOWN_ERROR                   = 6
       HEADER_NOT_ALLOWED              = 7
       SEPARATOR_NOT_ALLOWED           = 8
       FILESIZE_NOT_ALLOWED            = 9
       HEADER_TOO_LONG                 = 10
       DP_ERROR_CREATE                 = 11
       DP_ERROR_SEND                   = 12
       DP_ERROR_WRITE                  = 13
       UNKNOWN_DP_ERROR                = 14
       ACCESS_DENIED                   = 15
       DP_OUT_OF_MEMORY                = 16
       DISK_FULL                       = 17
       DP_TIMEOUT                      = 18
       FILE_NOT_FOUND                  = 19
       DATAPROVIDER_EXCEPTION          = 20
       CONTROL_FLUSH_ERROR             = 21
       OTHERS                          = 22

  • List of users with authorised reports and tables.

    hi all
    i have another requirement, that is List of users with authorised reports and tables in SAP.
    that means user wise which reports and tables have authorisations to execute.  for that what is the tcode or table name?.  please help me in this..
    Thank you.

    Hi,
    In SUIM tcode expand transactions node der ull have for users..........
    Cheers,
    jose.

  • How can i use FNDLOAD for XML reports and data defnitions

    I registerd concurrent program and linked xml reports and data defnitions in staging instance, and successfully moved to DEV.. after that stage is refreshed and when i download the details from DEV and uploaded to Stage only concurrent program i can upload...Wheteher we can use FNDLOAD Command for the Data definitions or Data template for the XML Report,used FNDLOAD for the concurrent program, it uploaded only concurrent program details.

    Hi,
    Use XDOLoader.
    Note: 469585.1 - How To Use XDOLoader?
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=469585.1
    Regards,
    Hussein

  • I have 2 apple id's with different apps and data saved under each.  It's very annoying so now I want to create a new id with my primary email address I use now.  If I do that is there any way to transfer all my saved apps and app data like game saves etc?

    I have 2 apple id's with different apps and data saved under each.  It's very annoying so now I want to create a new id with my primary email address I use now.  If I do that is there any way to transfer all my saved apps and app data like game saves etc so I don't lose all of that information and can easily switch to a singular apple id?

    Apple does not transfer content bought with one Apple ID to another Apple ID. Apple will not merge two Apple IDs.
    If most of your content was bought with the Yahoo! Apple ID but you now want the Gmail address for your Apple ID, the trick will be to change the address used for the Yahoo ID with the Gmail address. However, to do that you must first free the Gmail address from that other Apple ID. Use the instructions from Apple to substitute another address that is not used as an Apple ID for your Gmail address in the Apple ID with the Gmail address. Then, when the Gmail address is no longer used in an Apple ID, you can use the same instructions to substitute the Gmail address for the Yahoo address in the Apple ID with the Yahoo address.
    Changing the email address you use for your Apple ID -
    http://support.apple.com/kb/HT5621

  • Is it possible to enter events into a specific iCal calendar, then print a list of those events with the name and date on a single sheet?

    Is it possible to enter events into a specific iCal calendar, then print a list of those events with the name and date on a single sheet?  I don't need the calendar grid.  I just want a list of events on a particular calendar, and their dates.  Is that possible? 

    Not easily. Two possibilities:
    1) If all the events have some common feature (eg you have included "XXX" in all the summaries), search for that feature then select and copy the found items at the bottom of the window. You can then paste them into TextEdit or a spreadsheet for printing
    2) You could write an Applescript to locate the events and write them into a text file for printing.
    The first one will probably give you what you want.

  • Need help with Blog, Wiki and Gallery

    Hi Team,
    Need help with Blog, Wiki and Gallery startup. I have newly started visiting forums and quite interested to contribute towards these areas also.
    Please help.
    Thanks,
    Santosh Singh
    Santosh Singh

    Hello Santhosh,
    Blog is for Microsoft employees only. However, you can contribute towards WIKI and GALLERY using the below links.
    http://social.technet.microsoft.com/wiki/
    http://gallery.technet.microsoft.com/

  • What's the phone number I should call for help with my iPhone and ihome dock?

    What's the phone number I should call for help with my iPhone and ihome dock?

    http://www.ihomeaudio.com/support/

  • Help with photoshop quitting and AMD graphics

    help with photoshop quitting and AMD graphics
    im not a techy, but it appears i have to do someting with my amd graphics card - this might be why my software is crashing - ive no idea what to do though

    Hi Chris
    I have tried to go on the website, then i tried to download the automatic detect because i wasnt sure which driver i had or needed - but it has just downloaded a load of game software - which i dont want ( i dont think)
    i have find out my laptop has a amd radeon HD 8750M card, but i dont know what im doing! i would hate to mess my computer up as i am in thailand with no one to help me!
    its frustrating as i am paying for CC but cant use it!

  • Free Report Writer for Oracle Database except Crystal Report and Data Vison

    Dear All,
    I want Free Report Writer for Oracle Database except Crystal Report and Data Vision software.
    Wr are working on Linux and windows both platform.
    Any one have direct link or website address for it ?
    Regards,
    Vipul Patel
    Ahmedabad

    Please check the following link -
    http://www.google.co.in/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&hl=en&q=open+source+report+writer+for+oracle&meta=&btnG=Google+Search
    Regards.
    Satyaki De.

Maybe you are looking for