.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

wrong calculation of the sum

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :Sql Server

Someone know why the total of my report don't include all the rows of the report

I have a SSRS report with VS2008 and the report contains 4 groups and in the first group have the value that i want show the total at the end, but i have the details of the group, and I've found when the details shows the value don't aggregate at the total.

Groupheader1 have this expression  =FormatNumber(Fields!OpenBalalce.Value,First(Fields!DecimalsGeneral.Value, "RptParameter"))


GroupHeader1 have this expression&

View Complete Post

More Related Resource Links

wrong Percentage calculation showing in pie chart

Hi,       Im using "#PERCENT{P2}" this one to calculate percentage in pie chart.  It should take 2 decimal only rite? But it is taking 3 decimal values. Example: 20.90678 After applying the formula "#PERCENT{P2}"  it is showing as 20.91 i want to show as 20.90 only pls help me Thanks in advance, Abdul2010

What is wrong with my calculation



The following query is lightning fast.

select non empty {measure.x} on columns,
select non empty {dimensions} on rows
from cube

Time              : 203 ms
Calc covers       : 8
Cells calculated  : 136
Sonar subcubes    : 4
NON EMPTYs        : 1
Autoexists        : 2
EXISTINGs         : 1
SE queries        : 1
Flat cache insert : 0
Cache hits        : 20
Cache misses      : 0
Cache inserts     : 0
Cache lookups     : 20
Memory Usage KB   : 1600

Then I create a calculated member to divide by 1000.
And its get very very slow.

with member measure.y as measure.x / 1000

select non empty {measure.y} on columns,
select non empty {dimensions} on rows
from cube

Time              : 29 sec 285 ms
Calc covers       : 37
Cells calculated  : 4153736
Sonar subc


How to calculate childs age,but when i enter childs age as '03/27/2007' it returns 3 years where as actual age is 2 yr 11 months

calculation, field and map traverse adjustment, and coordinate transformation

Free Pocket PC land surveying software -- COGO calculation, field and map traverse adjustment, and coordinate transformation -- for students and professionals.

Wrong Account being used to access files - Help - No Impersonation


I run a simple .aspx website on a Windows Server 2008 machine.

There is NO impersonation, and System.Security.Principal.WindowsIdentity.GetCurrent().Name returns NT AUTHORITY\NETWORK SERVICE, which it the account which the application pool runs. In my web.config, I have <authentication mode="Forms">.


I tried to test the security of the application and server by removing file permissions to the .aspx files. I was greatly worried when the website continued to run without problem (it should not have been able to read the .aspx files).

By turning on file level auditing, I discovered that the .aspx files were being read by the machine$ account (if the machine is called Serv1, then the files would be read by the Serv1$ account, which seems to have access to all files on the local machine).


Is this a security breach or is this behaviour by design ?

Please can somebody assist, as I am worried.

Whats wrong with this statement


Im trying to updated some old ASP pages with some new .net pages and cant seem to get this update statement to work. I need to update the current ASP code below and then once thats working im going to use that same statement in a procedure for all our new .Net pages..

So can anyone see what im doing wrong by inserting the 2nd column to the update statement?

strSqual = "update tas set date_completed='" & TransDate & ", trans_id=" & InsertedTransID & "' where date_completed is null and sercontract_id="& strContractID & " and DATEDIFF(dd,task_due_date,'" & strProcDate & "')<=14"


I am trying to add an extra column to the update, but not sure if the syntax is correct.

Usability in Practice: When Things Go Wrong


This month our usability experts explain what it takes to create informative, useful error messages.

Dr. Charles Kreitzberg and Ambrose Little

MSDN Magazine January 2009

Excel Services: Develop A Calculation Engine For Your Apps


The Excel Services architecture lets users design their own algorithms and share workbooks on a server.

Vishwas Lele and Pyush Kumar

MSDN Magazine August 2007

Wrong root, absolute paths '~' don't work.


Hi guys,

I have some kind of strange problem. I use Visual Studio 2008 Standard Edition, and whenever I use ~ in links (like PostBackUrl = "~/Admin/AddProduct.aspx"),  ~ is translated into "C:\DocumentAndSettings\User\Desktop" instead of my application root. Of course I dont have any project on Desktop. It happens in every project I run , even in project from pendrive which works properly on other computers.

How can i solve this problem ? What and where should i change ? I will be very thankful for any help.


Whats wrong with this code, im getting blue line under the createStatus next the switch

Error message: Use of unassigned local variable 'createStatus'
            MembershipCreateStatus createStatus;
            MembershipUser newUser = Membership.CreateUser(Username.Text, Password.Text, Email.Text);

            switch (createStatus)
                case MembershipCreateStatus.Success:
                    this.CreateAccountResults.Text = "The user account was successfully created!";
                case MembershipCreateStatus.DuplicateUserName:
                    this.CreateAccountResults.Text = "There already exists a user with this username.";
                case MembershipCreateStatus.DuplicateEmail:
                    this.CreateAccountResults.Text = "There already exists a user with this email address.";
                case MembershipCreateStatus.InvalidEmail:
                    this.CreateAccountResults.Text = "There email address you provided in invalid.";
                case MembershipCreateStatus.InvalidPassword:
                    this.CreateAccountResults.Text = "The password you provided is invalid. It must be seven characters long and have at least one non-a

