Answer Questions
prolix21 Report: Counting / totaling groups.
Is there any new fetures in VFP report designer which will allow me to easily count the group bands I have some reports which I need to show the number of items in one of the group bands (In other words the number of times a group band is printed). Thx. Thanks Tamar; I thought maybe things are different in 9.0 Aleniko There's nothing new for this. You can do it the same old way, with a pair of report variables. One keeps count and the other tracks the current value of the grouping variable. Set it up like this: Name: nGroupCount Initial Value: 0 Value to Store: IIF(uGroupVar = <the grouping expr>, 0, 1) Calculate: Sum Name: uGroupVar ...Show All
adel james Multiple Child table
What can i do in add button if i have a lot of multiple child table what is the best solution also how to append blank in child table please help me... There is not a best solution because generally child tables do not need an immediate addition of records. If you mean you want to insert a record in child tables whenever you insert a record into parent then you could do that like: insert into myChild1 (foreignKeyField) values (parentPK) insert into myChild2 (foreignKeyField) values (parentPK) Prefer insert into as it does both append blank-replace in a single shot. With Append blank there is a slim chance that someone else could modify the record before you do (unless buffered). You really n ...Show All
vande013 Convert ADO recordset to a Foxpro DBF free table
Hi, I currently have a need to convert an ADO recordset to a DBF. I've seen some posts here on how to create and write to a DBF using C# in conjunction with the VFPOLEDB provider. I mocked some code up in VB6 similar to the example and I am able to open the dbf in VFP6 no problem. However, I'd like to find out what ADO to Foxpro field type conversions would work. The ADO recordset comes as a result of a query from SQL Server 2000, so there are bound to be some datatypes that will not convert natively. I've come up with this matrix so far based on some MSDN Library materials. SQL DataType ADO DataType &nb ...Show All
Allan Huang convert memo field and contents to text file
Hi, I have a table order.dbf in visual foxpro which contains of memo field. My table is as below:- order_no order_date prdcode order_qty remark B00000001 26/07/2006 2020173 10.0 memo When I double click the memo I'll be able to see the details. Eg. order has been cancelled. I would like to convert all the table information including order has been cancelled to text format with a specific alignment. I'm beginner user of visual foxpro. Kindly advice how to do that. Thank you. It depends on contents of memo. Since in VFP a memo field can hold anything up to 2Gb you might want to do that with XML. Check CursorToXML. Another alternative is ADO. Or it might be ...Show All
RayCan How to 'multithread' ServerXMLHTTP in FoxPro 7?
So, Ive got a dilema and maybe some of you can help me. Im using ServerXMLHTTP as an object to download about 500,000 web pages and I need to figure out how to run multiple instances of XMLHTTP. For simplicity sake, this is what I have right now: objXMLGET = CREATEOBJECT('MSXML2.serverXMLHTTP') FOR x = 1 TO 500000 ThePage = " http://webpage id =" + STR(x) objXMLGET.Open ("GET", ThePage , "False") objXMLGET.Send sResults = objXMLGET.ResponseBody ** parse routine here ** NEXT x The problem is that I have so many web pages to go thru, it will take days to accomplish this. Is there anyway I can change the async to True and run more than one instance of the XMLHTTP Thanks in advance, ...Show All
Sianspheric Data deleted with ZAP
Hi every body How can I recover data from a tabla that has been deleted with ZAP. Thanks a lot Hi, Check this out http://support.microsoft.com/kb/135905 When you do Zap in a table, a new table is created empty in another position inside your HDD. If you use a software for recover deleted files, you will find your old table and recover the data inside. I recommend to delete your new table since this new one could use sector of the older one. This only works if your Zap is recent. Actually, ZAP sets the RECCOUNT() at 0 and puts and end of file marker just after the table header. If it did a DELETE and PACK, it would take much longer. Hi Thanks, ...Show All
epsilon_ro Filename and nullchars
I hope everyone had a good xmas and santa gives you a lot of presents :) Now, my question: try this code in VFP9: pParam1 is a parameters which contains a folder name. The folder must contains EMLs, but can be another file, just change the extension. cString =pParam1 + Chr(0) nEMLs =aDir(aEMLs, pParam1 + "\*.EML") For iEMLs =1 To nEMLs cString =cString + aEMLs[iEMLs, 1] + Chr(0) EndFor StrToFile(cString, "C:\FileNames.TXT", 0) If you open the TXT file with Notepad.EXE you will see squares and other unreadable chars. If you open the file with FileToStr() and post the content in the VFP _screen, the names are ok, but if you send it to a messagebox() you'll see an empty messagebox. Thus, if you send to the messagebox( ...Show All
Jym Help me ! How to add controls to Pageframe at runtime ?
Please tell how to add controls (ex : grid, command button, check box ...) to pageframe and coding event click of them at runtime Thanks Check NewObject method (AddObject in older versions). ie: thisform.myPageFame.Pages(1).NewObject('myTextBox','Textbox') with thisform.myPageFrame.Pages(1).myTextBox .Top = 10 .Left = 10 .Visible = .T. && .F. by default endwith You can't directly write code at runtime. However starting with VFP6 SP3 you can compile at runtime. So something like this is valid: text to m.myCode noshow define class myButton as CommandButton Procedure Click messagebox('You clicked a button added at runtime') endproc enddefine endtext StrToFile(m.myCode, &quo ...Show All
wls1973 Why tooltips won't work for Expressions?
I've noticed that tooltips won't work for expressions. I'm refering to the tooltips VFP provides when the with of the column is smaller than its content. Is there a way to make tooltips work for column1 in the grid below Public oForm oForm = Createobject('MyForm') oForm.Show Define Class MyForm As Form Width = 420 Height = 460 showtips=.T. Add Object grd1 As Grid With ; left = 10, Top=45, Width=400,Height=200,RecordSource='Orders' Procedure Load Use (_samples+'data\orders') In 0 ENDPROC PROCEDURE init thisform.grd1.column1.controlsource= "('The quick brown fox jumps over the lazy dog')" endproc Enddefine I don't know why. It sounds th ...Show All
Will Merydith Out of control when printing out the report designer
Hi I put the PO No.: || df_indent___ || on the report designer. In 'Print When' properties, I click on the 'Remove line if blank' checkbox and write the following cod e as below. (.not. empty(df_indent) and (_pageno>1)) or (.not. empty(df_indent) and (_pageno=1)) Example of the output result when printing. On 1st page of the report designer PO No.: Testing ABC On 2nd page of the report designer Testing ABC I want to make the PO No.: appear on the 2nd page too. Is there anything mistake on my code Sometimes, there is no input on the form that is linked to the report designer when printing out. For e.g, I do not type out the 'Testing ABC' beside PO N ...Show All
Wicket how to use label with textbox...
Hello friends... I am new to visual foxpro. I have been learned programming in Foxpro 2.6 for Dos.. Now I want to learn visual foxpro.. I had make just a simple form with one textbox, one label control and one command button. I just want to do after running this form that I typed in textbox control it should be appear in label control by hitting Enter key after giving any data in textbox Or by clicking command button.. What codes I have to write... Need your help...thanks a lot I am not an expert but this is simple Fisrt way is with the commandbutton. We have one label, one textbox, one commandbutton. in the command button in click method type this code in: Thisform.label1 ...Show All
sciFiFan VPF 6: Problem sending the item from the combo to report designer
Hi all, I have a problem sending the data to the report designer after selecting the data from the pull-down combo. There is a field namely lbl_attname in the report designer. In Click procedure of the command button, if not(empty(thisform.Combo1.value)) lbl_attname = alltrim(thisform.Combo1.value) else lbl_attname = 'To whom it concerns”. endif I tried this code as above but it cannot work. Pls enlighten me. Thank you. Sorry for not explaining clearly. What I meant is that if the combo box is empty, the lbl_name = ‘To whom it concerns’ is able to send to the report designer. But I have a problem with this line ...Show All
Muhammad Adnan Learning 9.0
Hello, I'm new here and wanted to know if anyone could give me some ideas on which books would be best to learn FoxPro 9.0. I'm a beginner so I need to learn from the start. Any help would be appreciated. As Cetin says, try the Hentzenwerke web site for the best VFP books. Probably the best beginner's book (although it was written for Version 6.0 the basic tools, and methodlogies are very similar even in Version 9.0) is "Fundamentals: Building Visual Studio Applications on a Visual FoxPro 6.0 Foundation" You might want to add the "What's New in VFP 9.0" to that book since that will help you understand what has changed - of course you have to read them together to do that. Check out http://www.hentz ...Show All
lfnovo Will VFP6 work with Windows Vista
My company operates a series of VFP6 runtime databases successfully in the Windows XP environment. We currenly have one PC loaded with Windows Vista. When the runtime setup is run it does not install the runtime files onto the Vista PC. Can VFP6 work in the Windows Vista environment How can this problem be overcome Many thanks in anticipation. See the January Newsletter from Milind Lele at http://msdn2.microsoft.com/en-us/vfoxpro/bb264582.aspx Microsoft are not even testing anything before VFP 8.0 for Vista - so you will be on your own unless you start thinking about the upgrade to VFP 9.0 REAL soon. >> We currenly have one PC loaded with Windows Vista. When the runt ...Show All
NickNotYet How to add my own objects to a grid programatically
Hi all; I'm using this method to construct the columns within the grid. I need however to construct the grid so the cells are my own class objects. WITH thisform.kgrdledger1 .columnCount = -1 .RecordSource = "CurRpt" .addcolumn(1) .columns(thisform.kgrdledger1.ColumnCount).name = "colAmount" .colAmount.controlsource = "curRpt.Amount" .colAmount.header1.caption = "$ Amount" *****===>>> Here I would like to add object class 'mytxt1' instead of text1 endwith Thank you all. Thank you all... However: When I try to set the controlsource for the new object I get an error telling me that the pare ...Show All
