forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Browser Element
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
DoT_PiTcH
Contributor
Contributor


Joined: 07 Aug 2002
Posts: 85

PostPosted: Mon Jan 31, 2011 9:19 pm    Post subject: Browser Element Reply with quote

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
View user's profile Send private message Visit poster's website
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Tue Feb 01, 2011 12:15 am    Post subject: Reply with quote

That should work just fine.
Back to top
View user's profile Send private message Send e-mail
DoT_PiTcH
Contributor
Contributor


Joined: 07 Aug 2002
Posts: 85

PostPosted: Tue Feb 01, 2011 4:03 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Claz
Newbie


Joined: 03 Jan 2009
Posts: 23
Location: The Netherlands

PostPosted: Tue Feb 01, 2011 6:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Tue Feb 01, 2011 6:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
DoT_PiTcH
Contributor
Contributor


Joined: 07 Aug 2002
Posts: 85

PostPosted: Tue Feb 01, 2011 6:57 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Claz
Newbie


Joined: 03 Jan 2009
Posts: 23
Location: The Netherlands

PostPosted: Tue Feb 01, 2011 9:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
Claz
Newbie


Joined: 03 Jan 2009
Posts: 23
Location: The Netherlands

PostPosted: Tue Feb 01, 2011 9:37 pm    Post subject: Reply with quote

I now see it does not answer your question at all. Embarassed

I'm not very familiar with using layers in html, but I hope somebody else does.

Sorry
Back to top
View user's profile Send private message
DoT_PiTcH
Contributor
Contributor


Joined: 07 Aug 2002
Posts: 85

PostPosted: Tue Feb 01, 2011 10:02 pm    Post subject: Reply with quote

how do i save a graph to an image file in general?
Back to top
View user's profile Send private message Visit poster's website
Claz
Newbie


Joined: 03 Jan 2009
Posts: 23
Location: The Netherlands

PostPosted: Tue Feb 01, 2011 10:06 pm    Post subject: Reply with quote

What's the format of your graph ?
Back to top
View user's profile Send private message
DoT_PiTcH
Contributor
Contributor


Joined: 07 Aug 2002
Posts: 85

PostPosted: Tue Feb 01, 2011 10:52 pm    Post subject: Reply with quote

the VDS element. i want to save the element as a image
Back to top
View user's profile Send private message Visit poster's website
Claz
Newbie


Joined: 03 Jan 2009
Posts: 23
Location: The Netherlands

PostPosted: Tue Feb 01, 2011 11:06 pm    Post subject: Reply with quote

Do you mean the Piechart element?
Back to top
View user's profile Send private message
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Wed Feb 02, 2011 2:40 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Claz
Newbie


Joined: 03 Jan 2009
Posts: 23
Location: The Netherlands

PostPosted: Wed Feb 02, 2011 11:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Thu Feb 03, 2011 3:28 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group