Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
We re-created our QlikView report from prj folder, and the report is missing data for document level variables.
Report reloaded the data for the variables defined in the script level. Is there any way to get the values defined for the document level defined variables.
Not from the prj files, variables are considered as data and are therfore not stored in the Prjs. If you have access to the original qvw file you should be able to extract the variables from it (do a Google search to figure out how to).
A best practice for the future is to define all variables in the script code. Then the variables can be recreated if the qvw is lost, get corrupted or if someone clears the application data.
Not from the prj files, variables are considered as data and are therfore not stored in the Prjs. If you have access to the original qvw file you should be able to extract the variables from it (do a Google search to figure out how to).
A best practice for the future is to define all variables in the script code. Then the variables can be recreated if the qvw is lost, get corrupted or if someone clears the application data.
Thanks for the response Vegar! It worked for me
Hi Community,
I reloaded my report from prj folder and stored variables into a qvd file.
there are so many variables in my report. For chart dimensions I use =$(vDim.RptPeriod) . The variable definition is as below :
vDim.RptPeriod = if(Period_Key>=$(vMinRptPeriod) and Period_Key<=$(vMaxRptPeriod), Period)
vMinRptPeriod = Max(RptPeriod_Key)
vMinRptPeriod = FieldValue('RptPeriod_Key', FieldIndex('RptPeriod_Key', $(vMaxRptPeriod)) + 5)
As I am loading the variables from prj folder, the variable has changed to below format :
vDim.RptPeriod = if(Period_Key>==FieldValue('RptPeriod_Key', FieldIndex('RptPeriod_Key', =Max(RptPeriod_Key)) + 5)
and Period_Key<==Max(RptPeriod_Key), Period)
Is there any option where i can store my variables in the way they are exactly in the main report.
Believe you need to use SET or LET statements in the load script as Vegar mentioned, this is the third post I have run across today regarding prj files and variable values, weird, but hopefully that is the piece you have been missing:
I am going to mark Vegar's post as the solution, as he was correct on everything.
Regards,
Brett