Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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?

7 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

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
Author

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
Author

@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"

Peter_Cammaert
Partner - Champion III
Partner - Champion III

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
Author

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

Peter_Cammaert
Partner - Champion III
Partner - Champion III

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
Author

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