Hi,
I want to find whether the parameter field{?test} is used in the report formula such as record selection formula, group selection formula etc using crystal SDK.
I tried ParameterFieldUsage2.InUse but its used for checking against the formula fields but not checking the record selection formula and group selection formula
Tried like parameterFieldDefinition.ParameterFieldUsage2 == ParameterFieldUsage2.InUse . Also i tried all the ParameterFieldUsage2 enum but no help.
Also i tried parameterFieldDefinition.UseCount property. but this also not give the proper result.
Currently am achiveing this functionality like the below code but i believe its not sound good to check for contains and also What if the line is commented out, or the parameter name happens to be part of a field/another parameter.
String recordSelectionFormula = subreportdocument.DataDefinition.RecordSelectionFormula;
String groupSelectionFormula = subreportdocument.DataDefinition.GroupSelectionFormula;
if (recordSelectionFormula.Length > 0)
{
if (recordSelectionFormula.Contains(parameterFormulaName))
{
return true;
}
}
if (groupSelectionFormula.Length > 0)
{
if (groupSelectionFormula.Contains(parameterFormulaName))
{
return true;
}
}
So is any API available to check whether the parameter field{?test} is used in the report formula such as record selection formula, group selection formula etc
Also please find the attached snapshot for the reference(Parameterfield.PNG ).
Please help me out.
Thanks in advance,
Somasekar.T