Extended MySite: Profile picture uploading to the wrong zone.

I'm experiencing a problem where uploading a profile picture, in a MySite, uploads it to the wrong zone.

What I've done is created one web application and configured SSP to use that same one. As a result, the MySite host location is in that same web application:

Default Zone:
http://my.domain.com  <-- default SharePoint site.
http://my.domain.com/personal <-- MySite host

I then extended that web application to enable FBA & anonymous access:

Internet Zone:
http://extended.domain.com <-- extended default SharePoint site.

Now I"m able to navigate to a user's MySite using the extended URL (http://extended.domain.com/personal)...but when I upload a new profile picture in my MySite... it prompts me for new credentials because it's trying to upload to the Default zone (http://my.domain.com).

I found the following thread that talks about this...but there wasn't any resolution:

What is the best practices when configuring a MySite in an extended web application? How can I fix the situation I'm encountering above?

P.S. I tried to change the MySite Host location (via SSP in the Central Administration)

Published site - wrong links



we have published our sharepoint site outside domain.

Unfortunately big problems with links in document library appeared.

The url for outside users is "it.company.cz", the internal url is "sp001:55680".

When I open the page and select Shared Documents, the site is still it.company.cz. But when select any folder in document library the site url changes to sp001:55680.

Strange is that the mouseover url is correct but when I click it, it changes to internal url.


Mouseover url: http://it.compay.cz/Shared%20Documents/Forms/AllItems.aspx?RootFolder=%2fShared%20Documents%2fProjects&FolderCTID=&View=%7bBEBFF1D2%2d5910%2d4A36%2dB049%2d971F95E752E7%7d

After click url: http://sp001:55680/Shared%20Documents/Forms/AllItems.aspx?RootFolder=%2fShared%20Documents%2fProjects&FolderCTID=&View=%7bBEBFF1D2%2d5910%2d4A36%2dB049%2d971F95E752E7%7d

Please help.

Absence and vacation days webparts calculation



does any1 know if there is a webpart that can calculate an employee's vacation days. and when the employee request some vacation days it show the days that are left.

or is there a tutorial to create such a webpart?


CalendarExtender wrong date from database



I'm about to go NUTS :)

I have 2 CalendarExtenders on page. And I want to show the date that I get from SQL SEVER:

select -> SELECT convert(datetime,  begin) as Begin, convert(datetime, end) as End FROM Table

The date field, on base,  is a char(8)  and the record is like YYYYMMDD. That's why I convert it to datetime.

But, on code behind when I do this :

CalendarExtender1.SelectedDate = DateTime.Parse(objDataEvento.Rows(0)(2))
CalendarExtender2.SelectedDate = DateTime.Parse(objDataEvento.Rows(0)(3)) 

Depend of the date, It's showing minus 1 day on page.

Like: If, on base, the date is 08/12/2010, on page it's showing 07/12/2010.

WHYYYYYYYYYYYY ??????????????? Cry Smile




what am i doing wrong with this objectdatasource that the DetailsView never gets populated


I want to allow the user to view and edit their information.

So using another example i found online, i got it work, but the example was setup for you to provide the user name and search for the person, since you are already logged into the system i want to pass your username into the code so that on page load the DetailView is populated with your details.

                      <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataKeyNames="UserName" DataSourceID="ObjectDataSource2" Width="400px">
                                <asp:BoundField DataField="PasswordQuestion" HeaderText="PasswordQuestion" ReadOnly="True" SortExpression="PasswordQuestion" />
                                <asp:BoundField DataField="UserName" HeaderText="UserName" ReadOnly="True" SortExpression="UserName" />
                                <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
                                <asp:BoundField DataField="CreationDate" HeaderText="CreationDate" ReadOnly="True" SortExpression="Cre

How to make SSIS Package Fail when something goes wrong

Hello, Is there any way I can make the package (SSIS 2005) fail when something happen? Like: if some value become zero I will to make the package fail from with in the SSIS, so that the AgentJOB  that started this package will know? Thanks, Prabhat Nath

Problem with calculation in combination with crossjoin

Hi fellows   I dont know how to rewrite my MDX in order to get the correct result.    The following MDX statement is reduced to a minimum in order to explain my problem: WITH    MEMBER [Article].[Article].[Article_CE]    AS AGGREGATE ([Article].[Article].[Article_1], [Customer].[Customer].[Unknown], [Location].[Location].[USA])              SELECT       {[Measures].[SalesNet]       ,[Measures].[Budget] } ON COLUMNS ,       NON EMPTY         [Customer].[Customer].[Customer].members         * {[Article].[Article].[Article].members          ,[Article].[Article].[Article_CE]} ON ROWS FROM SALES   If i dont display the customer hierarchie " [Customer].[Customer].[Customer].members " on rows, then every thing works fine! As Soon as I add the above customer hierarchie to my mdx statment, then every thin works fine except for my member " [Article].[Article].[Article_CE]". Instead of showing only one row for customer "Unknown" (see Member definition), a row appears for each customer and with the same SalesNet and Budget.   Any Idea how to rewrite my mdx ?   best regards Pellito
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