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

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

#Error when building an IIF expression for a column label

Posted By:      Posted Date: October 01, 2010    Points: 0   Category :Sql Server



This is a report based on two different hierarchy. PCA and CCA hierarchy.

The @hierarchy parameter will determine which hierarchy to use and that will drive what is displayed on the row names.

When I write the following expression, all I get is #Error.

Parameters!hierarchy.Value = "PCA",


If I change the expression to

Parameters!hierarchy.Value = "PCA",

The the PCA Hierarchy names appear but when I switch to the CCA on the @hierarchy, I get the #Error message again.


Can any one help?




View Complete Post

More Related Resource Links

AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. - Error being thrown while building asp.net si


Everytime I build my site in VS2010 Beta I recieve a few ajax errors before the site loads here they are in order as they pop out on the build; 


throw new Error("AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the AjaxScriptManager in System.Web.Ajax.dll, or use the ToolkitScriptManager in AjaxControlToolkit.dll.");


And then Next this line is throwing an error, I have a watermark ajax field on the page that I created a long while ago;

Sys.registerComponent(Sys.Extended.UI.TextBoxWatermarkBehavior, { name: "watermark", parameters: [{name:"WatermarkText",type:"String"}, {name:"WatermarkCssClass",type:"String"}] });

 And then lastly;

 if (Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).get_IsWatermarked())


Even with these exceptions the page loads fin

Syntax error (missing operator) in query expression

Good Day Gurus!

I have a Excel user application which has a user form (named 'Registo') that displays criteria and an image that has been entered in it's corresponding spreadsheet. This works the way it should.  There's also the ability to search the spreadsheet via a form (by clicking 'Pesquisar' button) this opens a search form. However, I having a bit of a problem with it. When I try to search for something it basically doesn't do anything at all. It just sits there. So I tried to debug it and I think I'm having a problem with either the JET db engine or somethign with teh query or maybe I don't have the correct reference.

I 'borrowed' this Excel application from another forum because it's exactly what I'm looking for! However, I suck at vb.

So I was hoping somebody could take a look at the code and see if I'm missing something?  I'm kinda' desparate to get this working because I'm been trying to figure it out for days and I'm running out of time.  Cry
Option Explicit

'constantes para auxiliar na verificação do código
Private Const Ascendente As Byte = 0

BDC Column validation error in DIP



I have created a content type which has a BDC column along with other columns.

This content type is used in a document library. When the user adds a new document of this content type the system is asking for the extra data required for this content type and I am using AJAX to store data in the BDC Column fields.

The adding process goes fine and I am able to check in the document

Now if I check out the document and open it to edit it, a message is shown on the top of the document saying ' Required Properties - To save to the server, correct the invalid or missing required properties' along with 'Edit Properties' button.

When I click on 'Edit Properties' DIP is opening up and the invalid column is not highlighted. After some trial and error I found out that the problem is with the BDC column. When the cut the data from BDC column and paste it again and click on 'Check Item' the error disappears and allows me to check in the document.


Did anyone face any problem like this before. If so please help me out

Also I am new to BDC so please bear with me if I am missing something obvious.



Sharepoint list group by column data ,display in webcontrol like panel or label


I  have a sharepoint list[Managers] with groupby sector column. like below




Each Sector group by column data i want to display in label or panel control.

How to do that ? how to write the logic?



Regards, Mansoor

Trying to set Calendar Time Interval Using Calculated Column, but getting Error



So i was trying to use a calculated column that added 7 days to the start date of a calendar item. The calculated column worked fine because i checked with several tests. Then i tried using the Column as the End Time in the Time Interval Setting in the Calendar View. This broke Sharepoint. Not the normal graceful error im using to seeing from Sharepoint but the Server Error Page when a dump happens in a ASP page. I havent enabled the full error page because i assume its not like i can fix it, i dont have the source code.


Does anyone else experience this? If so is it a known problem and being worked on?




Bizarre Error. "Message: [Column Name]"


I'm getting a really strange error in my application when under heavy load.  The page(s) pull information from our SQL database and when this error occurs, I don't get a real error message.  Instead, the error information looks like the following:

Message: TimeZoneOffset
Source: System.Data
StackTrace: at System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName)
at System.Data.SqlClient.SqlDataReader.GetOrdinal(String name)
at System.Data.SqlClient.SqlDataReader.get_Item(String name)
at WebReport_mb_Main.GetTimeZoneDetails() in C:\Projects\WebReport\mb_Main.aspx.cs:line 260
at WebReport_mb_Main.Page_Load(Object sender, EventArgs e) in C:\Projects\WebReport\mb_Main.aspx.cs:line 38
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

So what does this mean?  More importantly, how can I fix it?  If no one knows the answer, does anyone have any ideas for what I can do to better search for thi

Trying to use distrib but gets error, invalid column name 'publisher'

I have a pull subscription setup between sql server standard 2005 and windows 7 sql server 2008 express. When I run the distrib exe I get the error "invalid column name 'publisher'". I have searched the internet for a solution to this problem and keep coming up empty. Can someone help me debug this error?

Expression in Report Column

Hi Guys, One of the column got expression and pointing out to other subreport using iff . However, it throwing me following error message.      An error occurred during client rendering. Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index I am using below expression  =iif(fields!Banner_Type_ID.Value  ="FWR","","Click To Show Business Owners") and underneath the field name red squally line appearing, when you move the cursor on that line it stats unknown collection member. But  that field name does exist in the dataset. Not sure why it appearing in red.  Can anyone shed some light please, thanks, D  

Error when using Computed Column

