1. Alfredo Santibanez
  2. PowerBuilder
  3. Wednesday, 29 March 2017 15:02 PM UTC

Hi,

We have a Microsoft Web Browser control in a DW but it is not showing information. We need to fill the browser with some saved Html that at first we are trying to set up by using

dw_1.object.ole_1.object.navigate2("file:///C:/soft/pb126/coinca_gui/ADMINbitacoraconsulta.html")

Not able to use the Web Browser object, that works and shows the contents, because we need to set up a custom Header and Footer that includes original web page and original date-time for printing.  These a are logs from a web page query we save with lo_xmlhttp.open ("GET", ls_url, false)

I was trying to achieve this info using normal DW header and footer data and include only de web browser control with the HTML text.

Any hint of what should I be missing

Layer is defined as Band, Data to Current Row.

ole(band=detail x="78" y="24" height="968" width="1792" border="0" tooltip.backcolor="134217752" tooltip.delay.initial="10000" tooltip.delay.visible="32000" tooltip.enabled="1" tooltip.hasclosebutton="0" tooltip.icon="0" tooltip.isbubble="1" tooltip.maxwidth="0" tooltip.textcolor="134217751" tooltip.tip="xxxxxxxxxxxxxxxxxx" tooltip.transparency="0"  clientname="Consulta RUC"range=-2 binaryindex=1 activation=1 linkupdateoptions=0 contentsallowed=2 displaytype=1  name=ole_1 visible="1" )

Regards

Alfredo

Daniel Vivier Accepted Answer Pending Moderation
  1. Friday, 31 March 2017 01:35 AM UTC
  2. PowerBuilder
  3. # 1

Does it have to be a DW? A window might be easier to manage the OLE object in.

You can manage the header and footer in the WebBrowser control (which also affects Internet Explorer) with registry code.

To store the original IE header/footer, do:

String lsKey = "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup"
if RegistryGet(lsKey, "header", RegString!, isPageHeader) <> 1 then
 isPageHeader = ""
end if
if RegistryGet(lsKey, "footer", RegString!, isPageFooter) <> 1 then
 isPageFooter = ""
end if

To set them to what you want, use:

RegistrySet(lsKey, "header", RegString!, lsNewHeader)
RegistrySet(lsKey, "footer", RegString!, lsNewFooter)

When you are done, set them back to the saved isPageHeader and isPageFooter.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.