|Subject:||Re: Signature capture via Android and CWS OCX
|Date:||Wed, 16 Nov 2016 09:35:56 -0600
|From:||Mark Bannister <markRemove@ThisINjection-Moldings.com>
To show graphics in reports I've done it two ways. One is to use code
in the report to assign the graphic in real time. They other is to use
a temp table, load the graphic from file into the temp table and then
run the report with the temp table linked in the datamodel.
Code to load images into temp table:
while not mytc.eot ( )
stFile = ":pnsnaps:" + String ( mytc. ( stSrcFieldName )
) + ".jpg"
snapgr = blank ( )
if libfsAPI.apiisfile ( stFile ) then
snapGR.readfromfile ( stFile )
imgtc.InsertRecord ( )
imgtc. "Pnfkey" = mytc. ( stSrcFieldName )
imgtc. "myimage" = snapGR
imgtc.unlockRecord ( )
if loCurrRecord then
mytc.nextRecord ( )
To assign a graphic using code create a method that returns a graphic
myFunction( IDofgraphic longint ) graphic
Use readfromfile to assign graphic file to the return variable.
Assign the graphic like:
mygraphicUIObject = myFunction( n )
For a report you may have to actually do the assignment in an object
that loads before the graphic (code runs on report objects based on the
object's physical location, left to right, top to bottom).
On 11/16/2016 8:46 AM, Jim Moseley wrote:
> Liz (and all),
> After a little more research, I think I've figured out how to get the
> graphic file up to the CWS OCX. I'll just base64 encode it, so it is
> just plain text, and then add that as a field to the transaction. This
> will greatly increase how much data is being sent, but shouldn't cause
> any issues I can think of.
> Using your idea, I think I can decode and store these graphic files in
> some user-directed folder on the hard drive, maybe split out by year &
> month so it doesn't become unmanageable.
> The end result of this is to show a report of all signatures for a
> client. How would I create a report to show these graphics, if they are
> all stored 'outside the database'? Do I read these into a :PRIV:
> table's memo/blob fields? Or is there a way to cause the report to
> directly display a bunch of graphic files?
> If anyone sees any gotchas in this, let me know.
> Jim Moseley
> On 11/15/2016 9:05 PM, Liz McGuire wrote:
>> I have never done anything like this. If you are able to receive the
>> file, I would save it to the OS in a file structure outside the web
>> root, in a sub-directory linked to the account, and with a file name
>> that is saved with the related transaction (e.g. the transaction Id
>> could be the file name).
>> For the rest, I have no idea whether you could do that (not even certain
>> I comprehend it.
>> On 15 Nov 2016 08:05, Jim Moseley wrote:
>>> Greetings, all.
>>> Has anyone used the Corel Web Server to handle signature-captured BMP or
>>> SVG files?
>>> I currently have an Android app that ties into the CWS OCX to update my
>>> Paradox data directly. But, I don't know what to do with the BMP/SVG
>>> files. I don't think I want to save them as Memo/BLOB fields in
>>> Paradox, after seeing how easily that can get corrupted. But, if I save
>>> them as individual files on the drive, this seems like it would quickly
>>> become unmanageable.
>>> Any thoughts?
>>> Also, how should I setup the CWS OCX to even process these files? This
>>> is a sample of my current transaction upload via a POST:
>>> Would I just add a new field containing the encoded BMP/SVG contents,
>>> and then split that off and 'save' it somehow?
>>> Jim Moseley