on 11-24-2011 4:58 PM
Hello Experts,
In one of the requirement, I wrote a formula to calculate Level from the Hierarchy of a particular Dimension.
Now, I need to prompt user input for the 'Level' and filter the report comparing "Prompt Level" and "Calculated Level". Im getting an error while writing the formula for this "This filed can be only used in a print-time formula".
What can be the reason? Any alternatives for this? Any help appreciated.
Regards,
arjun
Hi Arjun,
Record Selection formula is processed in Pass 1 whereas formulas that contain fields like 'Record Number' or formulas that start with 'WhilePrintingRecords' are processed in Pass 2. So, you can see why these formulas cannot be used in the selection formula.
If the record selection formula is one that is returning the error, could you please paste the formulas here (All the 3 formulas).
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Abhilash,
Thanks for the info. It really made sense. As you said, the error is coming in record selection formula.
The formulas that I'm using are:
1.To get Hierarchy level : HierarchyLevel(GroupingLevel(<Dimension>))
2. We have a user prompt to get Level input from user
3. In recod Selection, we need to return all records which 'User Input Level' matches with 'Calculated Level'
Please advise whether we have an alternative for this.
Thanks,
arjun
Hi Arjun,
Well, HierarchyLevel, GroupingLevel are all Crystal functions and they cannot be used in selection formula to filter the records off. The records will be there so the only thing you can do is suppress the groups.
So let's say the user selects 2 as the Input Level, what do you want the report to show? The groups with HierarchyLevel <2 or =2 or > 2? Whatever the condition is, you should be able to refer the formula in the Suppress condition for the Group.
So, you could perhaps write a suppression formula like this:
HierarchyLevel(GroupingLevel(<Dimension>)) < 2
This will suppress all the groups with HierarchyLevel less than 2.
Hope this helps!
-Abhilash
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.