Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HTML in Report
Message
 
 
To
25/09/2004 04:57:39
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Miscellaneous
Thread ID:
00945769
Message ID:
00953407
Views:
19
It's a long time since I've done something like this but...

In 9, if I was already working with an ActiveX control for the users to edit, I would probably do this in the same way as I do dynamic charts in a report. The approach goes something like this:

* -- set up a hidden form with the activex component on it, bound to the general field on which you report.

* -- "talk" to the form and its activeX control during the run of the report, on whatever level you need to refresh the contents of this general field. I don't know if this is detail level, group level, or what, in your case. At any rate, you talk to the activex control's properties to re-fill the values as needed, sometimes you need to GO RECNO() IN the bound cursor to get the activeX control to refresh properly.

Here's where the technique may or may not work for you: if it was a chart, we'd display it in the report by asking the Engine to do it, and if we needed the results in the HTML output we'd save it out to a generated filename on disk. (You should be able to try this out, although I'm not sure if it works completely in the public beta version.)

In this case, the engine may not display the contents of the ActiveX control the way you want, but you should be able to interrogate the ActiveX control and get the current HTML as a string. Use DocumentHTML or whatever property it offers to do this.

So I would, as a first cut, save the string out to a generated filename (just as the _REPORTLISTENER.VCX listeners save the general fields' images out to filenames). I would include an attribute with this generated filename in the XML (which is what the _REPORTLISTENER.VCX listeners do for the images).

Assuming this works -- and it should -- incorporating the results into your final report would depend on what the final outcome of the report was supposed to be. If it's HTML, the answer is easy. If it's printed output, I suppose that the HTML might be a set of addenda or appendices to the report, which would not disturb the page layout and page flow from the engine's point of view.

Alternatively, you could use custom rendering techniques in the listener, with GDI+, to push the contents of the HTML directly into the page layout. You would probably use AdjustObjectSize with a shape on the page to compensate.

I am writing this fairly quickly and have probably introduced a number of subjects here that are new to you and as far as I know you may not even return to this thread <g>. So, ask if you have questions and I'll try to help.

>L<
Previous
Reply
Map
View

Click here to load this message in the networking platform