.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

CQWP rollup not working as expected

Posted By:      Posted Date: September 23, 2010    Points: 0   Category :SharePoint

I have some site columns like “Show on Home”, yes/no, and on the home page a cqwp which shows posts which have “Show on Home” = yes.


This was working fine, then realize today that some of the site I had been setting up I had omitted the step of adding these columns – no problems I thought, just add these columns to content type for Post. Sure enough then appearing in these sites missing them.


Then I noticed that on the home page all the blog items were appearing, and the filter not working.


View Complete Post

More Related Resource Links

CQWP: AdditionalFilterFields not working as expected




I've got a problem defining custom filters in a content query webpart. I've done this many times before, by altering the CommonViewFields and AdditonalFilterFields properties in an exported Content Query Webpart. But this time I run into problems... Here's what I did:


  1. I have created a content type called "Customer" based on the List Item content type. I didn't add any extra columns, so I only use its "Title" column.
  2. I then created a list called "Customers" and added the "Customer" content type to it. I added a couple of customer items to this list, i.e. "Customer A", "Customer B"... The values in this list are to be used as data for the lookup column I create next.
  3. Then I created a content type called "News" and added a (site) column "Customer" of type Lookup (with "Allow multiple values" set) to it. This column get its values from the "Customers" list mentioned at point 2.
  4. Then I created a list called "General News" and added the "News" content type to it. I added a couple of "News" items, making sure that for each item the "Customer" colum

Textwrapping with buttons not working as expected

Guys and Gals, Got a bit of a problem with my application. I am trying to get the text and buttons in a groupbox to wrap when the page size changes (i.e. gets too small to fit it all on the page.) I have inserted the TextWrapping="Wrap" into the TextBlock line but it refuses to wrap. I have tried everything I can think of for this. Am I doing something wrong or is it impossible to do? If someone could point me in the correct direction it would be greatly appreciated. I don't want to use a scroll viewer either. <Window x:Class="Test.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Width="Auto"> <StackPanel> <TextBlock >Load Data Mappings From File</TextBlock> <TextBlock TextWrapping="Wrap"> This task will truncate all existing data Maps and re-import from an excel spread sheet.<LineBreak/> </TextBlock> <GroupBox Header="File to Load" Name="groupBox1" Padding="10" Margin="10"> <StackPanel> <StackPanel Orientation="Horizontal"> <TextBlock DockPanel.Dock="Left" VerticalAlignment="Center" Width=&qu

Why is the Content by Query Web Part CommonViewFields attribute not working as expected?

I am using the Content by Query Web Part to show data from a Custom List.  I have already added to the XSL "ItemStyle" sheet so that I can pick the correct Item Style.  That has worked fine - I have been able to show whatever fields I would like and apply any CSS Styles I would like to them.  The issue I am having is in formatting the field correctly.  I have two different fields in my current example that need to be formatted: [1] I want to show an Image, but right now it shows the URL  [2] I want to show Rich Text, but right now it shows all the HTML Code as Plain Text.  I have looked at many articles online, and they all tell me to change the following in the WEBPART file from: <property name="CommonViewFields" type="string" /> to: <property name="CommonViewFields" type="string">Thumbnail, Image;Teaser, RichHTML;</property> What I am doing wrong?  The Web Part still runs, but it does not format the fields any differently.  Thanks for the help!

Change password for FBA users in claims setup not working as expected

Hi, I am trying to add a standard asp:changepassword control for external users. In the previous 2007 sharepoint environment this control was working "out of the box". I am pretty sure what is wrong as well,- but not sure how to fix it. A workaround that makes me able to change password is as follows: in the asp - control, I have added the option DisplayUserName="true" Then in the actual web-page, i can see that my username is: 0#.f|acaspnetsqlmembershipprovider|xxxxxx and not xxxxxx as i would excpect, as i use xxxxxx to log in. Editing the username to just xxxxxx makes the changing of password work, but this solution is not really nice to deploy to the normal end-users.. Any suggestion on how to make the username right? I've tried to set the username using the option UserName="<%=SPContext.Current.Web.CurrentUser.LoginName%>", but it does not seem to evaluate..  

"max-template-document-size" change not working as expected

Hi There I have a 2 node MOSS 2007 deployment hosting 5 webapps. The one web app I am having a problem with is a customised solution from a 3rd party. The product users need to save sites as templates, to which they get an error saying that the template is too large. I have run the max-template-document-size stsadm command and increased the value from 5mb to 50mb but it seems the change is not taking effect. The error page says the limit is still 5mb. When I use stsadm getproperty it shows that the value has in fact increased. I have made sure that I am doing this on the correct webapp. The save as template operation works if I do not select the "save content" option. The sites have no content so the cannot be greater than 50mb. Am I missing something extremely obvious?

!POSTBACK not working as expected

