How can I display a range of dates on my calendar

I have a table with the following fields: beginning date, end date, person name and color.
I will like to change the background color for each person range of days to the color assign to each person.

254114
I did something like on the application I am working on. Basically, we have consultants who are assigned to assignments and have a status for every assignment.Each assignment has a start and end date and there is a different colour scheme for every assignment.
I have a pl/sql region having source like this :-
declare
cursor c_get_consultant_dates IS
select case
when ph.holiday_date = to_date(z.my_dt,'ddmmyyyy') then
     'PUBLIC_HOLIDAY'
     else
cs.consultant_status
end consultant_status,
z.my_dt
from
select my_dt
from
select to_char(r) ||
substr(:p1_calendar_date,5,2) ||
substr (:p1_calendar_date,1,4) my_dt
from ( select
case
when rownum < 10 then '0'|| to_char(rownum)
     else
to_char(rownum)
end r
from all_objects
where rownum <=
(select to_char(last_day(to_date
(:p1_calendar_date,'yyyymmdd')),'dd') from dual)
where to_char(to_date(my_dt,'ddmmyyyy'),'fmDAY') not in
('SATURDAY','SUNDAY')
and to_date(my_dt,'ddmmyyyy') not in
( select holiday_date
from public_holidays
where to_char(holiday_date,'yyyymm') =
substr(:p1_calendar_date,1,6)
order by 1
)z,
consultant_assignment ca,
consultant_status cs,
public_holidays ph
where ca.con_status_seq_num = cs.con_status_seq_num
and ca.consultant_seq_num = :p1_consultant
and to_date(z.my_dt,'ddmmyyyy') between ca.start_dt and
ca.end_dt
and to_date(z.my_dt,'ddmmyyyy') = ph.holiday_date(+)
UNION
select 'PUBLIC_HOLIDAY' consultant_status,
to_char(holiday_date,'ddmmyyyy') my_dt
     from public_holidays          
     where to_char(to_date(:p1_calendar_date,'yyyymmdd'),'MON-YYYY') =to_char(holiday_date,'MON-YYYY');
begin
htp.p('<script>');
-- This is a simple function to grab elements in the page
-- Same function from above
htp.p(' function html_GetElement(pNd){
switch(typeof (pNd)){
case "string":node = document.getElementById(pNd); break;
case "object":node = pNd; break;
default:node = null; break;
return node;
Fill the appropriate colour for all consultant statuses plus public holidays
for x in c_get_consultant_dates
loop
if
--x.consultant_status = 'AVAILABLE' then
--htp.p(' html_GetElement("'||x.my_dt||'").style.backgroundColor="green";');
--elsif
x.consultant_status = 'BOOKED' then
htp.p(' html_GetElement("'||x.my_dt||'").style.backgroundColor="red";');
elsif
x.consultant_status = 'PENDING' then
htp.p(' html_GetElement("'||x.my_dt||'").style.backgroundColor="yellow";');
elsif
x.consultant_status = 'TRAINING' then
htp.p(' html_GetElement("'||x.my_dt||'").style.backgroundColor="pink";');
elsif
x.consultant_status = 'PUBLIC_HOLIDAY' then
htp.p(' html_GetElement("'||x.my_dt||'").style.backgroundColor="D61300";');
elsif
x.consultant_status like 'HOLIDAY%' then
htp.p(' html_GetElement("'||x.my_dt||'").style.backgroundColor="D61300";');
end if;
end loop;
htp.p('</script>');
end;
hope this helps

Similar Messages

  • How can I display the range for LastFullMonth in the header of a report

    How can I display the month for LastFullMonth in the header of a report run in the past so that a report that ran sept 1 2009 selecting data for LastFullMonth (august 2009)  displays sept 2009 in the header even if there is no data selected by the report?

    Good,
    Sometimes I answer these questions and completly miss it....
    ( lack of understanding on my part )   

  • How can I display the password expiration date for a user

    I have created a GUI (using PrimalForms) which runs powershel scripts to pull information like user ID, email address, last logon ec. for the helpdesk to help establish the validity of some user claims of "it worked yesterday" and the like.
    I have been asked to add the password expiration date, but I am struggling to get the code for this addition.
    Does anyone know how I can include this, and have it in a human readable format?
    The current scripts (there are 3) allow the helpdesk staff to search on user ID and display name, the third provides the last logon, it was impossible to include this in the other scripts so I added an extra search button and called it good. An example of
    these scripts is below (please note, PrimalForms needs a slightly different syntax in order to get the results displayed, but the core script is standard PS, I use Powershell 3.0)
    $results.Text=Get-ADUser -Filter "sAMAccountName -eq '$($EntryBox.text)'" -Properties DisplayName, sAMAccountName, mail, extensionattribute5, PasswordLastSet, PasswordExpired, PasswordNeverExpires, buMemberOf, telephoneNumber, msExchOmaAdminWirelessEnable, whenCreated, whenChanged, enabled, AccountExpirationDate | select givenName, surname, DisplayName, sAMAccountName, mail, extensionattribute5, PasswordLastSet, PasswordExpired, PasswordNeverExpires, buMemberOf, telephoneNumber, msExchOmaAdminWirelessEnable, whenCreated, whenChanged, enabled, AccountExpirationDate | Out-String
    $results.Focus()
    for info:
    $results.text is the window in the GUI results are displayed  in
    $entrybox.text is the text box the helpdesk staff use to input the user ID or display name of the account they are querying
    $results.focus simply tells the script to put the results in the results.text window
    The screenshot below shows the current setup, this is purely to put the above information into perspective. Obviously some of the information displayed has been removed/redacted along with our logo.

    Hi,
    Here's an example you can build from:
    $maxPasswordAge = 120
    Get-ADUser USER -Properties PasswordLastSet |
    Select SamAccountName,
    PasswordLastSet,
    @{N='PasswordLifeRemaining';E={$maxPasswordAge - ((Get-Date) - $_.PasswordLastSet).Days}},
    @{N='PasswordExpirationDate';E={(Get-Date $_.PasswordLastSet).AddDays($maxPasswordAge)}}
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • How can i display blank table if data not present

    hi all,
    i have problem here.
    i need to display one blank table if there is no data. in default, it just show column name box.
    now i need to add blank box under column name.
    please if you have any advice, let me know.
    regards,
    dityo

    hi,
    the solution that i get is create two similar table with if condition.
    if condition for table A : <?if:count(G_PARTS) > 0?> . G_PARTS is name of group. table A will showed if data present.
    if condition for table B (blank table) : <?if:count(G_PARTS) = 0?>. this blank table will showed if no data.
    if
    table A
    end if
    if
    table B
    enf if
    hope this help.
    rgrds,
    tyo

  • How can I display diagnostics and usage data on my computer?

    I notice that there are many profile Ids listed some days and crash reports.  I would like to expand these reports on my computer to investigate them more. Is there a way?

    How to delete diagnostic and...: Apple Support Communities
    Thy are not really useful for the errors you mentioned. Those are common and expected.

  • How do I display todos or reminders directly in my calendar?

    I have a MacBook Pro with OS X version 10.9.4. I am using Calendar version 7.0 and Reminders version 2.0.  How can I display my Reminders/Todos directly in my Calendar?

    HI
    your code(Cursor = System.Windows.Forms.Cursors.WaitCursor) is correct but you need to place this code under menu click event(from which you are opening the form) in beforeaction (true).
    and you place thisline(Cursor = System.Windows.Forms.Cursors.Default) after loading your data.
    Hope it helps you
    Regards
    Vishnu

  • How can I display the data in table in separate column?

    I have a vi reading data one by one in the same column.
    How can I display the data with separate column?
    like this:
    data 1 | read | read
    data 2 | read | read
    data 3 | read | read
    (would you mind if I will ask for an example
    because it is much easier for me to work
    with an example)
    THANK YOU.

    If you're reading your data in as a 1D array, this is as simple as using the Reshape Array to make a 2D array. I've attached an example in LabVIEW 6.1 format. The example rearranges a single column of data fill several columns horizontally, but you can easily modify this code to fill the columns downward instead.
    Attachments:
    Data_Column_Example.vi ‏18 KB

  • How can I display XSLT transformer errors on a web page ?

    Hi,
    I have some JSP pages that access DB, create an XML based on DB data and then transform it into HTML through an XSLT stylesheet. Developing the XSL code it's easy to make mistakes and generate errors on trasformation, but what I receive on the web page is only a "Could not compile stylesheet" TransformerConfigurationException, while the real cause of the error is displayed only on tomcat logs. This is the code for transformation:
    static public void applyXSLT(Document docXML, InputStream isXSL, PrintWriter pw) throws TransformerException, Exception {
            // instantiate the TransformerFactory.
            TransformerFactory tFactory = TransformerFactory.newInstance();
            // creates an error listener
            XslErrorListener xel = new XslErrorListener();
            // sets the error listener for the factory
            tFactory.setErrorListener(xel);
            // generate the transformer
            Transformer transformer = tFactory.newTransformer(new SAXSource(new InputSource(isXSL)));
            // transforms the XML Source and sends the output to the HTTP response
            transformer.transform(new DOMSource(docXML), new StreamResult(pw));
    }If an exception is thrown during the execution of this code, its error message is displayed on the web page.
    This is the listener class:
    public class XslErrorListener implements ErrorListener {
        public XslErrorListener() {
        public void warning(TransformerException ex) {
            // logs on error log
            System.err.println("\n\nWarning on XEL: " + ex.getMessage());
        public void error(TransformerException ex) throws TransformerException {
            // logs on error log
            System.err.println("\n\nError on XEL: " + ex.getMessage());
            // and throws it
            throw ex;
        public void fatalError(TransformerException ex) throws TransformerException {
            // logs on error log
            System.err.println("\n\nFatal Error on XEL: " + ex.getMessage());
            // and throws it
            throw ex;
    }When I have an error in the XSL stylesheet (for examples a missing closing tag), I can find on tomcat logs the real cause of the error:
    [Fatal Error] :59:10: The element type "table" must be terminated by the matching end-tag "</table>".
    Error on XEL: The element type "table" must be terminated by the matching end-tag "</table>".but on my web page is reported just the TransformerConfigurationException message that is:
    "Could not compile stylesheet".
    How can I display the real cause of the error directly on the web page?
    Thanks,
    Andrea

    This code is part of a bigger project that let developers edit XSL stylesheets through a file upload on the system and we can't impose the use of any tool for checking the xsl. So, I need to display the transformer error on the web page.I see. This code is part of an editorial/developmental tool for developers to create and edit XSL stylesheets.
    As part of the editorial process, XSL errors during editing can be considered a normal condition. In other words, it is normal to expect that the developers will generate XSL errors as they are developing stylesheets.
    In this light, handling the XSL transformation errors is a business requirement that you need to handle. Using the Java Exceptions mechanisms, e.g. try / catch are inappropriate to handle business requirements, in my opinion.
    I suggest that you look at how you handle the occurence of XSL errors differently than what you currently have. You need to:
    (1) capture the Transformation exception on the server;
    (2) extract the message from the exception and put it into a message that can be easily understood by the user;
    The current error message that you have going to the web browser is not useful.
    And you should not have the Transformation exception sent to the web browser either.
    What you are attempting to do with the exception is not appropriate.
    Handle the Transformation exception on the Business tier and use it to create a useful message that is then sent to the Presentation tier. In other words, do not send Java exceptions to web browser.
    />

  • How can I display  contacts in a relationship

    I have companies in my CRM. I have a customers/contacts in the CRM I have tied as a relationship with each companies. How can I display all the records/contacts associated with a company? I have a already created a secure zone, so the company user would have logged in. Is this possible? If not, any workaround?
    The only workaround I thought of is to use webapp to import the company data and create another web app containing the employees data. Then link both tables/webapp using datasource. But the way the client's data is structured could create a lot of problems going forward.
    Any suggestion, help will be appreciated

    The relationship feature and how companies work currently in BC is really limited. It is an association and not true relationships at the moment. You cant output a company and show all its relationships at the moment.

  • How can I display more than one value in Calendar ?

    Hi,
    the standard (example) script allows for the display of one value only (as I understood). How can I display two or three values, from the very same table ? Students of mine during an HTMLDB workshop in Leipzig did ask that question.
    Do we have a more detailed docum. on the use of the calendar ?
    pls kindly advise. TIA.
    Bernhard

    my solution:
    Source fo the calendar starts:
    snip>
    declare
    q varchar(32767) := null;
    begin
    q := 'select "ETA", <--- Date Field and concatination of fields as follows:
    "SCHIFFSNAME"|| "ETA_TIME"|| "TERMINAL"||''(br*)'',
    null,
    null,
    null,
    null
    from "#OWNER#"."SCHEDULE"'; . . . . . . .
    snip>
    comment on (br*) - you have to use "<" and ">" instead of "( " and ")" to have the "break/new line effect"
    brgds
    Bernhard

  • How can I display the front panel of the dinamically loaded VI on the cliente computer, the VI dinamically loaded contains files, I want to see the files that the server machine has, in the client machine

    I can successfully view and control a VI remotly. However, the remote VI dinamically loads another VI, this VI loaded dinamically is a VI that allows open others VIs, I want to see the files that contains the server machine, in the client machine, but the front panel of the dinamic VI appears only on the server and not on the client, How can I display the fron panel with the files of the server machine of the dinamically loaded VI on the client computer?
    Attachments:
    micliente.llb ‏183 KB
    miservidor.llb ‏186 KB
    rdsubvis.llb ‏214 KB

    I down loaded your files but could use some instructions on what needs run.
    It seems that you are so close yet so far. You need to get the data on the server machine over to the client. I generally do this by doing a call by reference (on the client machine) of a VI that is served by the server. THe VI that executes on the server should pass the data you want to diplay via one of its output terminals. You can simply wire from this terminal (back on the client again) to an indicator of your choosing.
    Now theorectically, I do not think that there is anything that prevents use from getting the control refnum of the actual indicator (on the server) of the indicator that has the data, and read its "Value" using a property node. I have never tried this idea but it seems t
    hat all of the parts are there. You will need to know the name of the VI that holds the data as well as the indicator's name. You will also have to serve all VI's. This is not a good idea.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How can I display all content (graphics)

    On Skynet (United airlines employee website), when I try to look at the "seat selection" window, it displayes only numbers, it does not display a graphic of the cabin (seats). How can I display all content?

    You can see that it is a font issue by the appearance of the little boxes with the hex code of the characters that Firefox displays when there is no font that covers this Unicode range. You might see a different character in case you would have a font that maps this font.

  • I have pictures in a folder, how can I display them in name order?

    I have pictures in a folder, how can I display them in name order?

    Welcome to the Apple Community.
    I don't think you can. You might ensure that their creation dates are in order, but I'm not so such that will help. Ordering seems to be a feature limited to use with iPhoto/Aperture.

  • How can i display Intaractive report ,

    Hi Experts,
    How can i display Intaractive report ,
    In basic List i want to print EMP data on top.
    and infotype number and infotype text .
    In secondary list infotype data on which the user intactive with infotype no..
    If user intaract the 0001 infotype, In secondary list i want display only 0001 data.
    thanks advace,,,REWARDs for usefull answers

    hi,
      Think this code helps u..check this out.
    SY-LSIND - Returns list index value
    SY-LISEL - Stores the contents of the line selected from the list.
    SY-LILLI - Returns line number of the line selected from the list.
    Eg. code:
    TABLES : ZCUST_MASTER2.
    DATA : WI_ZCUST_MASTER2 LIKE ZCUST_MASTER2 OCCURS 0 WITH HEADER LINE.
    DATA FLD(30).
    SELECT * FROM ZCUST_MASTER2 INTO TABLE WI_ZCUST_MASTER2.
    WRITE :/ 'CUSTOMER IDENTIFICATION NUMBER' COLOR 5.
    LOOP AT WI_ZCUST_MASTER2.
    WRITE : / WI_ZCUST_MASTER2-ZCUSTID HOTSPOT ON.
    ENDLOOP.
    AT LINE-SELECTION.
    GET CURSOR FIELD FLD.
    IF FLD = 'WI_ZCUST_MASTER2-ZCUSTID'.
    SELECT * FROM ZCUST_MASTER2 INTO TABLE WI_ZCUST_MASTER2 WHERE ZCUSTID = FLD.
    WRITE :/ wi_zcust_master2-zcustid,
             wi_zcust_master2-zcustname,
             wi_zcust_master2-zaddr,
             wi_zcust_master2-zcity,
             wi_zcust_master2-zstate,
             wi_zcust_master2-zcountry,
             wi_zcust_master2-zphone,
             wi_zcust_master2-zemail,
             wi_zcust_master2-zfax,
             wi_zcust_master2-zstat.
    LEAVE TO LIST-PROCESSING.
    ENDIF.
    Please reward if it is useful.
    Sri
    Edited by: p525618 on Feb 11, 2008 1:18 PM

  • How can I display the name of my refnum on the front panel?

    I am writing data to a file. To do this, I am using "Open/Create/Replace File" to prompt the user for a filename, which is then output to my VI as a refnum. I then write strings to this file with "Write to Text File".
    How can I display this filename (with the path) on the front panel after the user has input it?
    Michael
    Solved!
    Go to Solution.
    Attachments:
    refnum.JPG ‏45 KB

    Use the Refnum to Path function, in File I/O -> Advanced File Functions palette. You can wire this to a path indicator.

Maybe you are looking for

  • I deleted all my web browsers off my mac now i cant use internet !

    Recently i deleted safari off my mac for some strange reason and its gone. Theres nothing wen i search in the finder or magnifying glass there nothing related in safari. So some how i downloaded l google chrome on my moms computer(hp) and transfer th

  • How to restore the original copy of OS.

    The hard disk of my notebook got damaged and now I have installed new hard disk but since I didnt had any backup the windows 8.1 OS also got lost. Now I have installed trial version, can anyone let me know how to restore the original copy of OS. 

  • Legend Problem in multiple series chart

    Hello, I am getting problem in displaying legend. I have created a chart with  multiple series and custon color. Here is my code. You can copy paste it. Out of 3 only one legend marker n label coming. <?xml version="1.0" encoding="utf-8"?> <mx:Applic

  • USB SLOT STOPPED WORKING PLEASE HELP ASAP

    I have a mac book pro (bought in 2012) and my usb slot (the one close to the sd card slot) has stopped working. I was wondering what can I do to maybe fix this, and with whatever i have to do delete my files?

  • How to restart my download on a bought version of elements 13?

    I bought elements 13 and it stopped downloading midway. How can I restart it?