.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

Grand Totals showing "Type MisMatch" error

Posted By:      Posted Date: September 01, 2010    Points: 0   Category :Sql Server
Hi All, I have created a calculated measure using Exponential and Datediff function, and the formula is shown below. ( (EXP((DateDiff( "d", CDATE([Time].[Date].CurrentMember.PrevMember.MemberValue), CDATE([Time].[Date]. CurrentMember.MemberValue)))/365.0 * [Measures].[CD Dec Interest Rate]) -1) * ([Time].[Date]. CurrentMember.PrevMember.PrevMember,[Measures].[Cummulative_Premium])   ) In the above formula what i am trying to achieve is finding the difference between previous date and current no of days in days and dividing it by 365 and doing some multiplication after that, When i deployed above formula all my row values are getting displayed correctly but all my grand totals are displaying as "#VALUE" and when i checked the error, it displays as TYPE MisMatch. Could some one help me in finding the problem in above formula. Thanks in advance.

View Complete Post

More Related Resource Links

Showing Designer error for Silverlight App when trying to access resource which contains code e.Resu

Environment is: Silverlight 4, VS Studio 2010. Designer is showing error in a Silverlight App when trying to access a resource as below. And there are no build or runtime errors. Extensive research found that, in the "InvestorsProvider" class I am using wcf services, which has a callback method. In the call back method I am using this statement "this.MyProperty = e.Result" where e.Result is ObservableCollection. If I remove the e.Result it is not showing any designer problem. <UserControl.Resources> <local:InvestorsProvider x:Name="investorsProvider"></local:InvestorsProvider> </UserControl.Resources> Here is the error System.Reflection.TargetInvocationException [Async_ExceptionOccurred]Arguments: Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.50401.0&File=System.dll&Key=Async_ExceptionOccurred at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() at SilverlightApplication9.ServiceReference1.GetInvestorsCompletedEventArgs.get_Result() in C:\Documents and Settings\mennis\my documents\visual studio 2010\Projects\SilverlightApplication9\SilverlightApplication9\Service References\ServiceReference1\Reference.cs:line 115 at SilverlightApplication9.Inves

overriding "grand totals" for calculated members

hi all, is there a workaround for overriding "grand totals" for calculated members?  (I cannot use the workaround whereby I create the calculation in the DSV or view directly due to it being a pretty complex Descendant parent/child calculation).   thanks much for any thoughts, Cos

Excel 2003 pivot table - parent showing grand total than the sum of its children

All, In Excel 2003, I have a product hierarchy, for simplistic sake lets say it goes A > B > C > model nbr.  I have filtered on model nbr 1.  I have the product hierarchy in my pivot table and unit cnt as the measure. Starting at level A in the hierarchy I am showing a total unit of 12000, if I drill down to B it still shows 12000, if I drill down to C it shows 100 and if I drill down to model nbr it shows me model nbr 1 with a unit cnt of 100. So my question is why are my parents not filtering the model nbr, it is taking the total for ALL records that have level A as their parent regardless of the model nbr? This does NOT happen in Excel 2007 or when I browse my cube in SSAS.

How do I get an error to stop showing up repeatedly?

I'm using a DatePicker in my WPF 4 app (my first WPF app).  This is meant to collect the date of birth of a client.  I've just this app out there for users to use, and the very first thing they did was enter a date of birth of 8/3/0983.  With the client standing right there in front of them.  Since it isn't likely that there's anyone alive today who is 1027 years old, I've got to put in a validation check. So I've been spending some time reading up on the best way to do this, and have come across the ExceptionValidationRule, which I've implemented.  Now, in conjunction with the class I've got that reflects the client's information, in the setting for the date of birth, I've got a couple of validation checks to make sure the client isn't older than is reasonable (yes, I know that's debateable, but let's not quibble over that now) and also make sure that the client's date of birth isn't in the future.  (One never knows what users may try to enter.)  I've tested it, and it works like a charm. But my problem is that, once my code detects that the user has entered an invalid value for the DOB, once the user corrects it, the validation check still thinks the value is wrong?!  Huh, how'd that happen, and how do I fix it, please?  Rod

