Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
The script for laoding these qvd files contains code for load, let, drop, resident, where, concatenate, where, and so on... => a long script for handeling the loading and errorhandling, etc - all the nececarry code for making the reports work
Is it possible to write the Load script in a text file, and import this script into the QV editor...?
The point is:
If I have to change something in the code, i will have to update the code in all 5 QVW files... It would be better if I could only update the textfile, so that all five files will have the new updated code when they are reloaded.
Is this possible? or is it better ways to solve these kind of problems?
Hi,
Elaborating on what bauernschmitt says, that's one good way to achieve that.
Say you have the following script (I know it's dummy, just for example purposes):
TableOne:
RowNo() AS RecordNo,
Ceil(Rand() * 100) AS Amount
AUTOGENERATE 200;
Now save this text using notepad (or any other plain text tool) as "script.qvs", or directly from the Script Editor dialog, File, Export to Script File (result is the same). The .qvs is just a extension to differentiate between normal txt files and QlikView script files. A .txt file will work fine.
In your files, instead of copying five times the script above, set the following:
SET ThousandSep='.';
SET DecimalSep=',';
SET MoneyThousandSep='.';
SET MoneyDecimalSep=',';
SET MoneyFormat='#.##0,00 €;-#.##0,00 €';
SET TimeFormat='h:mm:ss';
SET DateFormat='DD/MM/YYYY';
SET TimestampFormat='DD/MM/YYYY h:mm:ss[.fff]';
SET MonthNames='ene;feb;mar;abr;may;jun;jul;ago;sep;oct;nov;dic';
// This is the same as pasting the script below
$(=include='C:\Folder\To\script.qvs');
You will need to reload in order to get the new script working.
Hope that makes sense.
Miguel
Hello
$(Include=filename)
Hi,
Elaborating on what bauernschmitt says, that's one good way to achieve that.
Say you have the following script (I know it's dummy, just for example purposes):
TableOne:
RowNo() AS RecordNo,
Ceil(Rand() * 100) AS Amount
AUTOGENERATE 200;
Now save this text using notepad (or any other plain text tool) as "script.qvs", or directly from the Script Editor dialog, File, Export to Script File (result is the same). The .qvs is just a extension to differentiate between normal txt files and QlikView script files. A .txt file will work fine.
In your files, instead of copying five times the script above, set the following:
SET ThousandSep='.';
SET DecimalSep=',';
SET MoneyThousandSep='.';
SET MoneyDecimalSep=',';
SET MoneyFormat='#.##0,00 €;-#.##0,00 €';
SET TimeFormat='h:mm:ss';
SET DateFormat='DD/MM/YYYY';
SET TimestampFormat='DD/MM/YYYY h:mm:ss[.fff]';
SET MonthNames='ene;feb;mar;abr;may;jun;jul;ago;sep;oct;nov;dic';
// This is the same as pasting the script below
$(=include='C:\Folder\To\script.qvs');
You will need to reload in order to get the new script working.
Hope that makes sense.
Miguel
Hi,
Save your script in QVS file, and use this QVS file in Qlikview by using
Edit Script-> Edit -> Include -> Select QVS file -> Open
This will place the $(Include=..\Script.qvs) in you script.
Every time you load, the script in the file also loads.
Hope this helps you.
Regards,
Jagan.
Thanks guys This solves my problem!