PeterVrenken's Q&A profile
SQL Server Report Layout - forcing absolute position
Greetings, I have a report with all of the required data, but am having trouble with the positioning of the elements. The report has header-like, body and footer-like sections but I am forced [I think] into using only the body section of the report since SSRS won't let me put fields in the header/footer area (msg: fields cannot be used in headers or footers). btw - my report is always one page... never more. The center section (a table) may change in number of rows, but it will always fit on the page. So -- easiest way to ask this is: how can I lock the position of a field (or text box) to ensure it will always be in the same spot (acting like a header / footer) Thanks in advance. I ...Show All
Visual Studio Tools for Office Problem with punctuation after a control inserted at runtime.
I have a document template that I am working on. I am inserting a Windows Forms Button conrol into the template as shown below: This is a sentence [Button]. That all seems to work fine and appears normal as I save off the template. I am using this code to inser the button into the DOT, straight from one of the examples that ships with VSTO: private static void InsertControlAtSelection ( Control c , string name ) { object horizontal = false ; object vertical = true ; Word. Range selection = Globals.ThisDocument.ThisApplication.Selection.Range ; c.Name = name ; if ( selection != null ) { // Save the control extender as a tag on the control, so that ...Show All
SQL Server Slowly changing dimension:inferred members update
Hi, Anybody who knows how inferred members update function in slowly changing dimension I came across this when I started using some of the functions of the Slowly changing dimension object. Thanks! cherrie The inferred member enables you to have a Slowly Changing Dimension which is treated as Type 1 when the inferred member flag is true, and Type 2 otherwise. http://msdn2.microsoft.com/en-us/library/ms186969.aspx Donald ...Show All
.NET Development Please help me! Anybody can tech me how to write a [WebMethod] that can search Database(ServerSide) and return infomation!
Hi all, thanks for come in!! My problem is: I write a web sercive which have two method, GetFreinds and GetFriend. GetFreinds Method can return all friends infromation from database when invoke this method, I use DataSet to do this and it works! [WebMethod] public DataSet GetAllFriends() { // Step 1. Create the connection string and command string string connStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + this.Server.MapPath("Friends.mdb"); string comStr = "Select * from Friends"; &nb ...Show All
Visual Studio Express Editions Another Problem
Hi, I was wondering if there is anyway to turn a huge amount of code into a simple function. Right now I have a bunch of check boxes and they are all named C1-C7 and W1-W7, instead of putting in code for each one when clicked, which results in a large amount of code, is there anyway I could make one function to handle all of these. I tried something like this. If C(num).checked=true then W(num).checked=false endif its just a basic example of what i want and i could really use this later on. Thanks The code Dim ckBox As CheckBox = sender ckBox.checked = Not ckBox.Checked makes an infinite loop, but now i know how to use sender which should be very useful, thank ...Show All
.NET Development Download problem with ftp..
I am trying to download a file from the remote server, sometimes the download is fine, all the bytes of the file gets downloaded while sometimes most of the file gets downloaded and it breaks at bytesRead = responseStream.Read(buffer, 0, buffer.Length); // responseStream is object of Stream; //int bytesRead for the last few bytes it syas: "The underlying connection was closed: An unexpected error occurred on a receive." the below is code snippet where the file is looped through for reading and downloading the bytes. while (true) { // my bufer is 1024 bytes. bytesRead = responseStream.Read(buffer, 0, buffer.Length); if (bytesRead == 0) break; fileStream.Write(buffer, 0, bytesRead);//fileStream is object of FileStr ...Show All
Visual Studio Express Editions function returns
*Edit* how do i separate the code from the actual text Hi. i'm reading about classes and how to create fields, properties and methods so far i'm doing just far everything seems strait foward but one thing that i bumped into... a function must return a value in visual basic but in this example (http://msdn2.microsoft.com/en-us/library/f8f40dwh.aspx) Private Function CalcAge( ByVal year As Integer ) As Integer CalcAge = My.Computer.Clock.LocalTime.Year - year End Function is CalcAge actually the equvalent of return CalcAge; This was the only way to return a value from a function with VB6 or earlier. That's why it remains. Additionally, it gives you greater versatility: you do not need to 'return' fr ...Show All
SQL Server Advice???
hellooo I have an Accounting system(vb.net 2003, SQL server 2000), every new year data is cleared, but i may use some data from previous years (such as liabilities) whats the best way to that -Shall I create programmatically a new clone DB every year (new DB with same structure as previous year) OR -Shall I add a "year field" for tables in DB knowing that data will keep growing every year whats the best solution, knowing that i dont want the end user of my application to do anything manually, such as creating DB ...... Thank you I dont wanna delete anything, I want at each beginning year to create a new DB(same structure as previous year) and may use some Data from pre ...Show All
Windows Search Technologies Why don't see results sometimes, it opens C:?
Sometimes when start to search something and click enter, or just open something with left mouse click from deskbar history don't display results, it opens to me C: from windows explorer ! The next time is ok. But for few days it happens often and piss me off. Windows XP Pro SP2 + all updates Windows Desktop search 3 KB917013 ...Show All
Visual Basic how to read all file name in a folder
i want to read all file names in any folder and store in the excel file so how i can do this The easiest solution would be reading all filenames in a folder than write those in a separate .csv file so Excel could easily read it: Dim files() As String = System.IO.Directory.GetFiles( "c:\myfolder" ) Dim text = String .Join(Environment.NewLine, files) System.IO.File.WriteAllText( "c:\files.csv" , text) Andrej ...Show All
Visual Basic INSTALLED NEW MACHINE, NEW OS, NEW SQL SERVER, NEW IIS, NEW VS - STILL SAME PROBLEM
OS: WINDOWS XP Pro V2002, SP2 SQL SErver 2000 Developer Edition w/service packs .NET SDK Installed Visual Studio 2003 7.1.3088 Framework 1.1 vers 1.1.4322 MDAC 2.8 DATA LINK DIALOG WINDOW APPEARS and only lists OLE DB data providers. I am out of ideas and have searched long and hard. I cannot upgrade to 2005 at this point and framework 2.0 Ok, BRUNO. I just went to a machine with both VS 2003.net installed and VS 2005. When I used server explorer in 2005 it works. If you right-click on server explorer on 2005 a window displays the .NET Data Provider for .NET and allows you to select it. Once selected you can ADD, EDIT, DESIGN views, stored procs, tables and everything in Visual Studio. Now, why ( ...Show All
Visual C# Send a String to another application
Ok I have a program that logs me into World of Warcraft at a specified amount of time, but to send the username and password I use the SendKeys.Send("string"), and I was just wondering if there was a better way to do this. Is there any way that I can get the text boxes handles and just pass them the values If it's an actual window (not directx rendered) you can get the handle to the window using: Process p = Process.GetProcessesByName("wow.exe"); IntPtr hwnd = p.MainWindowHandle; You probably don't want the main window though, you can use this to get the foreground window if you know it'll be up: [ DllImport ( "user32.dll" )] //gets the handle to the foreg ...Show All
Visual Studio 2008 (Pre-release) PeerChannel PNRP LinkLocal IPv6
That's a lot of topics for one subject line, but then I have a lot of questions. :) I notice that when I use a net.p2p address with PeerChannel that it uses the Global cloud. If I want to register a mesh as LinkLocal only, is this possible with WCF If not, then it seems a possible solution (depending on the application) would be to publish a global cloud name that only a local subnet would be likely to derive. Not being an IPv6 guru myself, is there something I can use on a given link that every member of the link would agree upon without first having communicated with each other Perhaps a custom resolver would be a better solution Finally, is it possible to use a secure PNRP name with the PeerChannel or does it always prepend &qu ...Show All
Visual Studio Tools for Office Word and line command argoment
Hi, Sorry for my english! I would to read some arguments that I send to a word document on command line. Some could help me hello & thanks Ivan Hi Ivan Please show us the code in the vb.net application you use to open the VSTO document. Can you describe what Word should do with the information you're passing ...Show All
Visual Studio Team System TFS Warehouse Processing Error
First up, I have deviated slightly from the stock TFS install because we prefer to use Kerberos rather than NTLM for authentication. To that end, all TFS services and app pools are running under a domain account and SPN's for the HTTP service (both NETBIOS and FQDN) have been registered under that account. C:\>setspn -L DOMAIN\TFSSERVICE Registered ServicePrincipalNames for CN=tfsservice,OU=Service,OU=Generic Accounts,OU=User Environment,DC=domain,DC=company,DC=com: HTTP/SERVER1 HTTP/server1.domain.company.com All was working well, until recently when the warehouse process packed up. Processing was generating this error in the Windows Application Log: Event Type: Error Event Source: TFS Warehouse Event Category: ...Show All
