Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I reloaded my report from prj folder and stored variables into a qvd file.
For chart dimensions I use =$(vDim.RptPeriod) . When i reloaded the report from prj folder, the expression for a single variable is as below :
vDim.RptPeriod = if(Period_Key>==FieldValue('RptPeriod_Key', FieldIndex('RptPeriod_Key', =Max(RptPeriod_Key)) + 5)
and Period_Key<==Max(RptPeriod_Key), Period)
In the original report, the variable value should be 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. This is throwing error on the report and the error is - //Error in Calculated Dimension
Request help on this.
Below is the code i have used to store and load variable values :
// Added to store varaibles
VariableNames:
LOAD Name AS VariableName
FROM [FileName-prj\AllProperties.xml] (XmlSimple, Table is [AllProperties/VariableProperties/VariableProperties]);
FOR i=0 TO NoOfRows('VariableNames')
LET varName = Peek('VariableName', $(i), 'VariableNames');
LET varValue = $(varName);
Variables:
LOAD
'$(varName)' AS VariableName,
'$(varValue)' AS VariableValue
AutoGenerate 1;
NEXT
STORE Variables INTO Variables.qvd (QVD);
DROP Tables VariableNames, Variables;
// Added to Load variables from QVD File
Variables:
LOAD VariableName,
VariableValue
FROM Variables.qvd (qvd);
FOR i=0 TO NoOfRows('Variables')
LET vVar = Peek('VariableName', $(i), 'Variables');
LET vVal = Peek('VariableValue', $(i), 'Variables');
LET '$(vVar)' = '$(vVal)';
NEXT
@krishnajamylavarapu16 I think the better way to handle this would be to just put all the variables etc. into a text file and use the Include function to pull that straight in from the text file instead of trying to go at is as you are currently. Here is the Help link on Include function:
Regards,
Brett