HTML Files
Nancy Palmquist
nlp at vss3.com
Wed Oct 20 09:21:34 PDT 2004
Robert Haussmann wrote:
>>Does anyone know if it is possible to use the filePro HTML
>>command and
>>create a new HTML file each time the customer account changes?
>>
>>I put programming that would do HTML :CR webpage and HTML :CL at the
>>break point.
>>
>>I had to use "1" as a ID for the HTML command since my first
>>idea was to
>>use the account number to make a unique page. limit is 0-20
>>and that is
>>not enough.
>>
>>I never have more than one open at a time but I don't seem to
>>be getting
>>even one page.
>>
>>Each time the account number changes I start a new page. At
>>the break
>>point, I close the page.
>>
>>If I can't do this with HTML, I can adjust the programming to
>>an EXPORT
>>command and put my tags in manually. Shouldn't be too tricky.
>>
>>This was just supposed to make a index page for each
>>customer's pages.
>>Seemed simple enough.
>
>
> If I understand what you are asking, we do this all the time.
> We build files on a specific field, so that we end up with one
> file per field value. Like you suggest, we are doing this in
> @wbr processing.
>
> When you say that you had to use "1" as the ID for the HTML commands,
> I assume you are carrying this through to the :CR and :CL commands
> as well, right?
>
> We've never used *only* id "1" to create these files (e.g., usually
> we have an index page that gets created as we go along, using id "0",
> and then each individual page uses id "1"). It's a long shot, but is
> it possible that you can't use "1" without using "0" (I doubt it, but
> you never know).
>
> Can you post some code?
>
> Bob Haussmann
> Tabor Children's Services, Inc.
>
>
>
I always used "1" as my ID. Never had to make different pages before.
I stripped this down a lot to give you the flow. I expect this will
create over 100 pages, with never more than one open at a time. If I
change the HTML "1" :CR "filename" I would think that would start
another file but I am not sure if I don;t need to close something. I
don't seem to get even one file when I run this from a filePro Request
Output prompt. The debugger shows it is processing the filenames
correctly and filePro created the folders I am writing to so I don't
think it is a permission issue. I get no filePro errors.
I omitted some variables and much of the details to get to the meat of
the logic. If this will work, I am all set. If not, I can change the
logic to use EXPORT and just write my tags manually. I already had this
subroutines from another set of logic and thought this would be simplier.
Break Point on Customer Account using a dummy report:
Beginning of the table.
IF: account ne 1 or account eq ""
Then: gosub HTMLTOP;account=1
if: count eq "1"
then: html "1" :ta : gosub tableheadings 'start a report table
if:
then: html "1" :tr; html "1" :td :al "center"; html "1" :tx 1
repeat for all columns in the table
then: html "1" :td-; html "1" :tr-
end
@wbrk1 'a stripped down version of the break point.
HTML "1" :bo-
HTML "1" :CL
END
--------------
HTMLTOP 'start a new HTML page when the customer account changes
WEBPAGE=FOLDER{"/"{1{"/index.html" '/folder/12345/index.html - Ex.
HTML "1" :CR WebPage :TI "INDEX Page"
HTML "1" :BF :SI "2"
' stuff for the heading
HTML "1" :BO
RETURN
--
Nancy Palmquist
Virtual Software Systems
PHONE: (412) 835-9417 Web site: http://www.vss3.com
More information about the Filepro-list
mailing list