Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HOW TO CALL VISUAL FOXPRO DATA ENTRY FORM & REPORT FORM (.SCX & . FRX ) USING AVFP program

Status
Not open for further replies.

keisha1

Programmer
Mar 28, 2019
22
PH

Hi Sir/Madam,

I have a process program developed from visual foxpro form(.SCX)& Report form (.frx), I just want to know if these form/report is possible to run in URL/iexplorer calling from ActiveVFP/HTML front-end main screen. do you have sample script how to call .scx & .frx using AVFP program.


Please help me. Thanks


 
With ActiveVFP you're able to run VFP code, but think extremely simple about it: When a web server receives a request, it mainly has to response with HTML.

ActiveVFP is not for running SCXes. That's not the goal of ActiveVFP, it mainly has to respond with that HTML and secondary it provides images or downloads that HTML references, but that's then done by the web server, you only provide the HTML and maybe Javascript for interactivity.

Your VFP code can do anything non-interactive that includes running a report TO PRINTER without preview, but you need a printer driver installed server-side and the printout also is there, so the only relevant mode would be printing to file, especially PDF and then providing that as result to a client-side user/browser. In the form of HTML providing a download link to that PDF, for example.

The usual way to reuse an application 1:1 as is without anything else is going terminal server. That needs no preprocessing/converting/migrating your VFP code of any kind, you can run your EXE, but you give access to users, they actually log in to desktop sessions running on that terminal server. It takes licenses and usually is a solution for remote work or home office, so for trusted users.

Taking your PJX and turning it into something working on the web is the topic of vfp2iis or foxincloud instead.

Bye, Olaf.

Olaf Doschke Software Engineering
 
Hi All,

I have script/program code successfully running(.scx), even converted to prg file was successfully running.
My requirement is I need to include this codes to my html script to be run once I click the option menu in the html script, how can I call these codes from html script.
Can you please help me how can I convert or include these codes to my html front-end option menu. I am now started to learn html scripting, can you share me your samples code running in html using vfp iis, ActiveVFP, IIS7 etc.

---here is my SCREEN design and codes below---

TEXTBOX -- displayed path/folder upon clicking COMMAND BUTTON1 --- with codes to read the files from
target folder

COMMAND BUTTON2 - to read and append all text files to one dbf file

--------------------------------------------
CODES IN COMMAND BUTTON1 AND COMMAND BUTTON2

COMMAND BUTTON1:
PUBLIC mImportTXTFiles,McImportDir,MaryDir,cTXTFile
* --- Get the Import Directory ---
use elixirtabl
append blank
zap
McImportDir = GETDIR()
thisform.Text1.VALUE = McImportDir
* --- Now use it to find the individual TXT files in that directory ---
DIMENSION MaryDir(1)
mImportTXTFiles = ADIR(MaryDir, ADDBS(McImportDir) + "*.txt")
cImportTXTFiles = mImportTXTFiles

------------------------------------

COMMAND BUTTON2:
local cTXTFile
cImportTXTFiles = (mImportTXTFiles)
cImportDir = (McImportDir)
aryDir = (MaryDir)
xtname = space(22)
x = space(8)
z = space(8)
dd = space(2)
mm = space(2)
yy = space(4)
IF cImportTXTFiles > 0
* --- Cycle through the 'found' txt files and Append Each one separately ---
FOR nFileCntr = 1 TO cImportTXTfiles
cTXTFile = ADDBS(cImportDir) + maryDir(nFileCntr,1)
SELECT elixirtabl && The recipient DBF table
* --- Now Import that Specific File ---
y=cTXTfILE

xtname = right(cTXTFILE,21)

x=substr(xtname,1,8)
Z=substr(xtname,10,8)

yy = substr(xtname,10,4)
mm = substr(xtname,14,2)
dd = substr(xtname,16,2)
zdate = trim(dd)+"-"+trim(mm)+"-"+trim(yy) && original

xdate =ctod(mm+"/"+dd+"/"+yy)
smon = cmonth(xdate)
xsmon = substr(smon,1,3)
Yzdate =trim(dd)+"-"+trim(xsmon)+"-"+trim(yy)

set talk on
if (cTXTfILE) <> " "
append blank
replace column1 with 'Bank_'
replace column2 with ": "+alltrim(x)
replace termnum with alltrim(x)
replace tran_date with alltrim(Yzdate)
APPEND FROM (cTXTFile) type sdf
endif
?aryDir
ENDFOR
ENDIF
CLEAR
DO prg_ejtermi && Calling the module program



Thanks, Highly appreciate your response..



 
That's not possible to run neither in a browser nor in server side ActiveVFP.

You can run VFP code only server side and it can't be interactive, it just can create HTML code that then is interactive.

And I see no easy migration tool to convert SCREEN PRG code to HTML&JS.

Indeed Fox In Cloud will take a project with an SCX in it to convert it to HTML&JS code and server side logic that can run, but not a PRG you create from an SCX.

Bye, Olaf.

Olaf Doschke Software Engineering
 
Hi Olaf,
you mean that these code are only possible to run in a browser if we're using Foxincloud /Foxweb/ VFP2IIS, So no available tools use for conversion of scx/prg to html code? even there were many useful tools, functions ,commands in the xbase programming language.
 
>no available tools use for conversion of scx/prg to html code?

You listed the available tools to do so, mainly FoxInCloid and VFP2IIS. FoxWeb is just like ActiveVFP a tool that allows to run some noninteractive code serverside and redo the interaface in HTML.

I don't see anything that converts the very specific type of interactions a screen PRG is with it's defined steps of sequentialiszing the workflow to HTML at all.

As you say you have an SCX I would go to FoxInCloud or VFP2IIS and try it there.

Bye, Olaf.

Olaf Doschke Software Engineering
 

HI Sir/Ma'am,

I have downloaded vfp2iis installer and i installed on my local pc but when I run the scx prg using internet explorer got an error messages "HTTP Error 404.0 - Not Found The resource you are looking for has been removed".

just want to know if downloaded installer files are incompleted. can you please help me how to configure and run given sample program/scx/pjx from vfp2iss installer or how to call visual foxpro data entry form in the internet explorer/browser using VFP2IIS

see the ff. installed files/folder appeared on drive c after installing VFP2IIS. Can you please explain if installer is not completed or guide me how to test run sample demo programs inside the installed files.

C:\vfp2iis\
apps folder contains more sample forms and demo programs
complus folder
web folder
gdiplus.dll
msvcr71.dll
vfp2iis.dll
vfp2iis.tlb
vfp2iis.vbr
vfp9r.dll
VFP9RENU.dll
vfp9t.dll



Thanks. your support will be most appreciated.

 
already configured vfp2iis but unsuccessful run.

just want to know if vfp2iis program(prg/scx) can run in windows7 OS?
do your have step by step procedure how to run program in widows7 up. Im already use step/procedure in subfolder help but program can't run in iexplorer.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top