So I have used this approach for 20 years and it has always worked My client prepares an invoice using Word The file is "INV"+alltrim(str(invnum))+".DOC" E.g. INV12345.DOC
The system says append general rtfgen from &newfile LINK
It is then easy to print this on the report
It seems this no longer works with Win10
My thoughts at this time are to no longer store the data in a General field, and to print the DOC file as part of the report. BUT, I can't figure how to do that. I can print pictures, BMP's, Gif's etc, but not a Doc file
Can anyone throw some light on this, or offer some suggestions?
Here's (possibly) some helpful info.
I have a client that I upgraded from Win7 to 10, and he uses Excel a LOT. There's a website that he goes to and they have a link he clicks that downloads a collection of data that is autoloaded from the browser into Excel. Well, after working for years with Win7, now with Win10 he clicks and the web page opens Excel, but there's no data.
I haven't solved the problem yet, but I suspect that a registry link that connects data types (i.e., CSV) is no longer there or it's broken. So, I'm going to uninstall and reinstall Office on Win10 to see if that solves the linkage problem.
My point being that your app was probably depending on some connection provided by the registry (provided by the installation of Word) that is now broken.
Hope that helps somehow.
Mike
Sytze de Boer wrote:
So I have used this approach for 20 years and it has always worked My client prepares an invoice using Word The file is "INV"+alltrim(str(invnum))+".DOC" E.g. INV12345.DOC
The system says append general rtfgen from &newfile LINK
It is then easy to print this on the report
It seems this no longer works with Win10
My thoughts at this time are to no longer store the data in a General field, and to print the DOC file as part of the report. BUT, I can't figure how to do that. I can print pictures, BMP's, Gif's etc, but not a Doc file
Can anyone throw some light on this, or offer some suggestions?
I don't use the GENERAL data type in VFP. I always think It's better to store binary data outside of DBF.
On Tue, Jul 26, 2016 at 11:46 AM, Sytze de Boer sytze.kiss@gmail.com wrote:
So I have used this approach for 20 years and it has always worked My client prepares an invoice using Word The file is "INV"+alltrim(str(invnum))+".DOC" E.g. INV12345.DOC The system says append general rtfgen from &newfile LINK
.~. Might, Courage, Vision. SINCERITY! / v \ 64-bit Ubuntu 9.10 (Linux kernel 2.6.39.3) /( _ )\ http://sites.google.com/site/changmw ^ ^ May the Force and farces be with you!
It seems this no longer works with Win10
I don't know why it wouldn't work with Windows 10 other than you are linking it and it can't resolve the path in the link.
If you do MODIFY GENERAL does it bring up the .DOC?
Frankly I'm surprised it worked on a report layout in *any* OS. The help states:
"If the General field in the table contains data other than an image file, such as a Microsoft Excel or Microsoft Word document, an icon representing that data appears on the report or label when you generate output for it. "
Are you saying it would actually print the contents of the .DOC previously ?
I assume the PC has 32-bit MS Word installed ?
Not saving in Program files are you? That's a no no now. Al
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Alan Bourke Sent: 26 July 2016 09:47 To: profoxtech@leafe.com Subject: Re: Windows 10 and Append General
It seems this no longer works with Win10
I don't know why it wouldn't work with Windows 10 other than you are linking it and it can't resolve the path in the link.
If you do MODIFY GENERAL does it bring up the .DOC?
Frankly I'm surprised it worked on a report layout in *any* OS. The help states:
"If the General field in the table contains data other than an image file, such as a Microsoft Excel or Microsoft Word document, an icon representing that data appears on the report or label when you generate output for it. "
Are you saying it would actually print the contents of the .DOC previously ?
I assume the PC has 32-bit MS Word installed ?
Alan,
Donot store anything in GeneralFields, and if you must than donot. Just store the fullpath in of the .doc .xls or whatever file in your memo field. Advise you to change your code and I can garantee you will be a happy foxpro user again. Regards, Koen
2016-07-26 9:46 GMT+02:00 Alan Bourke alanpbourke@fastmail.fm:
It seems this no longer works with Win10
I don't know why it wouldn't work with Windows 10 other than you are linking it and it can't resolve the path in the link.
If you do MODIFY GENERAL does it bring up the .DOC?
Frankly I'm surprised it worked on a report layout in *any* OS. The help states:
"If the General field in the table contains data other than an image file, such as a Microsoft Excel or Microsoft Word document, an icon representing that data appears on the report or label when you generate output for it. "
Are you saying it would actually print the contents of the .DOC previously ?
I assume the PC has 32-bit MS Word installed ?
-- Alan Bourke alanpbourke (at) fastmail (dot) fm
[excessive quoting removed by server]
Well, I think the effect that Sytze was depending on was the feature of General fields that store a bitmap image of the linked OLE object in the field, suitable, in some cases, for printing. That's how the FRX report worked.
It's a dangerous thing to depend on, since different OLE servers store different kinds of bitmaps -- some just put the application's icon in the General field, others store a hi-res image that takes up huge amounts of space.
There are definitely different ways of getting the effect Sytze's after, but I'm a big fan of minimizing changes in production code in the field, and most of the solutions would entail a new way of generating, storing and producing reports, which is likely too costly if a quick workaround is available.
On Tue, Jul 26, 2016 at 8:39 AM, Koen Piller koen.piller@gmail.com wrote:
Alan,
Donot store anything in GeneralFields, and if you must than donot. Just store the fullpath in of the .doc .xls or whatever file in your memo field. Advise you to change your code and I can garantee you will be a happy foxpro user again. Regards, Koen
2016-07-26 9:46 GMT+02:00 Alan Bourke alanpbourke@fastmail.fm:
It seems this no longer works with Win10
I don't know why it wouldn't work with Windows 10 other than you are linking it and it can't resolve the path in the link.
If you do MODIFY GENERAL does it bring up the .DOC?
Frankly I'm surprised it worked on a report layout in *any* OS. The help states:
"If the General field in the table contains data other than an image file, such as a Microsoft Excel or Microsoft Word document, an icon representing that data appears on the report or label when you generate output for it. "
Are you saying it would actually print the contents of the .DOC previously ?
I assume the PC has 32-bit MS Word installed ?
-- Alan Bourke alanpbourke (at) fastmail (dot) fm
[excessive quoting removed by server]
Alan,
Donot store anything in GeneralFields, and if you must than donot.
I don't. The original questioner did.
Just store the fullpath in of the .doc .xls or whatever file in your memo field.
I generally store a relative path beneath a defined root location and retrieve files when needed as root location + relative path.
Storing a full UNC path or (shudder) path with a drive letter is a bad idea because you'll have to re-path everything when the server changes or the data\external files are otherwise moved, or file shares change. If you do it the way described above you only have to change the root location definition in one place.
Alan I mistread sure my advise was for Sytze. And Ted yes I am with you when changing functional good running code. However Sytze has a problem with exactly that. So in this case it is my opinion to change completely and dont store anything in a General Field but change the code I am sure he will solve his problem that way. Koen
Op dinsdag 26 juli 2016 heeft Alan Bourke alanpbourke@fastmail.fm het volgende geschreven:
Alan,
Donot store anything in GeneralFields, and if you must than donot.
I don't. The original questioner did.
Just store the fullpath in of the .doc .xls or whatever file in your memo field.
I generally store a relative path beneath a defined root location and retrieve files when needed as root location + relative path.
Storing a full UNC path or (shudder) path with a drive letter is a bad idea because you'll have to re-path everything when the server changes or the data\external files are otherwise moved, or file shares change. If you do it the way described above you only have to change the root location definition in one place.
-- Alan Bourke alanpbourke (at) fastmail (dot) fm
[excessive quoting removed by server]
On Tue, Jul 26, 2016 at 10:03 AM, Koen Piller koen.piller@gmail.com wrote:
And Ted yes I am with you when changing functional good running code. However Sytze has a problem with exactly that. So in this case it is my opinion to change completely and dont store anything in a General Field but change the code I am sure he will solve his problem that way. Koen
We are in agreement more than not. My solution might fix his problem today; your solution, forever.
No, No, No ... General fields are the work of the devil.... bloated memo files, VFP table size restrictions, links that get mysteriously corrupted, slow as hell etc.
Better to store your binary data outside VFP in a SQL server of some type which is made for the job and/or just store links to the Binary data (Pictures, Spreadsheets etc.)
Years of seeing people try general fields and eventually giving up but generating themselves loads of grief in the process has lead me to these conclusions. Even SQLExpress can now hold over 100Gb of data (May be more now) and it is free, reliable and simple to use as a road to running full SQL. We started our system this way and now host 17Tb of scanned data online. Try that with General fields!!!
Dave
-----Original Message----- From: ProFox [mailto:profox-bounces@leafe.com] On Behalf Of Sytze de Boer Sent: 26 July 2016 04:46 To: profox profox@leafe.com Subject: Windows 10 and Append General
So I have used this approach for 20 years and it has always worked My client prepares an invoice using Word The file is "INV"+alltrim(str(invnum))+".DOC" E.g. INV12345.DOC
The system says append general rtfgen from &newfile LINK
It is then easy to print this on the report
It seems this no longer works with Win10
My thoughts at this time are to no longer store the data in a General field, and to print the DOC file as part of the report. BUT, I can't figure how to do that. I can print pictures, BMP's, Gif's etc, but not a Doc file
Can anyone throw some light on this, or offer some suggestions?
-- Kind regards, Sytze de Boer
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html ---
[excessive quoting removed by server]
Alan, That is what I meant to say!!!.
The majority of apps I have ever written tend to use a single database anyhow and I must admit I prefer SQLExpress to MySQL (MariaDB) and/or its derivatives because of its ease of installation and seamless integration into other Microsoft languages/products.
Dave
-----Original Message----- From: ProFox [mailto:profox-bounces@leafe.com] On Behalf Of Alan Bourke Sent: 26 July 2016 11:17 To: profoxtech@leafe.com Subject: Re: Windows 10 and Append General
Dave Crozier wrote:
Even SQLExpress can now hold over 100Gb of data
Currently it is 10GB per database, you can have as many databases as disk space allows.
[excessive quoting removed by server]
Sytze:
As you're coming to learn, depending on Microsoft to maintain their APIs and compatibility from version to version is a gamble.
Unless there's some reason the client wants to edit their invoices after sending, rather than saving in Word, have them save a PDF file. Test out your code to see if you can work with that. That's likely the quickest and simplest solution: get out of Office formats!
Second point, don't use '&' unless you absolutely have to: the '&' is shorthand for "recompile this entire line using the values at runtime" and invokes the entire parser and compiler. It is slower, and it also chokes if there are spaces or some special characters in the file name. Most of the time, you can use the parentheses () when just substituting a filename into a command.
https://msdn.microsoft.com/en-us/library/4kxhy0aa(v=vs.80).aspx
http://www.tomorrowssolutionsllc.com/Articles/Handling%20Code%20that%20Chang...
On Mon, Jul 25, 2016 at 11:46 PM, Sytze de Boer sytze.kiss@gmail.com wrote:
So I have used this approach for 20 years and it has always worked My client prepares an invoice using Word The file is "INV"+alltrim(str(invnum))+".DOC" E.g. INV12345.DOC
The system says append general rtfgen from &newfile LINK
It is then easy to print this on the report
It seems this no longer works with Win10
My thoughts at this time are to no longer store the data in a General field, and to print the DOC file as part of the report. BUT, I can't figure how to do that. I can print pictures, BMP's, Gif's etc, but not a Doc file
Can anyone throw some light on this, or offer some suggestions?
-- Kind regards, Sytze de Boer
--- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html
[excessive quoting removed by server]