FYI ...

I generate reports on a monthly (/daily/weekly/etc) basis ... for various
"types" but the same report per "type" each period ...

The reports are store in ./Reports/"Type"/Archive/yyyymm.txt.gz  So any one
"Type" path may have any number of yyyymm.txt.gz files ... 

I build a screen for my users with "Type" popup menus to allow them to
select the report they wish to view ... They can select any report from any
"Type" - only one selection allowed by design (JavaScript is very good at
this type of "front end" verification) - or you can make a <UL> of "links"
by "Type"  ... there are many ways to do this ... Once the selection is made
I then unzip the file, sent it through a converter and output it in a
separate window as a type .pdf ... Acrobat reader ... This is a very nice
"browser" for preformatted reports ... The data is static - once the period
closes the data wont charge for that period ... so there is no need to
"re-generate" a pretty format on demand ... and the reports are too large to
be stored as "blobs" in a database ... 

There are commands in PERL to allow you to open and read a directory, TOC
... opendir, readdir ... these are very powerful tool ... If you already
have half of the process done - the directory structure and the "save" then
I'd suggest you may wish to look at the previous two command ... So reading
./Reports gives me my "Types" then reading each "Type" give me my selections
... This is all displayed in a "pretty" way, readable format, for the end
user to select from ...

Hope this gives you some other ideas ...  

jwm

-----Original Message-----
From: Lynn Glessner [mailto:[EMAIL PROTECTED]]
Sent: September 26, 2001 15:47
To: [EMAIL PROTECTED]
Subject: How to save and retreive form


I'm having a horrible time deciding the best way to accomplish this goal.
Let me see if I can explain this well enough that I can get some
suggestions.

For a small business intranet, I want the user to fill out the form, save it
onto the web server, and be able to retreive it later. A text file will be
fine, there won't be any need for reporting etc and a database would be
overkill. I would like to have a directory structure on the web server that
matches with three of the fields on the form, a directory for each engineer,
then a subdirectory for each band (created as needed), and then a text file
for each song name that that contains the state of the form. Each form will
be the tracking sheet for a particular song.

I have the saving part worked out. After the form is filled out it is saved
as a text file in the appropriate location. But I am stuck on how to let the
user pull the form back up. I'm imagining that the user will select from the
engineer names in a drop list, then possible band names for that engineer in
a drop list, and then the possible song names for that band will be shown in
the next drop list. After selecting the desired song name the form will then
be loaded using that saved form information.

I looked into using javascript to display the list boxes dynamically
depending on user input, but of course javascript can't go back and get a
directory listing off of the server to see what the next choices should be.
I also don't really want to have to expand my horizons into javascript if I
don't have to, since I'm still learning perl :) Someone suggested that I
build a hash using File::Find to begin with of all directories and
subdirectories when the page loads. I don't expect this to be hit more than
a few times a day, but would like to build this the best way, so that I can
copy this concept for similar uses.

I would like to have the directory structure instead of all the saved files
in one directory, simply because I can leverage that directory structure for
other things. But I am very open to suggestions. I looked at the web page
http://www.wiley.com/legacy/compbooks/stein/ and that is how I worked out
the saving part. But his example of how to restore is not practical, as it
has the user type in the path to the file. The other reference I have used
is the O'Reilly CGI Programming with Perl book.

Sorry this was so long, and if you read this far thanks!


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to