Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator III
Creator III

How to use a table from another QVW

Hi,

I was hoping someone could let me know whether it would be possible to use a table from another QVW.

The reason i want to do this, is that the final table created in a QVW used alot of resources and time to load, if i had to copy the very same code for another report it would be highly unnecessary.  Thus i would just like to use the final table from that QVW and show it along with other information in the new one I am creating.

Is this possible?  Or should i just opt to Store the final table and use the stored file to create a new table in the new QVW.

Which would be the easiest and most efficient.

Thanks in Advance.

Regards,

1 Solution

Accepted Solutions
Highlighted
Specialist III
Specialist III

Hey there,

Yes it is possible. You can make this by using a type of LOAD called Binary Load and you'll have all the data and tables from the other qvw. What you simply need to do is to drop every table that you don't require in your new qvw. Then you can link Final Table that you have spoken and continue your work.

Here is how you do a binary load from help:

=========================

Binary

The binary statement is used for loading the data from another QlikView document, including section access data. It does not load the layout information or variables. Only one binary statement is allowed in the script and it can only be put as the first statement of a script.

The syntax is:

binary file

where:

file ::= [ path ] filename

Examples:

Binary customer.qvw;

Binary c:\qv\customer.qvw;

The path is the path to the file, either absolute, or relative to the .qvw file containing this script line.

========================

Best regards,

Data Architect MB

View solution in original post

4 Replies
Highlighted
Specialist III
Specialist III

Hey there,

Yes it is possible. You can make this by using a type of LOAD called Binary Load and you'll have all the data and tables from the other qvw. What you simply need to do is to drop every table that you don't require in your new qvw. Then you can link Final Table that you have spoken and continue your work.

Here is how you do a binary load from help:

=========================

Binary

The binary statement is used for loading the data from another QlikView document, including section access data. It does not load the layout information or variables. Only one binary statement is allowed in the script and it can only be put as the first statement of a script.

The syntax is:

binary file

where:

file ::= [ path ] filename

Examples:

Binary customer.qvw;

Binary c:\qv\customer.qvw;

The path is the path to the file, either absolute, or relative to the .qvw file containing this script line.

========================

Best regards,

Data Architect MB

View solution in original post

Highlighted
Specialist II
Specialist II

Hi,

Syntax is Binary [Qlikview filename.qvw]

And when you go to file wizard and click on the Qlikview File by default the syntax of the file get loaded above to set expression

Ex;-

Binary [Qlikview Sales File.qvw];

SET ThousandSep=',';

SET DecimalSep='.';

SET MoneyThousandSep=',';

SET MoneyDecimalSep='.';

HTH

André Gomes

Highlighted

You could use a BINARY LOAD in a generic QVW document to export a single table from any other QVW to a QVD.

The script (there is no User Interface to speak of) goes somewhat like this:

BINARY [$(InputQVW)];

IF Not IsNull(NoOfRows('$(TableToStore)')) THEN

  STORE [$(TableToStore)] INTO [.\$(TableToStore).QVD] (qvd);

  TRACE >>>> Table [$(TableToStore)] successfully written to QVD.

ELSE

  TRACE >>>> Table [$(TableToStore)] couldn't be written to QVD, table does not exist.

END IF


EXIT Script;


The script uses variables that either already have a value (you can set their value in the Settings->Variable Overview) or that have their value passed via the command line.


And example command line execution might look like (I called the qvw with this script "Export.qvw"):


QV.EXE /r /vInputQVW=C:\QlikView\QVW\VeryBig.QVW /vTableToStore=FACTS Export.qvw


Useful?


Peter

Highlighted
Contributor
Contributor

Hi Peter,


Thank you for your sharing this script.

If it is possible to store "System Tables"  object in qlikview  to  store another .CSV file by using Binary load?

BINARY [$(InputQVW)];