Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
krishnajamylavarapu16
Contributor III
Contributor III

Report recreated from prj folder has no information about document variables

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.

 

1 Solution

Accepted Solutions
Vegar
MVP
MVP

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. 

View solution in original post

4 Replies
Vegar
MVP
MVP

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. 

krishnajamylavarapu16
Contributor III
Contributor III
Author

Thanks for the response Vegar! It worked for me

krishnajamylavarapu16
Contributor III
Contributor III
Author

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.

 

Brett_Bleess
Former Employee
Former Employee

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:

https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/Scrip...

https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/Scrip...

I am going to mark Vegar's post as the solution, as he was correct on everything.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.