Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Change the Generator - with a command "call from QVD?

I want to change the struktur of the "Generator"  - Where should I do this? In the Scrpt of the Qlickview Generator or in the qvd or in the QVS Scripts?

my Problem:

In the Generator I change the Script "main", "Version a. ChangeLog",..., "loadFromDB".

By the  QVS script I have the Expression:

sub loadQVD (name1)

$(name1):

Load * from (name1).qvd (qvd);

I have also the QVS, but I get the error_

"Tabelle not found". But I have this QVD, a blank data.

Where should I change this? Must I change the QVS?

Tags (1)
7 Replies

Re: Change the Generator - with a command "call from QVD?

You have two choices. Either one will do. The first one is less flexible (all QVDs should reside in the same folder), the second one means more work.

  1. Prefix the source specification with a correct path (or a variable that contains the path to your QVDs), like in:
    LOAD * FROM D:\Data\$(name).qvd (qvd);
  2. Or in every call to the loadQVD subroutine, add this same path to the parameter value, like in:
    CALL loadQVD('D:\Data\DateiEins.qvd');

Best,

Peter

Not applicable

Re: Change the Generator - with a command "call from QVD?

The Generator take the correct "qvd". I test it with the debugger, "STORE name1 INTO 'K:\Elger\new\qvshare\daten\qvd\abas\new\help1.qvd (qvd)

I make it with "LET base = 'K:\Elger\new\qvshare'; and in the script "LET Dir_data = base & '\data\qvd';

He found it but he send despite the error!

Not applicable

Re: Change the Generator - with a command "call from QVD?

@Peter Cammaert thanks for answer, despite I have been having the same problem.

And on the next step:

"Tabelle not found!"

And on the right side of the debugger i see now:

"ScriptErrorCount    1

ScriptErrorDetails    "Tabelle nicht gefunden"

ScriptErrorList    General Error 

ScriptError    General Error"

Re: Change the Generator - with a command "call from QVD?

My best suggestion to you is: let the Generator create a log file (enable Settings->Document Properties->General->Generate log file). In the log file, all variables will be expanded so that you can see which path and file name are being used in reality.

BTW you store table name1 into file help1. Which table name do you specificy as parameter to the loadQVD call?

Not applicable

Re: Change the Generator - with a command "call from QVD?

And in the QVD I have nothing to change? Only in the Script in the Generator?

Re: Change the Generator - with a command "call from QVD?

A single QVD contains a single table with rows and columns. QVDs can only be changed by changing the corresponding script code.

If you mean, "do I have to change the QVW" (report document), you may have to. If the location of the generated QVDs changes in the Generator, then you better modify the LOAD statements used by the QVW as well. If the QVW uses the same external script file (where SUB loadQVD resides), that you already corrected, then you are set and ready to go.

Not applicable

Re: Change the Generator - with a command "call from QVD?

Thank You! I will make it! That was very helpful from you.

Community Browser