| View previous topic :: View next topic |
| Author |
Message |
DoT_PiTcH Contributor

Joined: 07 Aug 2002 Posts: 85
|
Posted: Mon Jan 31, 2011 9:19 pm Post subject: Browser Element |
|
|
I am using this to show a report i generate, the report is HTML saved as a local file.
i want the default page to load when i create the element. ie a user clicks generate report
a child window pops up with the browser that is pointed to "report.html"
should that work or do i need to incorporate a HTTP server also into this? |
|
| Back to top |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Tue Feb 01, 2011 12:15 am Post subject: |
|
|
| That should work just fine. |
|
| Back to top |
|
 |
DoT_PiTcH Contributor

Joined: 07 Aug 2002 Posts: 85
|
Posted: Tue Feb 01, 2011 4:03 pm Post subject: |
|
|
| Code: |
external .\vdsbrw50.dll
#define command, browser
#define function, browser
Title fuelusagereport
DIALOG CREATE,Fuel Usage Report Viewer,-1,0,800,600,,NOSYS,SMALLCAP,ONTOP
REM *** Modified by Dialog Designer on 31.01.2011 - 12:47 ***
DIALOG ADD,BROWSER,BROWSER1,0,0,800,550,.\report.htm
DIALOG ADD,BUTTON,Print,570,309,64,24,Print
DIALOG ADD,BUTTON,Close,570,441,64,24,Close
DIALOG SHOW |
says cannot display website |
|
| Back to top |
|
 |
Claz Newbie
Joined: 03 Jan 2009 Posts: 23 Location: The Netherlands
|
Posted: Tue Feb 01, 2011 6:36 pm Post subject: |
|
|
I tried your code, and I found that the browser element needs the full path of the URL.
In your example, it looks like as if report.htm is located in the directory above the directory of the browser program.
If the URL is set by the user, e.g. during installation, you can use the @curdir() function to retrieve the path and cut off the last part of the path by string manipulation.
Good luck.
Claz |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Tue Feb 01, 2011 6:38 pm Post subject: |
|
|
Yup, pretty sure Claz has it. It needs full path and may also require you to put in a full URL too, such as "file://c:\somedirhere\report.htm". _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
DoT_PiTcH Contributor

Joined: 07 Aug 2002 Posts: 85
|
Posted: Tue Feb 01, 2011 6:57 pm Post subject: |
|
|
awsome thanks guys the @curdir()\report.html worked.
also can you print a graph element, like in excel. what i would like to do is
have a graph generated off the selected data and then save the graph and a png to use on the report.html. or can i add it as a layer over the browser element and print? |
|
| Back to top |
|
 |
Claz Newbie
Joined: 03 Jan 2009 Posts: 23 Location: The Netherlands
|
Posted: Tue Feb 01, 2011 9:33 pm Post subject: |
|
|
One thing 's for sure: VDS cannot cope with the png format; I've been searching for any VDS app or dll able to use png, but could not find any.
It's a pity, because png is a great format for any raster format not being photos.
The easiest thing to do is to write the graph to a bmp (I know, I know it's very big) or convert it afterwards to a jpg file.
If you need to create the graphs by yourself before (which I assume), it might be a good idea to use the bitmap commands for that. I've been using it a few times and it works great. Save it as a bmp, use vdsconv.dll from PGWARE (2003) to convert the bmp to gif or jpg, and delete the bmp afterwards. Job done and still a small file...
I hope this answers your question. |
|
| Back to top |
|
 |
Claz Newbie
Joined: 03 Jan 2009 Posts: 23 Location: The Netherlands
|
Posted: Tue Feb 01, 2011 9:37 pm Post subject: |
|
|
I now see it does not answer your question at all.
I'm not very familiar with using layers in html, but I hope somebody else does.
Sorry |
|
| Back to top |
|
 |
DoT_PiTcH Contributor

Joined: 07 Aug 2002 Posts: 85
|
Posted: Tue Feb 01, 2011 10:02 pm Post subject: |
|
|
| how do i save a graph to an image file in general? |
|
| Back to top |
|
 |
Claz Newbie
Joined: 03 Jan 2009 Posts: 23 Location: The Netherlands
|
Posted: Tue Feb 01, 2011 10:06 pm Post subject: |
|
|
| What's the format of your graph ? |
|
| Back to top |
|
 |
DoT_PiTcH Contributor

Joined: 07 Aug 2002 Posts: 85
|
Posted: Tue Feb 01, 2011 10:52 pm Post subject: |
|
|
| the VDS element. i want to save the element as a image |
|
| Back to top |
|
 |
Claz Newbie
Joined: 03 Jan 2009 Posts: 23 Location: The Netherlands
|
Posted: Tue Feb 01, 2011 11:06 pm Post subject: |
|
|
| Do you mean the Piechart element? |
|
| Back to top |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Wed Feb 02, 2011 2:40 am Post subject: |
|
|
| Claz wrote: | One thing 's for sure: VDS cannot cope with the png format; I've been searching for any VDS app or dll able to use png, but could not find any.
It's a pity, because png is a great format for any raster format not being photos. |
You need VDS 6 for PNG
VDSIMG60.DLL works with PNG format |
|
| Back to top |
|
 |
Claz Newbie
Joined: 03 Jan 2009 Posts: 23 Location: The Netherlands
|
Posted: Wed Feb 02, 2011 11:04 pm Post subject: |
|
|
Aslan is right: the Image element of VDS can show png's.
But that's only a viewer element: you're not able to use it to save any graphical data with it.
And my question remains: how do you create the graph? With piechart, with shapes? |
|
| Back to top |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Thu Feb 03, 2011 3:28 am Post subject: |
|
|
| I would recommend using a browser based graph or pie chart and just use the browser element which will also allow you to print. |
|
| Back to top |
|
 |
|