Page 1 of 1

FileBinary

PostPosted: Tue Feb 28, 2017 8:48 am
by Atronics
In the table HR_Documents, how do I extract the file path from the FileBinary field?

Re: FileBinary

PostPosted: Tue Feb 28, 2017 9:00 am
by Scott.Pearce
The path from which the file was originally uploaded is not stored in the database. Only the file name.

Re: FileBinary

PostPosted: Tue Feb 28, 2017 9:17 am
by Atronics
OK. Thanks Scott. What I specifically need to do is grab a JPG or BMP file and park it in a crystal report. In this instance the file will be a signature file. I want to avoid hard coding the file path.

Re: FileBinary  Topic is solved

PostPosted: Tue Feb 28, 2017 9:23 am
by Mike.Sheen
Atronics wrote:OK. Thanks Scott. What I specifically need to do is grab a JPG or BMP file and park it in a crystal report. In this instance the file will be a signature file. I want to avoid hard coding the file path.


You can add a picture to a Crystal report and point it to the FileBinary in the table column, and it will display.

Re: FileBinary

PostPosted: Fri Mar 17, 2017 10:06 am
by Atronics
Mike,
I need to take this a step further. Depending on a custom field (which looks up the HR_Staff table) in Purchase Orders, I need to select a specific image (signature) file. e.g. If Staff = Bob then select Bob's signature etc.

Re: FileBinary

PostPosted: Fri Mar 17, 2017 1:54 pm
by Mike.Sheen
Atronics wrote:I need to take this a step further. Depending on a custom field (which looks up the HR_Staff table) in Purchase Orders, I need to select a specific image (signature) file. e.g. If Staff = Bob then select Bob's signature etc.


I don't see that being a problem. The purchase order custom setting value (PO_CustomSettingValues.Contents) joins to to HR_Staff.StaffID. Join HR_Staff to HR_Documents to get the Filebinary.