Marek Istvanek's Q&A profile
Visual Basic printing multiple paged documents
I am trying to print a list from 4 arrays with the code below. The arrays all have the same number of items so that their indexed values are printed on the same line. There are 50 entries for each array. I want no more than 35 lines per page. I have run the code below as well as some variations of it, and I can only get one page with the first thirt-five lines printed. I can’t get the second page with the remaining 15 sets of information to print. Can someone give me a clue as to what I need to do print the complete set of lines, 35 on page one and 15 on page two Here is the code. Private Sub PrintCashGiftsButton_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrintCashGiftsButton.Click ...Show All
SQL Server How to subtract previous value of one column from current value of another column
I have a table like this: Bottom Top 0 2 4 6.5 9 14 1 5 17 In Transact SQL I need to calculate the difference between the current bottom and the previous top. If there is no previous top, then the result would be the current bottom. So, the result would be 0, 2, 2.5, 1 I must return the value in a table. Thank you all for your help! Karen NNTP User wrote: Karen, If you are using SQL Server 2005, you can take advantage of the new analytic functions more or less like this: create table T( primary_key int identity(1,1) primary key, bottom decimal(10,2), [top] decimal(1 ...Show All
SQL Server For XML Path
im using the ROOT directive in association with FOR XML PATH to return results. When the query returns no records then I get no root node either (which makes the XML invalid). Is there an attribute that specifies that the root node should always be returned (even when empty) i.e. <ROOT /> thx i agree BUT :) that does mean that anything that uses the resultset requires a condition to check if it is Null and either 1)do nothing, or 2) subsitute it for what would be valid xml i.e. an empty parent node eg <Root /> i think a lot of applications would require number 2, and therefore think the XML functionality of sql2005 should have this built in. ...Show All
Smart Device Development how do I disable the iTAP in a textbox
Using: vb.net for windows mobile 5.0 ( Visual studio 2005) Smartphone Motorola Q I have a textbox and I want the iTAP not to come up just in that textbox. iTAP lets you enter words as you type, they appear in a drop down list. Any Ideas Code snippet would be nice ( with imports if needed) Using: vb.net for windows mobile 5.0 ( Visual studio 2005) Smartphone Motorola Q I have a textbox and I want the iTAP not to come up just in that textbox. iTAP lets you enter words as you type, they appear in a drop down list. Any Ideas Code snippet would be nice ( with imports if needed) ...Show All
Visual C# Managed Code Vs Unmanaged Code?
I have read a lot on managed code and unmanaged code,now what I could understand is that any code that targets the .net framework is Managed code (right ),which inturn means its under the control of the CLR @ runtime. Assuming the above as true, I suppose unmanaged code does not target the framework or it does not come under the control of CLR @ runtime Can somebody explain this if possible with code example so that I can undersand the difference...thx. Hi, For .net interop you can reference to: http://www.dotnetinterop.com/ Otherwise, I recommend you separate further questions in new threads, in that way, more people can see and answer it. Thank you for understanding. ...Show All
Visual Studio 2008 (Pre-release) can spellcheck dictionary customizable
richtextbox support spellchecking by using their built In dictionary. So, can I update or change this dictionary Is it support for other language spellcheck ( other than US-en) Is it depends upon the culture setting of the application.. Cheers, Kahn So am I to understand that there is no way to add a custom dictionary for use with the SpellCheck ... and that there is no way to change the way it notifies you of spelling errors (like, say I wanted to highlight the entire word) Because that would be a real shame. ...Show All
Visual Studio 2008 (Pre-release) DLinq.Table<> does not contain a definition for 'Where'?
Hello, I'm experimenting with DLinq, May CTP in C#. I created entities for a subset of my db with the designer in a LINQ Library project. Now I want to query the data (in the same assembly) but get a System.Data.DLinq.Table<Data.ItemConfiguration>' does not contain a definition for 'Where' compilation error . Here is my query: int saleItemId = 1; KioskDatabase db = KioskDatabase.Instance; ContextService contextService = ContextService.Instance; Context currentContext = contextService.Current; var q = from config in db.ItemConfigurations where config.SaleItemId == saleItemId && config.ModeId == currentContext.ModeId && config.RevenueCenterId == currentContext.RevenueCenterId s ...Show All
SQL Server Getting "Report Server WMI Provider error: Not Found" while configuring Reporting Sevices Integration WSS 3.0 and Sql 2005
I'm Getting "Report Server WMI Provider error: Not Found" when trying to Grant Database Access while configuring the Reporting Sevices Integration. Logging in fine to the DB. Tried all the WMI troublshooting and can't find any issues there. Any tips Many Thanks!! So sounds like a bug; I'll look into reporting it as such and maybe it'll get addressed in the next release. Guess that's what CTP's all about. Oh well, at least it seems it wasn't my screw-up for a change :) ...Show All
Visual Basic COM Interop question
Hi, I have a Enertrprise MDI form written in VB 2005. This Enterprise MDI form, calls child forms are also in VB 2005, but are dll's with a gui interface. I have a customer support MDI form which is in VB6. This Customer Support MDI form needs to call the vb2005 child forms, and pass parameters to it. After the child form is closed, the parent MDI (written in VB6) needs to be refreshed. Is my best option to write a CCW I am concerned about how to refresh the VB6 MDI form, after the child vb2005 form has closed (or for that matter, pass other information back to the VB MDI form). Any detailed advice is appreciated Ok. How do I actually "wrap" the GUI dll into this wrapper Can yo ...Show All
Visual Basic Updating a Record in a Database Based on Another Record
When a user enters a record for an existing item, I want to find the last entry in the database and update the Date out to the current time. Basically the database would contain the following fields: DateIn DateOut - hidden in form Process Item If the item doesn't already exist, the initial entry will be DateIn, Process and Item. If the item exists I want to create a new entry and update the DateOut for the last entry of item. I say last because there will be multiple entries of item. What's the best way to i dentify the last entry for item while entering the current data. Feel free to offer better process if you have one... When ever you are working with m ...Show All
Microsoft ISV Community Center Forums Worksheet.Copy causes execution to stop
Hi I am experiencing an odd behaviour from my VBA code in Excel. I have some code that has worked until recently. We have gotten XP instead of win2k, which i could suspect is causing this in some strange way. My problem is that i have the code below. In the line where i say Worksheet.Copy, the execution simply stops. No errors appears, nothing. <CODE> On Error GoTo ERROR: Worksheets(SN_MonthYearAct).Copy After:=Worksheets(Worksheet.Count) .... ERROR: MsgBox(Err.Description) </CODE> The variable SN_MonthYearAct is a constant containing the string "MonthYear Act", and a sheet with this name does exist. Worksheet.Count returns currently 8, and there are 8 sheets in the workbook. I have trie ...Show All
Visual C# Page Output Caching : Duration
Is there a way to set default duration for Page Output Caching. I want to have same duration across pages. Need not specify duration on each page. Thanks Ram You can use the outputCacheProfiles element in your web.config, here's the msdn page detailing its usage: http://msdn2.microsoft.com/en-us/library/ms228244.aspx You'll still need to add the corresponding directive to each page you want to use the setting you specify there, but at least you'll be able to update the value in one place after that. Hope that helps ...Show All
Community Chat I can't believe most Windows users don't know how to use toolbars, OMG.
This is most irritating. Almost all of Windows users in my company don't know how toolbar works. They don't know they can enable toolbar, take out toolbar, customize toolbar, and not even the simplest of all, move toolbar around. Toolbar is so simple, standard, and flexible. And yet, they don't know how to use it. And now, I think that's the main reason why IE7 doesn't support moveable toolbar, and that pisses me off even more. Argh. I remember when toolbars first started coming out, they were a real pain in the arse if you accidentally moved things around and lost "icons" for features you wanted to use. Also, I have seen many apps go back to the default setup. Who wants to setup your toolbar ...Show All
Visual Studio help with basic crystal report query
I am using this to connect to a database, run SQL query and view a report but not getting what i want.. I am sure that this is not the best way to do it but I am new to Crystal Reports.. can anyone tell me what's the best way to do it connection.DatabaseName = "TEL_DATA" ; connection.ServerName = "192.168.96.3" ; connection.UserID = "sa" ; connection.Password = "123456" ; IVReport.Load( "c:\\temp\\CrtRep.rpt" , OpenReportMethod .OpenReportByTempCopy); foreach (CrystalDecisions.CrystalReports.Engine. Table table in IVReport.Database.Tables) { // Cache the logon info block TableLogOnInfo logOnInfo = table.LogOnInfo; // Set the connection ...Show All
Visual Studio Team System Bug status in Team System
In Team System, is there a way to edit the fields under Status For example Priority is a status that shows up with numbers. I would like to be able to modify it so the number displays something else, 1-cosmetic, 2 -minor/work around, etc... thanks, aaron In Team System when you add a new bug there is a area called status which has a number of parameters such as Assigned To, Priority, State, Reason and Triage. We want to be able to edit the information in the drop-down boxes. For example under Priority there are numbers. We want to be able to add text next to the numbers. thanks, aaron ...Show All
