Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
markodonovan
Specialist
Specialist

Workbench div integration - strange chart displayed

Hi there,

I'm doing some experimenting with workbench at the moment.

Creating a simple qvobject everything works fine.

<qww:QvObject ID="QvObject1" runat="server" ObjectID="CH05" ObjectType="Bar Chart" QlikViewDocument="Operational KPI (Local)" Width="600px" />

When I try the div integration the chart doesn't display correctly :

Here is the code:

IN THE HEAD:

<script language="javascript" type="text/javascript">

    Qv.InitWorkBench({

        View: 'Operational KPI',

       

    });

DIV:

<div class="QvFrame" avqview="Operational KPI" avq="object:.Document\CH05"></div>

Has anyone see this problem, maybe I just need some css to fix it ?

At the moment when I try to add the qvobject into a site I get the following error:

The Controls collection cannot be modified because the control contains code blocks




Thanks in Advance.

Mark

1 Solution

Accepted Solutions
markodonovan
Specialist
Specialist
Author

Hate to reply to my how post.

I got the div integration working, it was just some style\div problems.

Here is the working div:

<div avqview="Operational KPI" avq="object:.Document\CH05"  style="top:64px;left:32px;width:500px;height:500px;"></div>

HEAD:

<script language="javascript" type="text/javascript" src="http://orbis-sginttest/QVAJAXZfc/htc/QvAjax.js"></script>

<script language="javascript" type="text/javascript">

    Qv.InitWorkBench({

        View: 'Operational KPI',       

    });

</script>

I will have another look at the qvobject error but for the time being I am very happy to use this.

Mark

View solution in original post

7 Replies
markodonovan
Specialist
Specialist
Author

Hate to reply to my how post.

I got the div integration working, it was just some style\div problems.

Here is the working div:

<div avqview="Operational KPI" avq="object:.Document\CH05"  style="top:64px;left:32px;width:500px;height:500px;"></div>

HEAD:

<script language="javascript" type="text/javascript" src="http://orbis-sginttest/QVAJAXZfc/htc/QvAjax.js"></script>

<script language="javascript" type="text/javascript">

    Qv.InitWorkBench({

        View: 'Operational KPI',       

    });

</script>

I will have another look at the qvobject error but for the time being I am very happy to use this.

Mark

markodonovan
Specialist
Specialist
Author

The other error I was getting was due to code blocks in the Master page of the asp.net website:

The Controls collection cannot be modified because the control contains code blocks

Here are a couple of links that might help:

http://forums.asp.net/p/1328057/2657284.aspx

http://www.dotnetgoodies.com/article/ASP.NET_Web_Application_Development/66/The_Controls_collection_...

Thanks

Mark

Not applicable

Hi Mark,

When I tried to do DIV integration into Java web based application I am getting error. Please could you help me. Here is my details...

I want to implement, DIV integration with Qlikview into Java web application. Java application run on serverA whereas QVWS,QVS are on serverB. I was able to implement Webticket method to open any document using opendoc.htm through iFrames and/or displaying the report in separate tab on browser.

But I couldnt get handle on implementing DIV integration into Java web application and my below code is not working on my server, any idea/thought you can throw at me.

<!DOCTYPE html >

<head>

  <script language="javascript" type="text/javascript" src="http://<serverB>/QVAJAXZfc/htc/QvAjax.js"></script>

  <script language="javascript" type="text/javascript">

  var QvDoc_Tariff;

  var lb_Tariff_State;

  Init_Tariff = function ()

  {

  QvDoc_Tariff = Qv.GetDocument('TariffRates');

  lb_Tariff_State = QvDoc_Tariff.GetObject('Document\\LB57');

  }

  Clear_Tariff = function ()

  {

  QvDoc_Tariff.Clear();

  }

  Clear_Tariff_State = function () {

  lb_Tariff_State.Data.ClearSelections();

  }

    Qv.InitWorkBench(

                  { View: 'TariffRates'              

  , Host: "Customer"

  //, Anonymous: 'true'

  , Userid: "domain\user"

  , Password: "XXXXXXXXX"

  //, Ticket: "webticket"

  // Trigger Onload function

                         , BodyOnLoadFunctionNames: ['Init_Tariff'   // This will initialize global reference variables for objects

                             //,'Clear_Tariff'  // This will execute the command to clear the initial settings

  //,'Function3'

                             ]

  , InitialSelections: ["LB55,Interstate"

                       //"{object2},selection1,[selection2],[selectionX]"

                       ]

  , InlineStyle: true

  }

                 );

  // ======================

  // Qlikview LERG document

  // ======================

  var qvDoc_LERG;

  Init_LERG = function() {

  qvDoc_LERG = Qv.GetDocument('CUSTOMER\\CUSTOMER_LERG');

  }

  Clear_LERG = function() {

  qvDoc_LERG.Clear();

  }

    Qv.InitWorkBench(

                  { View: 'CUSTOMER\/CUSTOMER_LERG'

  , Host: "Customer"

  //, Anonymous: 'true'

  , Userid: "domain\user"

  , Password: "XXXXXXXXX"

  //, Ticket: "webticket"

  // Trigger Onload function

                         , BodyOnLoadFunctionNames: ['Init_LERG'

                             ,'Clear_LERG'

                             ]

  }      );

  </script>

  <style>

  header  { background-color:#1B8066;

  color:white;

  text-align:left;

  padding:2px;

  }

  section { color:#035393;

  }

  .report { float: left;

  margin: 5px;

  padding: 0px;

  border: 5px solid black;

  }

    .QvInlineObject

  {

    position:relative;

    margin-left:0px;

    margin-right:0px;

    float:left;

  }

  </style>

