Solved

Show/Hide columns in crystal reports

Posted on 2009-05-11
8
3,706 Views
Last Modified: 2012-05-06
I am currently working with a couple programmers to create a desktop application that ultimately will create reports for the user using crystal reports. Here is the problem that my programmer is having:

We have a Crystal Report where we will have a max of 10 columns.  We need to show/hide the correct columns that have been laid out on the report based if there is an entry in the Nodes 'column'.  The name attribute will let us know if we are to show/hide the column and the data comes from the Detail section.  Is this possible in CR?  

We have no idea what type of data will come in the details sections, all we know is that we have 10 columns for the user to select to show on the report.  Will the data line up under the column heading?  We are being told that the column and detail sections are not linked so the if the data is large it will push the other items over.
<Data>
<column name="Detail1" Display="Cost" />
<column name="Detail2" Display="Net Assets" />
<Detail Detail1="18200" Detail2="427700" Detail3="" Detail4="" Detail5="" Detail6="" Detail7="" Detail8="" Detail9="" Detail10=""/>
<Detail Detail1="18201" Detail2="427701" Detail3="" Detail4="" Detail5="" Detail6="" Detail7="" Detail8="" Detail9="" Detail10=""/>
<Detail Detail1="18202" Detail2="427702" Detail3="" Detail4="" Detail5="" Detail6="" Detail7="" Detail8="" Detail9="" Detail10=""/>
</Data>

Can anyone help me with this?
0
Comment
Question by:tiehaze
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 3

Expert Comment

by:mpeaden2
ID: 24356172
What version of CR?
how are you passing the variables into crystal?
I use XI, if I understand your question correctly, it seems to me you can create a formula variable to store an entry. If the value is not null then populate the column, use the 'allow to grow' property to handle runovers.
0
 

Author Comment

by:tiehaze
ID: 24356479
We are using Crystal Reports XI.

What do you mean by variables?  We are passing the XML, is that what you mean?
0
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 100 total points
ID: 24358870
Are you trying to allow the user to select the fields and then build a report based on that?

Will all the fields be strings?

mlmcc
0
 

Author Comment

by:tiehaze
ID: 24358943
Are you trying to allow the user to select the fields and then build a report based on that?
      Yes, but a max of 10 columns

Will all the fields be strings?
      No.  Numbers or Strings
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 5

Accepted Solution

by:
dhobale earned 200 total points
ID: 24359448
You can supress the column heading based on what the user has selected. To do that

1. Click on column heading --> go to "format editor" --> check "Supress" check box and click on the formula editor icon next to it.

Here you set the condition when you would like to hide the column heading. Let me know if this helps.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 24359635
DO the numbers need to be treated as numbers or can they be used as strings?

mlmcc
0
 

Author Comment

by:tiehaze
ID: 24359690
Yes we have to treat them as numbers as we have to sum the details.
0
 
LVL 3

Assisted Solution

by:mpeaden2
mpeaden2 earned 200 total points
ID: 24363848
Hold the 'node' column value in a subreport. this will allow you to isolate the number, as well as pass the value back and forth as needed.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
detecting  the added row index in a datagridview 3 60
Angular JS Route 3 52
Selection between two dates and time range. 21 25
SQL Exceptions 3 38
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

920 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now