TopCount and grand totals

Hey all, I've written a query to show top 20 product sales. How can I also show the grand total for all product sales? Thanks, Matt

Showing Total and grand total in rdlc

Hi All, I have RDLC report. My Detail report is bringing the data group by the criteria selected. For example I select the criteria Age. so all data with age 11 comes up, then all data with age 12 comes up.Till here I am able to do with stored proc but now what I want is, Say there are 4 rows with age 11,  I want total at the bottom of row to show 4. Then say there are 6 rows with age 12 , At the bottom of 12 age show Total 6. Then Grand total = 10 (4+6 ). How do I achieve this. Any Idea..I want something like (This one sorted by Contact Relationship) Child's Name Age Contact Name Contact Relationship    Agency Date Received Phil Drummond 16 Paul Berryman Family Member DCF 5/22/2008 Lawrence Higgins 1 Fredrick Pleasant Family Member DPH 7/12/2008 Paul Cote 9 Kittie Hawkins Family Member DCF 7/14/2008 Devlin Harris 11 Cheri Glasser Family Member DYS 9/19/2008         Total:  4 Robert Sherman 12 Ron Smith Social Worker DYS 5/3/2008 Brian Montgomery 5 Deice Drumgold Social Worker DYS 6/30/2008 Peter Zimmerman 16 Dale Everson Social Worker DCF 8/21/2008 Sean Johnson 17 Glen Mondale Social Worker DTA 9/17/2008         Total:  4 Roger Donoghue 17 Jesse Venture Unknown DYS 6/30/2008 Kevin Draper 14 Gary Forester Unknown DYS 8/27/2008       &nbs

Error While Showing data in Combobox




I am developing a WPF appliction in .net 4.0 which has got one user control. For simplicity, this user control has got only one combox which gets its value from view model's observable collection. This observable colletion is populated via a call to EF entity which gets its data from a view. The combobox's itemssource property is bound to the observable collection with necessary values in SelectedValuePath and DisplayMembePath.

Now when I run this application, the combox does populates the list but instead of showing individual item from the view it just repeats the first item returned by view for total number of rows in the view. For eg.g

Combobox should show following




Instead it is showing




I tried everything but still not able to find the solution. Is it somekind of bug in WPF comboxo or I am doing something wrong.

PS: The view internally uses Union in order to join multiple values. The Query for the view is as follows


Windows WCF client with internet proxy server showing error The server committed a protocol violatio


Our team trying to create a windows application(c#) to call a WCF service using internet proxy server

Showing exception "The server committed a protocol violation. Section=ResponseStatusLine" while calling WCF service

Please give suggestion to solve this problem/any alternative solution


//Code for creating proxy
public static DevicesServiceClient CreateProxy()
var proxy = new DevicesServiceClient("BasicHttpBinding_IDevicesService");

BasicHttpBinding binding = new BasicHttpBinding();
.Security.Mode = BasicHttpSecurityMode.None;

WCF client with internet proxy server showing error The server committed a protocol violation. Secti


Our team trying to create a windows application(c#) to call a WCF service using internet proxy server

Showing exception "The server committed a protocol violation. Section=ResponseStatusLine" while calling WCF service

when i tried to solve the problem using this code then showing the same error


<httpWebRequest useUnsafeHeaderParsing="true" />


Please give suggestion to solve this problem/any alternative solution


MDX Grand Totals


I asked this question a while back and got a response at the time from Javier that I thought would do the job - and it does to a degree - but I need a more dynamic approach....

Its to do with always using the subtotal for a calculation of the currently expanded dimension - rather than the total for the row..

Here is my problem....

I have a calculation that basically just divides faults by machines to give me a faults per machine figure...

For example - see the below data...


Fault Area Description Machine Builds Count Inspection Failure Count Faults Per Build (Total Builds)

Error showing subreport... due to user access?


I am experiencing a strang issue in SSRS 2005.

a) I have a MainReport that contains a SubReport and I deploy these up into Report Manager into a folder called MyFolder.

b) MyFolder has restricted access so only I can access it via ReportManager.

