Mik Mak
asked on
Embed Google Chart in MS Access
I'm trying to embed a Google Chart in MS Access 2010/13/16, via a web browser AxtiveX linked to a local html file - contents shown below. But I only get an empty white page. Any ideas would be most welcome :)
content_copy
<html>
<head>
<script type='text/javascript' src='https://www.gstatic.com/charts/loader.js'></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type='text/javascript'>
google.charts.load('curren t', {'packages': ['geochart']});
google.charts.setOnLoadCal lback(draw MarkersMap );
function drawMarkersMap() {
var data = google.visualization.array ToDataTabl e([
['City', 'Population', 'Area'],
['Rome', 2761477, 1285.31],
['Milan', 1324110, 181.76],
['Naples', 959574, 117.27],
['Turin', 907563, 130.17],
['Palermo', 655875, 158.9],
['Genoa', 607906, 243.60],
['Bologna', 380181, 140.7],
['Florence', 371282, 102.41],
['Fiumicino', 67370, 213.44],
['Anzio', 52192, 43.43],
['Ciampino', 38262, 11]
]);
var options = {
region: 'IT',
displayMode: 'markers',
colorAxis: {colors: ['green', 'blue']}
};
var chart = new google.visualization.GeoCh art(docume nt.getElem entById('c hart_div') );
chart.draw(data, options);
};
</script>
</head>
<body>
<div id="chart_div" style="width: 900px; height: 500px;"></div>
</body>
</html>
content_copy
<html>
<head>
<script type='text/javascript' src='https://www.gstatic.com/charts/loader.js'></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type='text/javascript'>
google.charts.load('curren
google.charts.setOnLoadCal
function drawMarkersMap() {
var data = google.visualization.array
['City', 'Population', 'Area'],
['Rome', 2761477, 1285.31],
['Milan', 1324110, 181.76],
['Naples', 959574, 117.27],
['Turin', 907563, 130.17],
['Palermo', 655875, 158.9],
['Genoa', 607906, 243.60],
['Bologna', 380181, 140.7],
['Florence', 371282, 102.41],
['Fiumicino', 67370, 213.44],
['Anzio', 52192, 43.43],
['Ciampino', 38262, 11]
]);
var options = {
region: 'IT',
displayMode: 'markers',
colorAxis: {colors: ['green', 'blue']}
};
var chart = new google.visualization.GeoCh
chart.draw(data, options);
};
</script>
</head>
<body>
<div id="chart_div" style="width: 900px; height: 500px;"></div>
</body>
</html>
There is a security issue with local html pages. I haven't experienced it myself, but recall reading about it a few times. Try to look into the "Mark of the web" issue.
A quick google gave me the following link, try to look at that.
http://wiki.helpmvp.com/home/notes/javascript/markoftheweb
A quick google gave me the following link, try to look at that.
http://wiki.helpmvp.com/home/notes/javascript/markoftheweb
ASKER
@Jim - yes it does
@Anders - I have tried to enable both of theses settings in IE that should control the local html page warning
1)Allow active content to run in files on My Computer
2)Allow Active Content from CDs to run on My Computer
3)"Mark of the web" put in the local html file, but it still only show a blank white page
@Anders - I have tried to enable both of theses settings in IE that should control the local html page warning
1)Allow active content to run in files on My Computer
2)Allow Active Content from CDs to run on My Computer
3)"Mark of the web" put in the local html file, but it still only show a blank white page
The other issue can potentially be an invalid cache setting in the registry (that's why I asked about IE11, which is what that active-x control is based on).
If the user can't write to the local cache properly, pages will appear blank. I had this happen with a client and Bing Maps. Pages that don't use cache services appear normally.
Jim.
If the user can't write to the local cache properly, pages will appear blank. I had this happen with a client and Bing Maps. Pages that don't use cache services appear normally.
Jim.
ASKER
It's tested on 3 different machines with Win 7 32/64 bit and IE 11 - Works fine when doubleclicking the local file, but nothing is shown in the embedded Access/browser page
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
BTW, if that works, then it boils down to security settings for Active-x and dovetails into Ander's comment.
Jim.
Jim.
ASKER
Hi Jim
#1 don't make any difference here when I'm already using the settings mentioned in my previous post. I'll have a go with your #2 suggestion, and report back :)
#1 don't make any difference here when I'm already using the settings mentioned in my previous post. I'll have a go with your #2 suggestion, and report back :)
<<#1 don't make any difference here when I'm already using the settings mentioned in my previous post. I'll have a go with your #2 suggestion, and report back :)>>
When you open the file directly in IE 11, do you get an active-x warning?
Jim.
When you open the file directly in IE 11, do you get an active-x warning?
Jim.
ASKER
No warnings in IE11
ASKER
Hmm tried to add the registry keys for my 32bit on 32 bit test machine for MSACCESS.EXE - tried both IE11 settings with no luck.. :)
ASKER
Setting the registry DWord value to 0 makes it work here, together with "Mark of the web" put in the local html file !
The writer on your link mentions it might be a way to Refer to the installed IE version
The writer on your link mentions it might be a way to Refer to the installed IE version
<<No warnings in IE11>>
Well given that, you should also check that cache registry key then, as it is something else. Key is:
HKEY_CURRENT_USER\Software \Microsoft \Windows\C urrentVers ion\Intern et Settings\5.0\LowCache\Exte nsible Cache\DOMStore\CachePath
incorrect entry is:
%USERPROFILE%\AppData\Loca l\Microsof t\Internet Explorer\DOMStore
correct entry is:
%USERPROFILE%\AppData\Loca lLow\Micro soft\Inter net Explorer\DOMStore
'LocalLow', not 'local'
There's also a similar key for the medium cache:
KEY_CURRENT_USER\Software\ Microsoft\ Windows\Cu rrentVersi on\Interne t Settings\5.0\Cache\Extensi ble Cache\DOMStore\CachePath
correct value:
%USERPROFILE%\AppData\Loca l\Microsof t\Internet Explorer\DOMStore
You should not have to change this.
and last, on the cache problem, run the following command from a command line prompt:
icacls %userprofile%\Appdata\Loca lLow /t /setintegritylevel (OI)(CI)L
This resets the folder security on the low cache folder.
I would also add that I did get your file to display, although I did add:
<meta http-equiv="X-UA-Compatibl e" content="IE=edge">
to the file. I did just re-test though and it still loaded.
Jim.
Well given that, you should also check that cache registry key then, as it is something else. Key is:
HKEY_CURRENT_USER\Software
incorrect entry is:
%USERPROFILE%\AppData\Loca
correct entry is:
%USERPROFILE%\AppData\Loca
'LocalLow', not 'local'
There's also a similar key for the medium cache:
KEY_CURRENT_USER\Software\
correct value:
%USERPROFILE%\AppData\Loca
You should not have to change this.
and last, on the cache problem, run the following command from a command line prompt:
icacls %userprofile%\Appdata\Loca
This resets the folder security on the low cache folder.
I would also add that I did get your file to display, although I did add:
<meta http-equiv="X-UA-Compatibl
to the file. I did just re-test though and it still loaded.
Jim.
<<Setting the registry DWord value to 0 makes it work here, together with "Mark of the web" put in the local html file ! >>
Ignore last comment then, except for the last sentence or two. You might want to add that markup. It tells the browser to use the latest version possible.
Jim.
Ignore last comment then, except for the last sentence or two. You might want to add that markup. It tells the browser to use the latest version possible.
Jim.
ASKER
Perfect Jim !
I was just testing on another machine with Acc2010 on a 64bit machin, where it didn't Work - but after adding then extra maktup you mentioned it Works great on this machine also :)
Thank you very much for your effort
I was just testing on another machine with Acc2010 on a 64bit machin, where it didn't Work - but after adding then extra maktup you mentioned it Works great on this machine also :)
Thank you very much for your effort
ASKER
Now I just need to find a way to transfer the data from the database into the map :)
That's another problem, and another question<g>.
Have a good day...
Jim.
Have a good day...
Jim.
ASKER
I know :)
Same to you
Same to you
Jim.