Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a calendar view that is showing a calculated field for the View Title.

The same value is repeated for Month, Week, and Day. The odd thing is when in Week View the appropriate field information displays if it is an "All Day Event". If it is not an "All Day Event", there is no title or location displayed.

The calculated field value that is used for the title is: ="<span style='width:100%;height:100%;background-color:"&ColorVALUE&"' ><font color=black>"&TITLEFIELD&"</font></span>"

Basically, I am highlighting the title with a specific color based on certain values. It works for Month view, Day view, and all day events in Week View. It is just the "Week View" non-all day that fails.

Here is the code section from the calendar:

  <ListViewXml xmlns="http://schemas.microsoft.com/WebPart/v2/ListView"><View Name="{1475A8FC-B8BB-4665-BA1B-B0DB8C5E93CC}" DefaultView="TRUE" Type="CALENDAR" Scope="Recursive" RecurrenceRowset="TRUE" DisplayName="- Departmental PTO" Url="/sites/wsoldi/oldsc/Lists/Scheduling Calendar/cPTO.aspx" Level="1" BaseViewID="2" ContentTypeID="0x" ImageUrl="/_layouts/images/events.png">


<ViewFields>
<FieldRef Name="EventDate"/><FieldRef Name="EndDate"/><FieldRef Name="Title"/><FieldRef Name="fRecurrence" Explicit="TRUE"/>
</ViewFields>

<CalendarViewStyles>
<CalendarViewStyle  Title=&”Day&” Type=&”day&” Template=&”CalendarViewdayChrome&” Sequence=&”1&” Default=&”FALSE&” />
<CalendarViewStyle  Title=&”Week&” Type=&”week&” Template=&”CalendarViewweekChrome&” Sequence=&”2&” Default=&”FALSE&” />
<CalendarViewStyle  Title=&”Month&” Type=&”month&” Template=&”CalendarViewmonthChrome&” Sequence=&”3&” Default=&”TRUE&” />
</CalendarViewStyles>
<ViewData>
<FieldRef Name="zzz_NOTUSED_CalendarText" Type="CalendarMonthTitle"/>
<FieldRef Name="zzz_NOTUSED_CalendarText" Type="CalendarWeekTitle"/>
<FieldRef Name="Event_Location" Type="CalendarWeekLocation"/>
<FieldRef Name="zzz_NOTUSED_CalendarText" Type="CalendarDayTitle"/>
<FieldRef Name="Event_Location" Type="CalendarDayLocation"/>
</ViewData>
<Query>
<Where>
<And>
<DateRangesOverlap>
<FieldRef Name="EventDate"/>
<FieldRef Name="EndDate"/>
<FieldRef Name="RecurrenceID"/>
<Value Type="DateTime">
<Month/>
</Value>
</DateRangesOverlap>
<Eq>
<FieldRef Name="Type_Of_Event0"/>
<Value Type="Text">PTO</Value>
</Eq>
</And>
</Where>
</Query>
<Aggregations Value="Off"/>
<RowLimit>0</RowLimit>
<Toolbar Type="Standard"/>
<ViewHeader/>
<ViewBody/>
<ViewFooter/>
<ViewEmpty/>
</View>
</ListViewXml>

Thanks!

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Figured it out...

For some reason, the "Week" view didn't like the "Height:100%" on the field.

Once removed, it worked fine.

share|improve this answer
    
please mark this as answer then –  Anders Rask Dec 14 '12 at 8:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.