Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to pass the db connection as commandline argument to QV file.
/*********************************/
"D:\CLICKVIEW\QlikView\Qv.exe" /l /vvar1=D:\cust_rep_1d.swt D:\qlickview\Copy of rpt_datafile1.qvw
/*********************************/
This above line of code wrks for me... Its a .bat file code..
BUT if i have to promt the user for i/p and accept that params then?
The below written code is not wrking for me... can anyone plz help.
/*********************************/
@echo off
echo "database connection"
set /p DBNAME=
echo %UserName% %PassWord%
"D:\CLICKVIEW\QlikView\Qv.exe" /l /v var1= %DBNAME D:\qlickview\Copy of rpt_datafile1.qvw
/*********************************/
Thanks,
Prajakta
Hello Prajakta,
Instead of doing that in the batch code, do it script side
LET vUser = Input('Please type User', 'Check this!');LET vPassword = Input('Please type Password', 'Check this!');
This will prompt the user for user and password and will store the result in those variables. You can use them further in the script.
Hope this helps
Thanks a lot.
I tried this,it works.... learned new thing.
However the requirement is they want to pass the uname & pwd before opening the report.. via command line.
if I give:
"D:\CLICKVIEW\QlikView\Qv.exe" /l /vvar1=D:\cust_rep_1d.swt D:\qlickview\Copy of rpt_datafile1.qvw
Where "D:\cust_rep_1d.swt" is the db file name--> then it works.
But how can i pass the same taking the i/p from user...
Would be great if you can provide any i/ps on this.
Thanks again.
You can use the recently created variables for that:
SET /P UserName=Enter User NameSET /P UserPassword=Enter User Password"D:\CLICKVIEW\QlikView\Qv.exe" /l /vvar1=D:\cust_rep_1d.swt /vvUser=%UserName% /vvPassword=%UserPassword% D:\qlickview\Copy of rpt_datafile1.qvw
Hope that helps
In this example given by you:
"D:\CLICKVIEW\QlikView\Qv.exe" /l /vvar1=D:\cust_rep_1d.swt /vvUser=%UserName% /vvPassword=%UserPassword% D:\qlickview\Copy of rpt_datafile1.qvw
can you please elaborate what does vUser means ?
Do we need to create vUser & vPassword as variables in the reports 1st.
Also How do ido it for database file name.
vUser and vPassword are variables that store what the user inputs when he's prompted by set /p.
I don't know which driver are you using to connect, so I don't know what do you need the user for. My guess is that you have a CONNECT string in your load script that must be completed with the information provided by the user, but anyway it would be faster if you first create your connection string in QlikView, the paste it here (scrambling user and password) so we know how it would look like.
Regards.
Hi Miguel, I'm doing this with section access. I want that the application don't ask for user id and password. I'm passing the parameters but it continues asking for the userid and password.
Can you help me??
Thanks.
Hello,
You will need to add the user with NTNAME field instead of USERID and password, since you cannot pass these parameters on the application so the section access validates the user that has logged on to the computer.
Hope this helps.
Thanks for your reply, the problem is that i´m in the production server, so the user that is log in is the administrator. And when I run the command line the userId requieres appears. How can I hold up this pop up??
Thanks