c) I ceate a linked report for each report: LinkedMainReport and LinkedSubReport and move these linked reports into a folder called YourFolder.

d) YourFolder is restricted to a Windows AD group... called ManagerGroup.

e) Report Manager folder structure now looks like this:

MyFolder (my access only)
- MainReport (original report)
- SubReport (original report.. and set to be hidden)

YourFolder (ManagerGroup and my access)
- LinkedMainReport
- LinkedSubReport (set to be hidden)

f) Security from the folders is applied to each report and link report by default.

g) ManagerGroup contains say 3 users: Homer, Lisa and Bart.

Homer and Bart can run the report "YourFolder -> LinkedMainReport" without any problems.  The main report and subreport embedded within it run fine.  The problem I have is when Lisa runs the same report "YourFolder -> LinkedMainReport" she sees the main report but gets the "Error showing subreport" message where the subreport is usually display

SharePoint Form Authentication site showing Error for few actions in Picture library.


I have extended my web application (with zone Extranet) and enabled Form Authentication, Enabled Client Integration and SSL.

My problem is: In my picture Library 

     1. Actions - Download/Send to actions are not working, getting error message: "Picture Manager is unable to open   pictures over the internet that are not from a windows SharePoint Services picture Library. Please specify a valid picture library and try again".

    2. Actions - Open with Windows explorer getting the error message:"Documents in this folder are not available. The folder may have been moved or deleted, or network problems may be preventing a connection to the server".

   3. In the Explorer view i am getting : "Please wait while Explorer View is loaded. If Explorer View does not appear, your browser may not support it".

But when I open the same library and do the above actions in default zone (port 80), it is working perfectly.

I have SharePoint service pack 1 and infr

Code working in Xp bur showing Error in Vista


Hi all.


I am saving two data, One is date and other one is time in SQL server 2005 using asp.net ( VB.net).

I am saving this using following command:

cmd.commandtext = "insert into TABLE1 values ('" + Now.toshortdatestring + "', '" + Now.toshorttimestring + "')"


now while i am using this code in Windows Xp its working properly but in Windows VISTA it is showing some "Data Conversion Error  from string to datetime". 

If i remove the single quotes [ ' ] from the command it is showing error in the value of date and time.

thanks all



"Windows SharePoint Services Web Application" service is showing 'Error starting'.


I just installed MOSS SP2 and ran the config wizard on the server.
I am facing issue with our farm. Found that "Windows SharePoint Services Web Application" is in a problem.

I tried below commands:-
stsadm -o provisionservice -action stop -servicetype spwebservice -servicename ""
stsadm -o provisionservice -action start -servicetype spwebservice -servicename ""
But getting error:- Provision of service failed. Additional information: 1387.

Checked eventvwr and found below error log:-
Event Type: Error
Event Source: Windows SharePoint Services 3
Event Category: Topology
Event ID: 7034
Date:  10/21/2010
Time:  5:16:10 AM
User:  N/A
Computer: <Servername>
An attempt to start/stop instance  of service Windows SharePoint Services Web Application on server <servername> did not succeed. Re-run the action via UI or command line on the specified server.

None of the sites are working and I cannot see anything in the IIS folder nor in the IIS manager. All application folders are missing. But, I can see all the sites & Content databasesin the Central Admin.

Can someone please help?


Showing #Error in SSRS adhoc report


Hi ,

Im facing one issues by using Varbinary data type field in ssrs adhoc report.

While running it is showing as #Error in the adhoc report.

Pls help me how to solve.







User control showing error


I'm using an user control named as QuickQuote.ascx . Inside it, I have defined some property like BusinessName, StateName etc. For reference I'm showing one property.

         int _BusinessName;
        public int BusinessName
                return _BusinessName;
                _BusinessName = value;


I've registered this user control as follows (so that no need to register again & again in all aspx pages where that user control is used).


Showing Custom Error Page using asp.net mvc


Hello Friends,

I am showing Custom Error in my page.. if somehting happend wrong. but if the same error occured in my subview master page I am not able to show the Custom error page on Entire page its showing me that Error page under subview master page. Please I am attching the Screen shot.

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