on 2023 Jul 27 10:39 AM
Hi everyone,
I am trying to reduce the amount of code I use.
I have multiple detail sections in the report that are essentially clones of each other. The only difference is one line of code in the respective input formulas.
So depending on the user input field {?source} the `details a` or `details b` would be shown. The formula for `details a` uses input_value:={field1} and `details b` uses input_value:={field2}.
Sorry, if that seemed complicated. Happy to explain better if there are questions 🙂
Thank you again for your continued support!
Alex
Request clarification before answering.
Crystal formulas don't have a way to inquire what section they are placed in. So this can't be done.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In that case, perhaps you can use a formula instead of a field. The formula can take care of the logic branching.
But it's tough to judge without more context.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, it really is as simple as changing the one input value. In some cases it is even the same input table field but once the original and once multiplied by x.
So having 10 sections instead of 5 does make a significant difference when it comes to maintenance.
I agree. Keeping it simple is important. That is why I am trying to minimize the code I use and make as much of it copy&pastable between formulas as possible.
However, the layout is an important factor also. The more sections (each with their own conditional formulas) the more maintenance work there is.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My advice would be to keep it simple.
You need different content in each section -- so place different content in each section.
Alternatively, get the desired content in the data set consumed by the report (using SP/VIEW/Command) so you don't need to use section suppress logic.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
72 | |
30 | |
8 | |
7 | |
6 | |
6 | |
6 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.