RDD BAQ PARAMETER - Parse XML code

In BAQRpts - the BAQR parameters could be pulled from the BAQReportParameter_GUID table by name. eg. FILTER1, OPTION2, CheckBox3 etc. and used in the SSRS

but in the new BAQ/RDD format these parameters are included in a single field - UserCriteria - stored within 4 tagged XML fields as data values for PromptID, PromptValue, PromptName, and Label.

so if i had two parameters i would see a string field of

<RptCriteriaPrompt>      
<PromptID>2</PromptID>      
<PromptValue>2019</PromptValue>      
<IsToken>false</IsToken>      
<PromptName>PromptYEAR</PromptName>      
<DataType>int</DataType>      
<Label>Fiscal Year</Label>    
</RptCriteriaPrompt>    

<RptCriteriaPrompt>      
<PromptID>1</PromptID>      
<PromptValue>12</PromptValue>      
<IsToken>false</IsToken>      
<PromptName>PromptPERIOD</PromptName>      
<DataType>int</DataType>      
<Label>Fiscal Period</Label>    
</RptCriteriaPrompt>  
</UICriteria>

Since the RDD prompts are related to BAQ parameters, I am able to create calculated fields in the BAQ based on the prompt value, and then pull them into the SSRS from there from the result data set.
But i am considering does anyone out there have code to extract/parse these individual parameters directly from the new RDD/BAQ parameter data set field. And make them available for use in the SSRS report?

TIA

@hasokeric had some stuff in the original thread but I’m not sure how far he went with it.

1 Like

Thanks, I never realized that code was available.
Now I am able to pull my report options out of the user criteria by name. Much Appreciated!!!

=Code.GetCriteriaPromptValue(First(Fields!UserCriteria.Value, "RptParameter"),"SYEAR")