</head>

<body>

  <header>

  <h1>Qlikview HTML</h1>

  </header>

  <section>

  <h1>Tariff Data</h1>

  <!--- Default sizes in the Tariff document is width=1210 and height=556 -->

  <!--- Though there is virtually no documentation that explains this, you *have* to include the id= in the DIV integration so that objects work together -->

        <div class="report">

  <div class="QvInlineObject" avqview="TariffRates" avq="object:.Document\LB57" id="Document\LB57" avqstyle="true" style="width:120px;height:300px;"></div>

        </div>

  <div class="report" style="width:1010px;height:300px;">

  <div class="QvInlineObject" avqview="TariffRates" avq="object:.Document\CH03" id="Document\CH03"></div>

        </div>

  </section>

  <br clear="all" />

  <section>

  <div class="container">

  <button type="button" class="btn" onclick="Clear_Tariff()">Clear_Tariff()</button>

  <button type="button" class="btn" onclick="Clear_Tariff_State()">Clear_Tariff_State()</button>

  <button type="button" class="btn" onclick="GetObjectListTest()">GetObjectListTest()</button>

  </div>

  </section>

  <br clear="all" />

  <section>

  <h1>LERG Data</h1>

  <h4>The purposes of this section is primarily to show how Qlikview DIV integration can pull objects from multiple documents</h4>

  <!--- Note that this document exists in a sub-folder on the QV server, for parsing reasons you have to do a double forward slash (you'll never find that in any docs) -->

        <div class="report"  style="width:1210px;height:200px;>

  <div class="QvInlineObject" avqview="CUSTOMER\/CUSTOMER_LERG" avq="object:.Document\TB03" id="Document\TB03" avqstyle="true"></div>

        </div>

  </section>

</body>

</html>

When I run above html, getting " No Connection" ... then "Reconnecting...".. then SESSION ...CALs errors..

but no specific information I am getting.

markodonovan
Specialist
Specialist
Author

Hi rameshrepala,

Just a few questions.

Are you getting any error messages in the qlikview server error logs ?

Can the user open the documents without any problem through the accesspoint?

Finally what type of qlikview server are you using ?  Just in case it is a qlikview extranet server that has a limited number of documents that can be used.

If I get time I'll try to replicate the problem.

Thanks

Mark

www.techstuffybooks.com

Not applicable

Hi Mark,

Yes, I can open the documents without any issue through access point.

Yes, any number of people can view the documents without any issue.

And more important I have made few changes last night.. those I am outlining here..

Previous:

My Java app server running on ServerA:portXXXX

and QVWS was running on ServerB

with that configuration, I tried to do Workbench setup on ServerB and tried to implement Div integration,

then ended somany issues...

Now:

My Java app server running on ServerA:portXXXX

and QVWS was running on ServerA:portYYYY

but still getting the same errors...

Here are my observrations when I run my web application ..

Throgh all the browser im getting..

"Network error"..  this is keeps coming.(like looping)..

From IE browser..

I dont see any errors  in JS console..

From Chrome & Firefox browsers:

I can see that CORS errros occurring... 

I thought that, when both the servers have same IP, this shouldnt occur, but its happening...

Do you have any idea that, how can I fix this?

And one more thing, I have observed that, you are author of few QlikView books, by any chance did you try to address topics like this in any of your books?

Please let me know.

Thanks,

markodonovan
Specialist
Specialist
Author

Hi rameshrepala,

The only experience of have of CORS errors was using WCF web services with qlikview.  To solve those problems I had to set the Access-Control-Allow-Methods property in the web service to allow "POST, OPTIONS, GET".  This can be set in IIS as well if that is the web server you are using.

My book 'Practical QlikView 2 - Beyond Basic QlikView' only gives a simple introduction into using workbench which I do not think will help with your particular problem.

Have you tried running fiddler on your machine to get some more information into the errors you are having?

I do not have access to a qlikview server with workbench at the moment so I will not be able to replicate the problem.

Can you try removing the following line from the Qv.InitWorkBench :

Host: "Customer"

If this does not help or you don't see anything in the fiddler logs I would create another question so you get more responses as this question has already been answered.

Thanks

Mark

youtube.com/practicalqlik

Not applicable

Hi mark,

Thank you for responce. I tried enabling CORS on QVWS and I tried removing Host value as well.Nothing is worked. And Fiddler always showing request is successful and giving 200 status.

Just looking for some proxy solution in my case, but couldnt get anything.If you know anything, plz let me know.

Thanks,