Gavin Holt
unread,Nov 10, 2010, 6:50:12 AM11/10/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Idealist
My copy of Idealist (I32) has been moved from machine to machine
following me around for more years than I care to remember. It is not
a full RDBMS, nor is it an ideal programming environment, however it
is rock solid and out performs any other system for the tasks it can
undertake. In this age of firewalls and managed privileges it is a joy
to carry a truly portable application offering so much power with such
a small footprint.
I have explored merging data into HTML files with great success and
would like to share this with you all. I have one HTML document per
record type and simply add the record type label as the first line of
the file (e.g. :HipReplacement). Within the HTML document fields are
inserted within {}, which most WYSIWYG HTML editors will simply
ignore. Where there are parent records the data from the parent can be
accessed in the normal way with {Age from Parent}. Using a field in
the record to store the name of this HTML file we can write a toolbar
script so each record can be merged with the correct document, saved
and then viewed in a browser:-
Stage one: Use the export function to generate a CMD file -
MakeHTML.exp:-
:Hip
CDDatabase()
export(1,,,"exp\\\\{OpExp}","out\\\\{PatLastName}
_{PatFirstName}.html",0)
run("PRUN.EXE out\\\\{PatLastName}_{PatFirstName}.html")
Stage two: Run the generated CMD file - MakeHTML.cmd:-
CDDatabase()
export(1,,,"exp\\HipReplacement.htm","out\\Holt_Gavin.html",0)
run("PRUN.EXE out\\Holt_Gavin.html")
Toolbar script: To kick it all off
Comfort()
CDDatabase()
CD(cmd)
Quiet(1)
Export(1,,,"MakeHTML.exp","MakeHTML.cmd",0)
Quiet(0)
FileCommand("MakeHTML.cmd")
As you will see there is a considerable amount of "working around"
required to get past the limitations of Idealist, however it is very
gratifying when it works! (Please excuse the \\\\ but I like to keep
the files in separate directories, one for CMD, EXPort, OUTput etc.)
Gavin.Holt
P.S. I would very much like to view the source code for I32 in order
to understand how it parses the macro commands, substitution of field
contents appears to be variable from one function to another. It would
also be very helpful to have access to the "field expressions" in the
macro CMD scripts. This aspiration may the spur I need to learn C++.