Top Banner
HTML and Visual FoxPro HTML and Visual FoxPro
17

Html and visual fox pro

Dec 09, 2014

Download

Documents

Mike Feltman

HTML & VFP session from SW Fox 2009
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Html and visual fox pro

HTML and Visual FoxProHTML and Visual FoxPro

Page 2: Html and visual fox pro

About MeAbout Me

President/Founder F1 Technologies since 1990President/Founder F1 Technologies since 1990 Co-author Visual FoxCo-author Visual FoxExpressExpress SpeakerSpeaker ConsultantConsultant Xbase Developer since dBase III/FoxBase 1987Xbase Developer since dBase III/FoxBase 1987 Web Developer since 1994Web Developer since 1994

Page 3: Html and visual fox pro

Contact MeContact Me

Page 4: Html and visual fox pro

AgendaAgenda

HTML Features in VFPHTML Features in VFP Generating HTML with VFPGenerating HTML with VFP Parsing HTML with VFPParsing HTML with VFP

Page 5: Html and visual fox pro

HTML Features in VFPHTML Features in VFP

Save as HTMLSave as HTML Web Publishing WizardWeb Publishing Wizard GenHTML GenHTML Foundation ClassesFoundation Classes HTML Report ListenerHTML Report Listener

Page 6: Html and visual fox pro

Save as HTMLSave as HTML WhatWhat

Allows forms, menu, reports and tables to be Allows forms, menu, reports and tables to be saved as HTML. saved as HTML.

HowHow Open/Create a Form, Menu, Report or TableOpen/Create a Form, Menu, Report or Table From File Menu Choose Save as HTMLFrom File Menu Choose Save as HTML

WhyWhy Limited use for forms & tablesLimited use for forms & tables Useless for menus.Useless for menus. Moderately Useful for reports.Moderately Useful for reports.

Page 7: Html and visual fox pro

Using the Web Publishing Using the Web Publishing WizardWizard

WhatWhat Generates HTML, Script and more for use in publishing Generates HTML, Script and more for use in publishing

datadata HowHow

Tools -> Wizards –> Web PublishingTools -> Wizards –> Web Publishing WhyWhy

Generate HTML to publish on the web or distributeGenerate HTML to publish on the web or distribute Generate Code to use in applications to generate HTML Generate Code to use in applications to generate HTML

on the fly.on the fly. Most useful output formats are IE only.Most useful output formats are IE only.

Page 8: Html and visual fox pro

GenHTML.PRGGenHTML.PRG What What

Default HTML generation program for VFPDefault HTML generation program for VFP Referenced by _GENHTMLReferenced by _GENHTML GENHTML.PRG in VFP HOME() directory.GENHTML.PRG in VFP HOME() directory. Called by all we’ve covered so farCalled by all we’ve covered so far

HowHow Do (_GENHTML) WITH …Do (_GENHTML) WITH …

Why Why Automate publishing reports/data to HTMLAutomate publishing reports/data to HTML

Page 9: Html and visual fox pro

HTML Foundation ClassesHTML Foundation Classes WhatWhat

HOME() + [FFC\_INTERNET.VCX]HOME() + [FFC\_INTERNET.VCX] _DBF2HTML_DBF2HTML _FRX2HTML_FRX2HTML _SCX2HTML_SCX2HTML

HOW HOW FFCSample.PRG, FFCSAMPLE2.PRG & FFCSAMPLE3.PRGFFCSample.PRG, FFCSAMPLE2.PRG & FFCSAMPLE3.PRG

WhyWhy Generate an HTML Table, Output an SCX layout to HTML, Generate an HTML Table, Output an SCX layout to HTML,

Output a report to HTMLOutput a report to HTML

Page 10: Html and visual fox pro

HTML Report ListenerHTML Report Listener Most Useful of Most Useful of

Built-In FeaturesBuilt-In Features See Cathy See Cathy

Pountney’s Pountney’s Session: Session: Making Making the Most of VFP the Most of VFP 9 SP2 Reports 9 SP2 Reports 

Page 11: Html and visual fox pro

HTML Report ListenerHTML Report Listener New Advanced Page in Expression Dialog in

SP2 HTML Related Properties

HTML.Link HTML.Anchor (Name) HTML.Alt-Title CSSClass.OverrideFRX CSSClass.ExtendFRX HTML.PrintablePageLink

Example: FanList2.FRX

Page 12: Html and visual fox pro

Generating HTML with VFPGenerating HTML with VFP

SQL Select directly to HTMLSQL Select directly to HTML XML & XSLTXML & XSLT CursorToHTML ClassCursorToHTML Class GenForm ClassGenForm Class HTML Text MergeHTML Text Merge

Page 13: Html and visual fox pro

SQL Select to HTMLSQL Select to HTML What What

Use VFP SQL Select to generate HTMLUse VFP SQL Select to generate HTML HowHow

HowHow SQL Select to Text File w/ HTMLSQL Select to Text File w/ HTML SelectToHTML.PRGSelectToHTML.PRG

WhyWhy EasyEasy PerformancePerformance

Page 14: Html and visual fox pro

XML & XSLTXML & XSLT WhatWhat

Uses XML and XSLT (via COM or .NET interop) to convert Uses XML and XSLT (via COM or .NET interop) to convert XML to HTMLXML to HTML

XSLT = EXtensible Stylesheet Language TransformationsXSLT = EXtensible Stylesheet Language Transformations HowHow

XSLTExample.prg, XSLTExample2.prg, GenericXSLT.PRGXSLTExample.prg, XSLTExample2.prg, GenericXSLT.PRG WhyWhy

Output data to HTML using XSLTOutput data to HTML using XSLT Use .NET frameworkUse .NET framework PerformancePerformance

Page 15: Html and visual fox pro

CursorToHTML ClassCursorToHTML Class WhatWhat

Class to render HTML from VFP dataClass to render HTML from VFP data HowHow

Instantiate, set properties, renderInstantiate, set properties, render TestCursorToHTML1 - 6.PRGTestCursorToHTML1 - 6.PRG

WhyWhy Fast, Flexible, Easy, All VFPFast, Flexible, Easy, All VFP

Page 16: Html and visual fox pro

Parsing HTML with VFPParsing HTML with VFP WhatWhat

Read HTML into VFPRead HTML into VFP HowHow

ALINES()ALINES() STREXTRACT()STREXTRACT() IE AutomationIE Automation ParseDemo.PRGParseDemo.PRG ParseDemo3.PRGParseDemo3.PRG

WhyWhy Data MiningData Mining HTML manipulationHTML manipulation

Page 17: Html and visual fox pro

ConclusionConclusion VFP has a number of built-in ways to VFP has a number of built-in ways to

generate HTMLgenerate HTML Most uses are limitedMost uses are limited

It’s easy to roll your own HTML generatorsIt’s easy to roll your own HTML generators VFP’s String Handing Capabilities make it VFP’s String Handing Capabilities make it

easy to parse HTMLeasy to parse HTML IE Automation is also an easy way to parse IE Automation is also an easy way to parse

HTMLHTML