MessiahAndrw's Q&A profile
SQL Server Running value
Hi In my report I have the total column,under the total i have two sub fields:no , Row%and i have another column Cumulative total sub fields are no,***% For the Row % under total i write like this: =Round((Fields!Male.Value+Fields!Female.Value+Fields!Unknown.Value+Fields!Invalid.Value)/Sum(Fields!Male.Value+Fields!Female.Value+Fields!Unknown.Value+Fields!Invalid.Value)*100,2) For the *** % under cumulative total the expression is: =RunningValue((Fields!Male.Value+Fields!Female.Value+Fields!Unknown.Value+Fields!Invalid.Value)/Sum(Fields!Male.Value+Fields!Female.Value+Fields!Unknown.Value+Fields!Invalid.Value)*100, sum , "AgeByGender" ) But i am getting this error: The Value expression for the textbox '* ...Show All
Visual Studio Tools for Office How to search for GlobalAppointmentID?
Hi All, How do I search for AppointmentItem using GlobalAppointmentID There's not much info in MSDN docs on that. How global this ID Is it unique accross of all Calendars in the Exchange or just inside of a particular Calendar Thx... Alex So, how global is the GlobalAppointmentID Is it unique accross all calendars How different the GlobalAppointmentID from EntryID What's the usage one vs another Thx... Alex ...Show All
Visual C# Converting Double To Integer
Anyone know how to convert double to integer Thanks, Rob I was a little confused about what you meant by "real/true," since the direct cast also converts it to a real integer. From MSDN, it seems that Convert.ToInt32 rounds to the nearest even number when it converts, as opposed to the truncating behavior of casting to int. Personally, I have used the direct cast much more often, in the few situations where conversion is required. ...Show All
Smart Device Development drop down loses value
I have ported an app from vb.net03 to vb.net 05 for windows mobile 5. 1 issue that I haven't figured out is when you choose a value in a drop down the Text stays highlighted. The problem is if you go to the next form after choosing the value, that value is lost. I have tried changing the focus on the page to another control in the selectindexchanged function but the value goes back to null in the drop down control. Anybody else have this problem I am not saving any of the information on the page yet (the controls and the form stay in existence while the user is on the 2nd page), not until the user saves or cancels the actions of the 2nd page which brings the user back to the first page with the informatio ...Show All
SQL Server how to limit number of rows showing each page?
Hi All, i couldn't find how to set up the number of rows displaying on each page i wanna each page display 20 rows. Thanks Nick There's no explicit way of doing it, but it can be achieved by placing your table inside a list control then add a grouping with the folowing expression: = Ceiling(RowNumber(Nothing)/20) Make sure you check the page break at end option. ...Show All
Smart Device Development Hide textbox cursor
Hi! I have an application in which I use a textbox merely to display data so I have no need for the cursor. Does anyone know a way of hiding it Thanks Why don't you use a Label control instead of a text box If it's because you like the look of a text box, just set the lables BorderStyle to Fixed3D and change the background to White ...Show All
Visual Studio 2008 (Pre-release) UsernameToken over Certificate authentication
I need to use client certificate to validate the domain of the request and user name token to validate the user in that domain. I know that this is a classic case for federation but lets ignore that for the purpose of this post. So the first authentication of the request was through certificates, which was relatively easy. Instead of passing user name and password as arguments to a method, I would like to send a user name token in the request. On the server side, I would like to validate the user credentials in the WCF plumbing. How would I go about doing the second part given that it has to happen right after the first part Thanks. You can do this by adding a UsernameSecurityTokenParameter to the binding's request token parameters ...Show All
Windows Forms DataGridView in CWinFormsControl hangs after ALT + TAB
I am developing a DataGridView control in Virtual Mode on a UserControl using the code in this article http://msdn2.microsoft.com/en-us/library/15a31akc.aspx Then it is hosted in an MFC dialog using the code in this article http://msdn2.microsoft.com/en-us/library/94t3ebxz(VS.80).aspx So far so good and everything works pretty much as it should. However if you ALT + TAB off to another application halfway through editing a cell the application hangs e.g. if you type 4 and then ALT + TAB. If you ALT + TAB to another application at any other stage there is no problem e.g. if you type 4 then click on another area of the UserControl and then ALT + TAB. Has anyone ever had any similar behaviour and if so what fixe ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Collision Detection
Hello, I would like to create a collision detection function to test if the bounding sphere of one of my meshes (the player, for instance) is intersects a triangle in another model (the level). How would I go about running a for loop that checks each triangle of the level And from there, what would be the best algorithm to determine if the BoundingSphere is within the triangle Any help is greatly appreciated. Perhaps we need more information. What is a "level" that you refer to Landscape other objects If landscape, are you using a Model for it A model has ModelMeshes that contain the vertex buffer for all its MeshParts. You would need to transform them (from model space to world ...Show All
Visual C# Switch statement
Hi, all: [I guess this could be considered a rant, but I'm still curious if anyone shares my opinion on this] I am still wondering why the switch statement is not more flexible. For example, I feel that a switch statement using objects makes sense. I'll give a more visual example for ease of understanding more than anything else, so picture this: I have three buttons on my form, button1, button2, button3. I set the click event to the same event handler, button_ButtonClick. Inside the button_ButtonClick method I want to check the sender to see which button was clicked, so I do this: switch (sender) // or even (sender as Button) { case button1: // do something here break ; case button2: // do somethi ...Show All
Visual Basic Listview remove multiple items
I everyone... i've got this code to remove all selected items in a listview... but i like to know if there is any more simple code to do this ... My code: Dim i As Integer With frmMain.FeedsList For i = 0 To .Items.Count - 1 Try If .Items(i).Selected = True Then .Items.RemoveAt(i) i = i - 1 End If Catch End Try Next End With Thanks Like i said...this code is working fine... i only want to know if there is other simple way to do this... In listview, i've got Remove, RemoveAt and RemoveByKey, but no one can use a range of items... my question is: In a listview, can we use a array of selected items to remove at once Than ...Show All
Visual Studio Tools for Office How to check whether a valid Edition of Office 2003 is installed on a machine?
I'm building a VSTO word cutomization and have had problem with clients having Ms Office 2003 Standard Edition that do not support VSTO word customizations. I know that the supported Word version is Standalone Word 2003 or Office 2003 Professional Edition but how can i check that during installation I'm using a setup project to deploy my customization and I'm using prerequisites and Launch conditions to check for .Net Framework 2.0 and VSTO runtime. /Daniel Hi Daniel, You may want to check out this link http://msdn.microsoft.com/library/ url=/library/en-us/odc_vsto2005_ta/html/OfficeVSTOWindowsInstallerOverview.asp Which would tell you how to add the check to setup Thanks and regards ...Show All
Visual Studio How to create a EnvDTE.Command in a VSPackage
How can I create an EnvDTE.Command in a VSPackage (not an addin) I have the following code but it requires an instance of an Addin EnvDTE80.Commands2 commands = (EnvDTE80.Commands2)dte.Commands; object[] contextGUIDS = new object[] { }; EnvDTE.Command myCommand = commands.AddNamedCommand2( dte.AddIns.Item(0) , "Mycommand", "Mycommandbuttontext", "Executes the command", true, 59, ref contextGUIDS, (int)EnvDTE.vsCommandStatus.vsCommandStatusSupported + (int)EnvDTE.vsCommandStatus.vsCommandStatusEnabled, (int)EnvDTE80.vsCommandStyle.vsCommandStylePictAndText, EnvDTE80.vsCommandControlType.vsCommandControlTypeButton); The dte.Addins.Item(0) is empty of course as I do not have an Addin, how can I get around this ...Show All
Visual Basic move, swop, sort
hello i have written a piece of code, and have obvioulsy done soemthing wrong as it's not working right. it is supposed to sort a list of names and scores into order, but it just repeats the last line, and i don't know why. i'd be greatful for any words of wisdom form anyone out there my code is: Dim Players() As String Dim total, score, handicap, i,HoleNo As Integer Private Sub Form1_Load( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase .Load Listdisplay.Items.Add( "NAME" & Chr(9) & "HANDICAP" & " " & "TOTAL" & " " & "SCORE" ) Players(0) = "Andy" h ...Show All
SQL Server Validation queries running too long
I have a table that contains approx 200 thousand records that I need to run validations on. Here's my stored proc: [code] CREATE PROCEDURE [dbo].[uspValidateLoadLeads] @sQuotes char(1) = null, @sProjectId varchar(10) = null, @sErrorText varchar(1000) out AS BEGIN DECLARE @ProcName sysname, @Error int, @RC int, @lErrorCode bigint, DECLARE @SQL varchar(8000) IF @sQuotes = '0' BEGIN UPDATE dbo.prProjectDiallingList_staging SET sPhone = RTrim(LTrim(Convert(varchar(30), Convert(numeric(20, 1), phone)))) END ELSE BEGIN UPDATE dbo.prProjectDiallingList_staging SET sPhone = phone END --2. Remove quotes UPDATE dbo.prProjectDiallingList_staging SET sp ...Show All
