?
Solved

Dynamic Hiding

Posted on 2011-02-18
13
Medium Priority
?
293 Views
Last Modified: 2012-05-11
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
Comment
Question by:Shamanth
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +2
13 Comments
 
LVL 26

Assisted Solution

by:Kurt Reinhardt
Kurt Reinhardt earned 600 total points
ID: 34926503
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
 
LVL 77

Accepted Solution

by:
peter57r earned 1000 total points
ID: 34926553
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
 

Author Comment

by:Shamanth
ID: 34926632
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
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
LVL 26

Expert Comment

by:Kurt Reinhardt
ID: 34926651
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
 
LVL 101

Assisted Solution

by:mlmcc
mlmcc earned 400 total points
ID: 34926654
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
 
LVL 77

Expert Comment

by:peter57r
ID: 34927815
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
 

Author Comment

by:Shamanth
ID: 34928347
I agree. Peter's approach is much simpler. Thanks everyone for tall the inputs
0
 

Author Comment

by:Shamanth
ID: 34928375
Thanks
0
 
LVL 26

Expert Comment

by:Kurt Reinhardt
ID: 34928509
I would say accept Peter's comment as the solution, not your own.  Other than that, I'm good.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 34943843
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
 
LVL 1

Expert Comment

by:Vee_Mod
ID: 34986434
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month8 days, 6 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question