There are 2 errors that I  get when creating computed colums (Persisted) step1 first a created a UDF and i get the follwing error Msg 4512, Level 16, State 3, Procedure UdfGetMonthlyAmount, Line 77 Cannot schema bind function 'dbo.UdfGetMonthlyAmount' because name 'Subscriber.Reference.Period' is invalid for schema binding. Names must be in two-part format and an object cannot reference itself. It says there is a problem in this stmnt - SELECT @getFreqText = Name FROM Subscriber.Reference.Period WHERE Id = @frequencyId The UDF is as following: USE [Subscriber] GO /****** Object: UserDefinedFunction [dbo].[UdfGetMonthlyAmount] Script Date: 08/27/2010 12:55:00 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO create FUNCTION [dbo].[UdfGetMonthlyAmount] -- #description Returns the Subscriber's customized Forecast date as defined in Subscriber table -- #tables Subscriber -- #parameter: @SubscriberId ( @frequencyId int, @amount money ) RETURNS money WITH SCHEMABINDING AS BEGIN DECLARE @getFreqText varchar(38) DECLARE @monthlyAmount money --AVG DAYS = (365/12) --AVG WEEKS DECLARE @avgDays money = 30.4167 DECLARE @avgWeeks money = 4.3452 SELECT @getFreqText = Name FROM Subscriber.Reference.Period WHERE Id = @frequencyId IF (@getFreqText = 'Daily') BEGIN SET @monthlyAmount = (SELECT ISNULL(@amount,0) * @avgDays) END ELSE I

Cannot delete custom column in calendar list - 'unknown error'

I've created a column in a calendar list and now cannot delete it.  I've cleared all data and I still get the "Unknown Error" message when I try to delete. jan

XML Column containing single quote causes replication error

We have SQL Server 2005 transactional replication set up, and some of our tables have XML datatype columns.  We have run into an issue with the following error in the publication: Incorrect syntax near 's'. (Source: MSSQLServer, Error number: 102) Get help: http://help/102 Looking at the distribution database, I was able to extract the offending command, and it turns out that the XML column has a single quote (') embedded in it, and the command that was generated for inserting the row into the subscriber table has bad syntax because of the single quote (i.e., it is not escaped).  One interesting note is that the single quote happens to also show up in a non-XML column, and the command segment for that column was generated correctly (it was escaped). Is there a workaround / solution for this?

Error when creating PK to a column which has dupliacte columns..

The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'table name' and the index name 'PK__column__118068EB'. The duplicate key value is (D1).

How to Change the Color of Link Label which is a Datagridview Column on a Row Selection?

Hi All I have a Link label as one of the column of Datagridview & also my SelectionBackColor set to Blue. Is there any way that i can change the link label color on a particular row selection as now my selectionbackcolor & link label color is matching...I am unable to the contents of that link label column. Should i do this on design level or in code level? Pls Help

Error handling on Connection Manager Expression

I am using a connection manager with an expression to set the connection string. (see my question http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/1ea71f9a-df5c-4c1c-a2fd-9e24632afbd8) I would like to put some error handling just incase things go wrong. Can anybody give me some tips on where to place error handling?Mr Shaw

Cannot delete external data list column due "Parameter name: combinedEncoded" error

Hello!   I migrated a Sharepoint 2007 to a Sharepoint 2010 by dbattach method. And now I want to delete the BDC list columns, but I'm getting this exception: System.ArgumentException:   Parameter name: combinedEncoded    at Microsoft.SharePoint.BdcClientUtil.SplitStrings(String combinedEncoded) What should I do to delete properly this columns?   Many thanks!

Expression evaluation caused an overflow error when calling ExecuteResultSet(SqlServerCe.ResultSetOp

HelloWhen I call ExecuteResultSet(SqlServerCe.ResultSetOptions.Scrollable) I am getting the following error when the data type is Numeric(18, 4):Expression evaluation caused an overflow. [ Name of function (if known) =  ]The numbers involved are not that big and work fine when ExecuteReader() or ExecuteResultSet(SqlServerCe.ResultSetOptions.None) are called on the same SQL.Any ideas? Thanks in advance!Cheers,DaveCode:Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click        Dim errorDescription As String = String.Empty        Dim numericNumber As String = String.Empty        Try            Using sqlCE As New System.Data.SqlServerCe.SqlCeConnection("Data Source = '" & My.Application.Info.DirectoryPath & "\MyDatabase.sdf';")                sqlCE.Open()                Dim sqlCECommand As SqlServerCe.SqlCeCommand = sqlCE.CreateCommand()                sqlCECommand.CommandText = "SELECT SUM(MT.TPM_Measure1) AS CurrentAmount FROM BUS_Table MT"                System.Diagnostics.Debug.WriteLine(sqlCECommand.CommandText)                Dim reader As System.Data.IDataReader = Nothing                If RadioButton1.Checked Then                    reader = sqlCECommand.ExecuteReader() 'Works fine                ElseIf RadioButton2.Checked Then                    reader = sqlCECommand.ExecuteRe

Duplicate column error in script

Hello, I have a new database server and I created a new database and now I'm trying to run a script that's supposed to create all the tables from the previous database server. The script is an accumulation of various changes I have made to the old database since the start of the project in order to implement a variety of features, so it has this pattern: ALTER TABLE X DROP COLUMN Y; GO and later in the file: ALTER TABLE X ADD Y int NOT NULL; GO When I run the script, I get a duplicate column error message for the table and field, although I first dropped the column and then added it again. I suppose I have to do some kind of flash after the drop and before the add, but isn't the GO supposed to do that? If not, how can I flash it in the script? Thanks.  
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