Embed Pdf From Odbc Based On File Path 关注

0
Avatar
Legacy Poster

We have PDF files stored for each part number we make. They already linked in an ODBC by part number and they change with each part number. I'm trying to link the picture to appear based on that file path and change with each part number. In the Modify Selected Picture dialog box I have the Type: Data Sourced Picture, Source : Base64. On the Data source tab I have Database Field and the Field Name is the file (ATG_DOC_ASSOC.File) from the database. But it only gives me a #3638 error. Any ideas?

5 评论

0
Avatar
Domingo Rodriguez
版主
评论操作 固定链接

The database field "ATG_DOC_ASSOC.File", what type of data does it contain? Does it contain a BLOB (Binary Large Object)? Does it contain the graphic encoded in Base64 mode? Does it just contain the path and the name to the graphic file to be loaded?

0
Avatar
Legacy Poster
评论操作 固定链接

the file path is in one field and the file name is in another.

0
Avatar
Domingo Rodriguez
版主
评论操作 固定链接

In this case, you will need to set "External Picture File" for the type and then choose "Get file name from data source" (without specifying a default path).

 

Later, select the "Data Source" tab for the data source in question and choose "VBScript" as the data source type (and "Single-Line Expression" as the Script type) . As the VBScript to use, you would read the value from both database fields, the one with the path for the picture and the one with the picture name on it, something like:

 

Field("Tabelle1$.Path") & Field("Tabelle1$.Name") 

0
Avatar
Legacy Poster
评论操作 固定链接

What if there are more than one file. Can I tell it to grab only the first one? Also will if read PDF files? I can't find "External Picture File". I'm on version 9.3 SR2

 

I found another field that I can put the file path in so it won't be polluted by the others. it is a single field with the full path of each file i.e. \server\customer\walmrt\gizmo.pdf . I have another "\" before \server. I  still get an error. #3608

0
Avatar
Domingo Rodriguez
版主
评论操作 固定链接

As a test, if you embed the PDF file as an embedded picture to BarTender directly (rather than via a BLOB object in the database), will BarTender display the PDF correctly?

请先登录再写评论。