Марина wrote: |
Можно ли использовать обычную dbf, какие используются в БЭСТ-4, или какая нужна?
|
Марина wrote: |
Теперь я хочу связать изображение с партией товара или с товаром в БЭСТ-4. И выводить набор этих изображений при печати расходной накладной. |
nordk wrote: |
Марина посовещавшись с Дмитрием Шлыоквым.
Я так понял что другого пути как через мемо-поле у нас действительно нет к сожалению. |
Марина wrote: |
В случае Дизайнера - понятно. А почему не удается запустить просто CreateObject и как-то назначить ему имя? oApp = CreateObject("Acrobat Reader 5.0.Application") oApp = CreateObject("'Acrobat Reader'.Application") oApp = CreateObject("Acrobat.Application") oApp = CreateObject("AcroRd32.Application") |
Quote: |
Please note that OLE Automation is only supported in full version of Acrobat (not Reader).
|
Яков wrote: |
Один сертификат может относиться к нескольким товарам. |
Яков wrote: |
А я втаком случае хранил бы в Бэсте номер сертификата.
А в другом файле (связанным по этому номеру) хранил бы уже в мемо поле и картинку. зачем mlabel портить. |
Марина wrote: |
Основная часть картинок (документов) уникальна для партии, |
Яков wrote: | ||
Партии товарОВ или партии товарА? |
grey wrote: |
Никак не могу понять почему у Вас PDF меньше чем JPEG. Вы их через OCR прогоняете? |
Марина wrote: |
Я их просто получаю FineReader-ом OCR, может поэтому? Вот взяла один файлик для примера, получилось 301Кб против 122Кб (jpg в 2,5 раза больше). Но это ничего, ведь когда я писала о гигабайтах, просто перепутала с bmp (он был 1Мб) В общем, высочайшую санкцию начальника на использование jpg я теперь получила, так что теперь можно и через jpg. |
nordk wrote: |
Марина посовещавшись с Дмитрием Шлыоквым.
Я так понял что другого пути как через мемо-поле у нас действительно нет к сожалению. Значит вопрос возвращается к созданию временного файла с мемо-полем, как Вы и просили. Попробую разобраться. |
Марина wrote: | ||
Константин, файлы наверное я могу не создавать из программы, а взять готовые. Вы подскажите пожалуйста, как в мемо-поле затолкать файл с картинкой (наименование функции, параметры). |
Code: |
BLOBIMPORT()
Read the contents of a file as a BLOB, identified by a memo field number Syntax BLOBImport(<nFieldPos>, <cSourceFile>) --> lSuccess Arguments <nFieldPos> is the position of the field in the database file structure. <cSourceFile> is the name of the file from which to read the BLOB data, including an optional drive, directory, and extension. See SETDEFAULT() and SETPATH() for file searching and creation rules. No default extension is assumed. This function attempts to open <cSourceFile> in shared mode. If the file does not exist, a runtime error is raised. If the file is successfully opened, the operation proceeds. If access is denied because another process has exclusive use of the file, for example, NETERR() is set to true (.T.). Concurrency control:and BLOBIMPORT() Note: There are no restrictions on the size of <cSourceFile> except that you must have enough disk space to make the copy. Returns BLOBIMPORT() returns true (.T.) if successful; otherwise, it returns false (.F.). Description BLOBIMPORT() provides a mechanism for copying the contents of a file into a memo field as BLOB data. By default, this function operates on the currently selected work area. It can be made to operate on an unselected work area by specifying it within an aliased expression. BLOBIMPORT() is used in conjunction with BLOBEXPORT() to transfer BLOB data back and forth between files and memo fields. You can use BLOBIMPORT() with a variety of file types, including graphic images, word processor files, and printer fonts. These two functions are excellent for creating databases for documents, graphics, sounds, etc. Note: DBFieldInfo(DBS_BLOB_TYPE, <nFieldPos>) will return "C" (string) for any memo field created using BLOBIMPORT(). Examples þ This example imports information from a word processing document into a field, and then uses BLOBGET() to extract the first 25 characters of the field: FUNCTION POPULATE() USE customer NEW VIA "DBFCDX" // Construct unique file name based on last // name and id DO WHILE .NOT. EOF() GetPix("Pix", Substr(LastName, 1, 4) + CustID) Customer->DBSKIP() ENDDO FUNCTION GetPix(cPixField, cPixFile) LOCAL nPos nPos := FieldPos(cPixField) // Import the picture file into indicated field IF !BLOBImport(nPos, cPixFile) Alert("Import of picture " + cPixFile + "; failed!") ENDIF |
Code: |
begin
if box.checked[i]=true then begin Pict1.loadfromfile('D:\pictures\'+[SHIFR]+'.jpg'); MasterData1.height:=1016; end else begin MasterData1.height:=0; end; i:=i+1; end |
Марина wrote: |
B blob.ch вызов BlobImport транслируется в DBFilePut, но на DBFilePut БЭСТ ругается как на неизвестную функцию. hbextern.ch подключена. (SP37)
Что делать дальше? |
Code: |
func main() aaa:=aDir("c:\*.*") return |
Quote: |
ADIR() возвращает количество файлов, имена которых совпадают с указанным шаблоном. |
Quote: |
ADIR("*.txt", aFiles) |
Quote: |
ADIR() - это функция, применяемая для совместимости с предыдущими
версиями Clipper и потому ее использование в новых программах не рекомендуется. Ее можно заменить функцией DIRECTORY(), которая возвращает полную информацию о файлах в многомерном массиве. |
output generated using printer-friendly topic mod. All times are GMT + 4 Hours