I have a site I am trying to set up where the form can be submitted via click of button but when refreshing the page, I do not want it to resend the message. i have found several sites that show using Session Variables and !Postback, but for some reason, when using this action I am still hitting the !Postback condition even when I  do a refresh which I don't think is supposed to happen. Also, when it refreshes it resets the Session["checkrefresh"] variable and throws an error  Object Reference not found i believe on the if statment with the .ToString() check against the ViewState.  Any ideas would be awesome because I'm running out of them         ASPX.CS pageusing System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace CarouselApplicationSuite { public partial class TEStRefresh : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { // If this is not the first time and is a refresh (not button click) set Session Var if (!IsPostBack) { Session["CheckRefresh"] = Server.UrlDecode(System.DateTime.Now.ToString()); } } protected void Button1_Click(object sender, EventArgs e) { if

Resource governor not working as expected.


Greetings. I'm trying to have Resource Governor (RG) not allow any queries run that use >= 1 second of CPU time, and it's simply not working.

I have no doubt that I am doing something incorreclty, but not sure what it is.

 I configure RG with the following:

create FUNCTION dbo.rgclassifier_v1() RETURNS sysname 
  DECLARE @grp_name sysname
   IF (SUSER_NAME() = 'sa')
     SET @grp_name = 'GroupAdmin'
   IF (SUSER_NAME() = 'testAdhoc')
     SET @grp_name = 'GroupAdhoc'
   IF (SUSER_NAME() = 'testReports')
     SET @grp_name = 'GroupReports'
  RETURN @grp_name

/****** Object: ResourcePool [poolAdhoc]  Script Date: 09/28/2010 13:26:11 ******/
CREATE RESOURCE POOL [poolAdhoc] WITH(min_cpu_percent=0, 


/****** Object: WorkloadGroup [GroupAdhoc]  Script Date: 09/28/2010 13:25:30 ******/
CREATE WORKLOAD GROUP [GroupAdhoc] WITH(group_max_requests=0, 
		max_dop=0) USING [poolAdhoc]



 After doing this, I fire

Substring not working as expected in UDF


Apologies if this is very simple and part of the basic SQL training but i'm very new to User Defined Functions (SQL 2000)

I am trying to create a function to take two variables, a varchar financial year value and an nvarchar financial month value and convert this to a datetime format, with the date automatcially being the 1st of that month.

Example: Take '2010/2011' and 2 (2nd financial month) as variables and convert to 2010-05-01 00:00:00.000

The function i am trying to create is below and i know that the code inside the function works fine, as i've tested it. The problem seems to be that the substring function is not working as it should be within the udf i am trying to create. instead of returning 4 characters, its only returning 1. Is this a known issue with UDF, and if so, is there anyway around this?


CREATE FUNCTION FinYrDate (@FinYr varchar, @FinYr_Mnth nvarchar)
RETURNS datetime

DECLARE @ReturnedDate datetime

SET @ReturnedDate =
WHEN @FinYr_Mnth < 4 THEN convert(datetime,(cast((@FinYr_Mnth + 3) as varchar) + '-1-' + SUBSTRING(@FinYr,1,4)))
WHEN @FinYr_Mnth between 4 and 9 THEN convert(datetime,(cast((@FinYr_Mnth + 3) as varchar) + '-1-' + SUBSTRING(@FinYr,6,4)))
ELSE convert

property setting in report server (2008) config file is not working as expected.



I have set the <WorkingSetMinimum> property to 2.4GB in my reportserver 2008 config file.

By defintion, <WorkingSetMinimum> setting means,

  1. Lower limit of service memory consumption; memory will not be released if the consumption is below this amount, though the service will not reserve the designated amount of memory when it starts.
  2. If service uses more than the designated amout of memory, it will release back the memory only till this declared value and not beyond that, which means it should keep 2.4GB as designated.

See this link for definition: http://books.google.com/books?id=mzY_Xo_9J-gC&pg=PA589&lpg=PA589&dq=What+is+%3Cworkingsetminimum%3E+in+report+server+configuration+file&source=bl&ots=r_xhRp8erj&sig=E_o0-Dh2SXOgMNrW3sptt5oZrYI&hl=en&ei=f5mjTNeNM5O8ccmErJMI&sa=X&oi=book_result&ct=result&resnum=4&ved=0CCAQ6AEwAw#

Content Query WebPart (CQWP) not showing thumbnails of the rollup image



I have set up my CQWP to display pages from a newssite. This is working fine, but my rollup images is showing in full size. As I have understood, SharePoint has the ability to scale down pictures and showing them as thumnails.

In the "Fields to display:" I have set the path to "Thumbnail; Rollup Image; ".

SSAS Calculated Member not working as expected in a SSRS report


Dear forum guys, I have a simple cube to analyze my customer's sales. I have a Time Dimension, a Product Dimension (with a few hierarchys) and a couple measures (sales and purchase amounts).


I also have defined a few Calculated Members, in particular the average sales and purchase amount over the last 12 months from the selected month.


I need to show the results in a SSRS Report: the user must select a month and the report needs to show the sales and purchase amount of the selected month and the average of the previous 12 months (both for sales and purchases).


Everything works perfectly if I test the cube using the Cube Browser or Excel 2007 as a client.


When I define the SSRS Report I cannot get to work with the calculated members (the average): I get strange numbers which are much higher than the real numbers.


I've tried both Matrix and Table reports.


Can anyone suggest me what I'm doing wrong: I think this should be a very common mistake.


Best regards



max() agreate function and having clause not working as expected


I wil try to describe below my issue, starting with the query i use.

SELECT     b.[id_training_MD],
FROM [training_MasterData] as a
inner join [training_Log] as b
    on a.id_training_MD = b.id_training_MD
inner join [training_Q_Log] as c
    on b.id_training_Q_Log = c.id_training_Q_Log
WHERE (a.[Category] = 'Networking')  and  (c.[employeeID] = '123')

group by b.[id_training_Q_Log],b.[id_training_MD],b.[trainingScore]   
having b.[id_training_Q_Log] = (select distinct max(b.[id_training_Q_Log]) FROM [training_Log])

My tables are:

CREATE TABLE [dbo].[Training_MasterData](
    [id_Training_MD] [int] IDENTITY(1,1) NOT NULL,
    [Category] [varchar](50) NOT NULL,
    [TrainingName] [varchar](100) NOT NULL

Example of data from table:
[id_Training_MD]    [Category]         [TrainingName]

Search Synonyms not working as expected



In the Search Keywords section, I have setup a keyword with synonyms, but when I search the synonym words, the same results don't display.  For instance, my keyword is "test", synonyms are "tst" and "tset".  When I search for the synonyms, the test results do not display - am I missing something in the setup or search side?  Isn't that how it's supposed to work?


Thanks in advance!

CQWP - AdditionalFilterFields - Wiki Categories field not working


Hello All,

So, after about 2 hours of putzing with this thing and digging up information about internal names and whatnot, I have gotten my ContentQueryWebPart to display "Wiki Categories" in its list of "Additional Filters."  If you know anything about that field, it is a Managed Metadata field that can have multiple selections per content item.  I have tried setting this value for one or more of the available options, but when I try to save the web part I get an error:

"You must specify a value for filters on managed metadata fields"

You can see how I would be confused, since... well... I *DID* "specify a value" for that filter.

Is there some other piece of the puzzle that I am missing?

Here is the property I added to the CQWP so far: (I added the line breaks and extra tabs for forum readability)

	<property name="AdditionalFilterFields" type="MultiChoice">
		Wiki_x0020_Page_x0020_Categories,Wiki Categories


Thanks in advance,


- Matt

Conditional formatting not working as expected in SSRS report


I am trying to display conditional fill on a report in SSRS on SQL Server 2008. Looking at Fields!MS_Communicator.Value, desired fill to be SeaGreen if version build is >= 83, Tomato if < or [Not Installed]. Query provides either [Not Installed] or the version number (i.e. 3.5.6907.83).

=(IIF((Split(Fields!MS_Communicator.Value, ".")).GetValue(3) >= 83, "SeaGreen", "Tomato")) works as expected, leaving cells with [Not Installed] transparent.

=IIF(Fields!MS_Communicator.Value = "[Not Installed]", "Tomato", "Transparent") works as expected, leaving cells with version transparent.

My problem:

=IIF(Fields!MS_Communicator.Value = "[Not Installed]", "Tomato", (IIF((Split(Fields!MS_Communicator.Value, ".")).GetValue(3) >= 83, "SeaGreen", "Tomato"))) works if there is a version number, but leaves cells with [Not Installed] transparent.



EnableViewState="False" is not working as expected



I have made EnableViewState="False" in @page directive.

But still all all controls in page maintaing values even after submit.



Dimension security not working as expected


I'm implementing a Market dimension where a user may have access to some markets and within a specific market certain periods.  The Market dimension has two levels -- Market Name and Market Period.  The Market Period level has an entry for every period with data within the Market.  The fact tables join to the Market dimension at the Market Period level.  For obvious reasons, the Market Period level is not visible.  It is only to be used for implementing security.

For testing, I have created a role which has the Deselect all members set on the Market Name level and only one market selected.  At the Market Period level, I also have Deselect all member and have selected the specific periods that I want to display.  This looks like it should implement exactly what I want.

I reprocess the cube and look at it using the BIDS browser with the test role I setup.  I see all markets.  I assume that I'm missing something glaringly obvious, but I can't see it.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend