Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
glacoste
Creator
Creator

Inherit graphic elements order in "Internal Viewer Tables"

Dear, I have 2 QlikView Documents:

- The first is a load document, in other words this is read from database tables and creates the QlikView tables.

- The second read from first model using the "Binary" command.

In both documents I can order the graphic elements using the "Internal Viewer Tables", I only want to order the first document.

Is it possible to inherit or copy/paste the order of the elements in the draw area? Thanks in advance.

1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

The only way I know of where  you can get and manipulate the Table Viewer "graphic"/layout properties is by enabling the prj-folder so QlikView stores and updates all application information (except data model) in XML files in the prj-folder.

The prj-folder can be enabled for a specific qvw-file by making a folder named the same as the qvw-file but without any extension and -prj appended to the file name. Like this:    ABC.QVW requires an empty/newly created folder named ABC-prj - which you just create yourself with Windows Explorer.

When you have done that you will notice that this folders gets populated and updated each time you open, save, store the QVW-file.

In this folder you will find a file named "DocInternals.xml" and in this XML-file you will find a section named <TableViewData>. Here you will find all accessible attributes for the tables and links between the tables that the Table Viewer has. I have made a new QVW by just creating an empty QlikView document called QV1.QVW and a new folder alongside QV1.QVW called QV1-prj. My load script is as follows:

Characters:

Load Chr(RecNo()+Ord('A')-1) as Alpha, RecNo() as Num autogenerate 26;

ASCII:

Load

if(RecNo()>=65 and RecNo()<=90,RecNo()-64) as Num,

Chr(RecNo()) as AsciiAlpha,

RecNo() as AsciiNum

autogenerate 255

Where (RecNo()>=32 and RecNo()<=126) or RecNo()>=160 ;

Transactions:

Load

TransLineID,

TransID,

mod(TransID,26)+1 as Num,

Pick(Ceil(3*Rand1),'A','B','C') as Dim1,

Pick(Ceil(6*Rand1),'a','b','c','d','e','f') as Dim2,

Pick(Ceil(3*Rand()),'X','Y','Z') as Dim3,

Round(1000*Rand()*Rand()*Rand1) as Expression1,

Round(  10*Rand()*Rand()*Rand1) as Expression2,

Round(Rand()*Rand1,0.00001) as Expression3;

Load

Rand() as Rand1,

IterNo() as TransLineID,

RecNo() as TransID

Autogenerate 1000

While Rand()<=0.5 or IterNo()=1;

Comment Field Dim1 With "This is a field comment";

When you open the Table Viewer and manipulates the placement of the tables a little bit you can save your document and close it.

Then you use Notepad or the free Notepad++ which can be used to edit the XML-file you will find in the QV1-prj folder named DocInternals.xml. You will see something similar to this:

2015-07-29 #1.PNG

You can change various parts of this section and save the xml-file and then reopen QV1.qvw and it will change accordingly.

So to the final conclusion ... you could if you have two similar data model in two different QlikView applications cut and paste parts or the entire section of <TableViewData> between them. Just make sure that you understand the different parts of it and that the data models are very similar if not identical.

View solution in original post

2 Replies
petter
Partner - Champion III
Partner - Champion III

The only way I know of where  you can get and manipulate the Table Viewer "graphic"/layout properties is by enabling the prj-folder so QlikView stores and updates all application information (except data model) in XML files in the prj-folder.

The prj-folder can be enabled for a specific qvw-file by making a folder named the same as the qvw-file but without any extension and -prj appended to the file name. Like this:    ABC.QVW requires an empty/newly created folder named ABC-prj - which you just create yourself with Windows Explorer.

When you have done that you will notice that this folders gets populated and updated each time you open, save, store the QVW-file.

In this folder you will find a file named "DocInternals.xml" and in this XML-file you will find a section named <TableViewData>. Here you will find all accessible attributes for the tables and links between the tables that the Table Viewer has. I have made a new QVW by just creating an empty QlikView document called QV1.QVW and a new folder alongside QV1.QVW called QV1-prj. My load script is as follows:

Characters:

Load Chr(RecNo()+Ord('A')-1) as Alpha, RecNo() as Num autogenerate 26;

ASCII:

Load

if(RecNo()>=65 and RecNo()<=90,RecNo()-64) as Num,

Chr(RecNo()) as AsciiAlpha,

RecNo() as AsciiNum

autogenerate 255

Where (RecNo()>=32 and RecNo()<=126) or RecNo()>=160 ;

Transactions:

Load

TransLineID,

TransID,

mod(TransID,26)+1 as Num,

Pick(Ceil(3*Rand1),'A','B','C') as Dim1,

Pick(Ceil(6*Rand1),'a','b','c','d','e','f') as Dim2,

Pick(Ceil(3*Rand()),'X','Y','Z') as Dim3,

Round(1000*Rand()*Rand()*Rand1) as Expression1,

Round(  10*Rand()*Rand()*Rand1) as Expression2,

Round(Rand()*Rand1,0.00001) as Expression3;

Load

Rand() as Rand1,

IterNo() as TransLineID,

RecNo() as TransID

Autogenerate 1000

While Rand()<=0.5 or IterNo()=1;

Comment Field Dim1 With "This is a field comment";

When you open the Table Viewer and manipulates the placement of the tables a little bit you can save your document and close it.

Then you use Notepad or the free Notepad++ which can be used to edit the XML-file you will find in the QV1-prj folder named DocInternals.xml. You will see something similar to this:

2015-07-29 #1.PNG

You can change various parts of this section and save the xml-file and then reopen QV1.qvw and it will change accordingly.

So to the final conclusion ... you could if you have two similar data model in two different QlikView applications cut and paste parts or the entire section of <TableViewData> between them. Just make sure that you understand the different parts of it and that the data models are very similar if not identical.

glacoste
Creator
Creator
Author

Thank Petter, this work for me !