Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I know this has been discused a lot but I can't find an example of the complete solution so I try to make myself as clear as possible.
QV Server Version 10.0.0.x
I have sucessfully created AJAX pages on the server so there is no technical problems. I use the code in opendoc.htm that loads the toolbar, sheetheaders and all the objects on a sheet. As long as the code
<div id="PageContainer">
<div id="MainContainer"></div>
</div>
is included all the objects are nicely arranged as in the QlikView .qvw file. No problem so far.
But I want to take one single object from the page and put it in a table without the toolbar, tabs and other objects. I have seen solutions for QV7,8,9 etc but none seen to work. The generally seem to have the form:-
In the header
<script javascript etc....>.
var qva;
var qva = new Qva.PageBinding();
qva.View = "QLM";
qva.Autoview = "";
qva.AuthenticateUrl = 'QvAJAXZfc/Authenticate.aspx';
new Qva.Scanner(qva);
... </script>
In the body of the document is a table <table style="width:auto;" avq="graph:.CH01" class="Chart"></table>
or something similar.
This produces no errors but does not show anything either.
Anyone know what is missing?
Thanks for any help.
Hi,
Do you have more information about what doesn't work? Do you get en
error message or just a web page with nothing or what?
I'm not sure I understand the second question about the fixrd point QV
document.
Andy
Hi,
I get a web page with nothing (no errors).
the second question: I want to place some object qlikview in html page without recall the document address bar.
Thanks.
Marco.
Hi Andy,
it's possible that is a problem with the API?
Here is the code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:zfp="http://www.qliktech.com/zfp" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>QlikView
</title>
<meta http-equiv="X-UA-Compatible" content="IE=9; IE=EmulateIE8" />
<link rel="stylesheet" type="text/css" media="screen" href="http://miriel.prov.bz/QvAjaxZfc/htc/default.css" />
<!link rel="stylesheet" type="text/css" media="screen" href="http://miriel.prov.bz/QvAjaxZfc/htc/modal/modal.css" />
<link rel="stylesheet" type="text/css" href="/QvAjaxZfc/htc/avq.css"/>
<script type="text/javascript" src="/QvAjaxZfc/htc/QvAjax.js"></script>
<script type="text/javascript">
<!-- // Script for QlikView AJAX integration -->
var qva;
function Init() {
qva = new Qva.PageBinding('QLM'); //can have several binders each with their own doc and authentication etc.
var doc = Qva.ExtractProperty("document", null);
qva.View = doc;
new Qva.Modal();
new Qva.Scanner();
qva.Autoview="";
qva.AuthenticateUrl = '/QvAJAXZfc/Authenticate.aspx';
qva.Host="Local";
Qva.Start();
}
</script>
</head>
<body>
<div>
<div class="QvFrame" avqview="QLM" avq="object:.Document\CH01" id="Document\CH01" style="float:left;display:none;width:460px;height:258px;">
</div>
<div style="float:left;width:10px;height:258px;">
</div>
<div style="float:left;">
<div class="QvFrame" avqview="QLM" avq="object:.Document\LB01" id="Document\LB01" style="display:none;width:100px;height:150px;">
</div>
<div style="height:10px;">
</div>
<div class="QvFrame" avqview="QLM" avq="object:.Document\LB02" id="Document\LB02" style="display:none;width:100px;height:98px;">
</div>
</div>
<div style="float:left;width:10px;height:258px;">
</div>
</div>
I have only change the link of the css files.
Then I have the document qvajaxintegration.qvw in the root folder of qvs with the treee object (CH01, LB01 and LB02) and I call the html file so:
http://miriel.prov.bz/qvajaxintegration.htm?document=qvajaxintegration.qvw
thanks
Hi again,
I can't see anything wrong with the script. As long as all the files are
in the correct folders then I am not sure what to suggest. I know
sometimes the virtual folders used by QlikView on the server
(src="/QvAjaxZfc/htc/QvAjax.js
<outbind://289/miriel.prov.bz/QvAjaxZfc/htc/QvAjax.js> ") can be
different acording to your installation. Check that these paths exist on
your IIS installation.
Andy
If you are running qv11 we re-introduced the simple div-tag integration. Less code and alot more managable.
<head>
<script type="text/javascript" src="http://localhost/QvAjaxZfc/htc/QvAjax.js"></script>
</head>
<body>
<script type="text/javascript">
Qv.InitWorkBench({View: 'test'});
<!-- Run custom code, apply selections, throw nasty exception errors or do anything you want -->
</script>
<div class="QvFrame" avqview="test" avq="object:.Document\TX01"
id="Document\TX01" style="width:400px;height:250px;">
</body>
Hi Alexander,
Thanks for the answer, but I have qv10 on the server.
Hi Andy,
I check in the web server qlikview and it's ok.
I create a virtual directory in IIS too, but doesn't work again.
Thanks for that reply Alexander. You've made my day . We're going up to v11 very soon and this will make life much easier. This thread has been read rather a lot maybe indicating that I wasn't alone with this problem so I'm sure lots of others will be happy too.
Hi Andy,
Thank you for the HTML code for placing single objects in an HTML page.
Would you be able to describe exactly how this should be implemented? Where does the file need to be placed and what needs to change in the code?I have ensured that the CSS and JS files are in place, and that the virtual directory (QvAJAXZfc) works. I have placed the HTML file in this QvAJAXZfc directory also.
Unfortunately, nothing is displayed. If I use bits of the opendoc.htm code, I can get the toolbar or the entire document to display, but the individual objects never appear.
I have copied all your code, but I think it might be something with the way I define these parts:
//in the script
qva = new Qva.PageBinding('QLM');
//in the body
<div class="QvFrame" avqview="QLM" avq="object:.Document\TX1034" id="Document\TX1034" style="display:none;width:100px;height:150px;">
</div>
<div class="QvFrame" avqview="QLM" avq="object:.Document\CH211" id="Document\CH211">
</div>
I have tried changing "QLM" to "Test2", the name of my application, but this doesn't work either.
Here is how I call the application:
http://qvserver/QvAJAXZfc/QvObject.htm?document=Test2.qvw&host=Local
I hope you can help
Thanks!
Simon
Is there solvason answer to the question?