Just playing around with Pan 6’s Text Export Wizard, creating an html table. I did all the prep work in designing the table, but was wondering if there is a way to call up the table through a procedure, rather than having to manually click on Wizard, then Import-Export, then Excel Wizard and finally Text Export Wizard. Just wondering…
The Text Export Wizard uses the
htmldatatable statement to perform the HTML export, and you can write your own procedure using this statement to export HTML without having to go thru the wizard. I don’t have the page number for this statement in the Panorama 6 documentation handy, but this version is nearly (exactly?) identical in Panorama X, so here is the link to that documentation.
Thank you Jim…
Note that the Options explanation for htmldatatable statement has several typographical errors…
Craig, you can easily submit your corrections via the Corrections menu. The method is described in the Help File under the Panorama Help Wizard topic:
The simple method used is described in the text under the Advanced: Submitting Corrections heading. It is all relatively simple and saves Jim some time doing the corrections himself even though he will review them before actually making the correction.
Seems I am unable to even get the posted example to work properly, as I get this in the first column…
No records matched your selection criteria.
Press your browser’s Back button to try another selection.
I can set up the html code when using the wizard, no problem.
I used the sample code:
local cgiHTML htmldatatable cgiHTML filesave "table.html",cgiHTML openurl "file://"+dbinfo("folder","")+"table.html"
Confirming Pete’s observation. Posted example gives no records, although I had all 1700+ records selected.
Prior to the htmldata statement add the lines
fileglobal cgiSelectedRecordCount cgiSelectedRecordCount=info("selected")
The custom statement sets that variable to 0 if it doesn’t already have a value.
Sorry to bother you, but my learning curve stinks. I posted this and I can’t even get a green OK.
Is the code you suggested only for Pan X or also for Pan 6?
I am doing this to try and learn some things I haven’t done before.
I did dave’s fileglobal add and initialization and it worked for me. If you have thousands of records and many fields, it can take a while to generate.
Try selecting a small subset to see if it works.
Was it in Pan 6? and with the code I posted? I only have 14 records I want to select, but I can’t even get passed having the procedure being accepted at workable. So I must be doing something incorrectly
It worked for me in Pan X.
I’m trying to still use it in Pan 6…
Oops. Missed your usage need.
That is ok. I will also try it on Pan X. And it does work there. So I might try and figure out why it doesn’t work on Pan 6, but at least I am up on the horse. Now to learn to modify it so it looks the way I would like it to be. Thanks for your input, along with the always dependable Dave.
I’ve posted corrections for them.
I think the problem is the
openurl statement, which did not exist in Panorama 6. Instead, use the
Seems to be this line
When I get to it, I get a missing parameter message
I probably shouldn’t have pointed you to the Panorama X documentation, there are some differences, and one difference is that the options parameter is optional in Panorama X, but not in 6. So the sample code for X doesn’t work. At a minimum, the 4th line needs to be:
But once you fix that, you’re going to find that
openurl is also a problem.
If you really want to do this in Panorama 6, you should probably find the Panorama 6 documentation for the
shellopendocument statements. Obviously my strong recommendation would be to transition to Panorama X as soon as possible.
I agree with your suggestion, but I am like an old dog who has trouble learning new tricks.
Or more like an old racing horse been out in the pasture too long.
As I noted, it works fine in Pan X, but have spent most of my Pan career in the earlier versions.
Lots of these new codes spin my head. I also have not spent a lot of time in Pan X yet, due to what I have described above, but I hope to transition sooner than later. I have the patience, but spending time down in Florida with the fish calling and the sun shining takes time away from sitting down and learning new code.
I do appreciate your help for sure and your continued move forward with Pan X.