• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 295
  • Last Modified:

Dynamic Hiding

How can we hide columns in Crystal without any white spaces? Is there any auto fit width of fields option in Crystal? Conditional suppression will leave some white space.  
I want to hide some fields based on the user prompt response and dynamically move the fields to the left or right side and adjust the layout
eg:-
I have 10 fields.  I want to hide field 3, 5, 7 if the user input some value in the <? Hide Fields> prompt.  The 4th, 6th and 8th field should automatically adjust/align without any whitespaces.

Thanks!
0
Shamanth
Asked:
Shamanth
  • 3
  • 3
  • 2
  • +2
3 Solutions
 
Kurt ReinhardtSr. Business Intelligence Consultant/ArchitectCommented:
This might work:

1)  Create an empty report with nothing but parameters
2)  In the Report Header create a subreport with all 8 columns
3)  In a second Report Header section create a subreport minus the 3, 5 and 7 columns just like you want
4)  Link the subreports to the main report based on the data-driven parameters
5)  Conditionally suppress BOTH the subreport objects AND the section in which they reside based on the {?Hide Fields> prompt

To the end user, the report will be exactly what you want to see.  You don't have to worry about returning the data twice, because the hidden subreport will never actually run if you've suppressed both it and the section properly.

~Kurt
0
 
peter57rCommented:
There isn't any feature in CR which will let you move fields around horizontally.
You can maybe use a series of formula fields in fixed positions and work out what goes in each position.

Alternatively, it sounds like you could simply use two detail lines, one defined  with all fields and another with some fields not present and then use a conditional suppression rule to suppress one or the other detail line based on the parameter value.
0
 
ShamanthAuthor Commented:
Thanks rhinok. I will try your approach.

Peter, How do two detail sections help me here. I am not clear.

Is there anyway to shrink the field widh based on a formula/parameter. I see 'Can Grow' option. but it is not doing what i am looking for...
0
Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

 
Kurt ReinhardtSr. Business Intelligence Consultant/ArchitectCommented:
lol - I had to make things much too complicated - couldn't see the forest through the trees...

Peter's approach is better - same concepjt - just create multiple sections and suppress one when the other is displayed....

~Kurt
0
 
mlmccCommented:
Agree, there is no way inherent in Crystal to move fields horizontally to cover white space.

I built a report that had 7 detail sections and based on the data, the correct section was displayed.
It also had similar group sections for headings and footers for summaries.

Suppression was done based on the data in each record.
It would be easy to do it based on a parameter

mlmcc
0
 
peter57rCommented:
If you create two detail sections then they can have completely different layouts even though they show some or all of the same fields.
Then in the Section expert you use the conditional suppression button for each detail section and for one you say something like :

{?HideFields} = "Yes"

which will suppress this detail section when the parameter has the value Yes
and in the conditional suppression button for the other detail section you use the opposite condition..

{?HideFields} <> "Yes"
0
 
ShamanthAuthor Commented:
I agree. Peter's approach is much simpler. Thanks everyone for tall the inputs
0
 
ShamanthAuthor Commented:
Thanks
0
 
Kurt ReinhardtSr. Business Intelligence Consultant/ArchitectCommented:
I would say accept Peter's comment as the solution, not your own.  Other than that, I'm good.
0
 
mlmccCommented:
COmment being accepted is not part of the solution but simply asker saying thanks
Use this as the solution

peter57r's comment #34926553 (250 points) as the solution and rhinok's comment #34926503 (150 points),  and mlmcc's comment #34926654 (100 points) as the assisted solutions

mlmcc
0
 
Vee_ModCommented:
All,
 
Following an 'Objection' by mlmcc (at http://www.experts-exchange.com/Q_26836410.html) to the intended closure of this question, it has been reviewed by at least one Moderator and is being closed as recommended by the Expert.
 
At this point I am going to re-start the auto-close procedure.
 
Thank you,
 
Vee_Mod
Community Support Moderator
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now