Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Hiding ParameterFields Post Reply Post New Topic
Author Message
Djavid
Newbie
Newbie
Avatar

Joined: 18 Mar 2008
Location: Netherlands
Online Status: Offline
Posts: 6
Quote Djavid Replybullet Topic: Hiding ParameterFields
    Posted: 19 Mar 2008 at 2:32am

Hi Friends,
I need to display dynamic columns in the report. I have to show column list to the end user then he/she will select his usefull column and then I have to display the selected coumn in to the Report. For this im using some parameterfields.
Now i want that other columns that are not selected by the user, should not be visible in the report.
How can i hide or remove those columns to avoid empty space in the endreport???
Any body know hot to do it?

IP IP Logged
HairyMike
Newbie
Newbie
Avatar

Joined: 19 Mar 2008
Location: United Kingdom
Online Status: Offline
Posts: 8
Quote HairyMike Replybullet Posted: 19 Mar 2008 at 2:39am
Yes....   right click the object, click 'format object'..  check the 'suppress' tickbox, click the 'x-2' button and enter the condition that if true will hide the object. i.e
 
{ServiceHistoryDetails_Report.Job_Number} = ""
 
Best of luck
IP IP Logged
Djavid
Newbie
Newbie
Avatar

Joined: 18 Mar 2008
Location: Netherlands
Online Status: Offline
Posts: 6
Quote Djavid Replybullet Posted: 19 Mar 2008 at 3:11am
Thanx a lot for reply..Can you give a example code of the condition please???
 
thanx
IP IP Logged
HairyMike
Newbie
Newbie
Avatar

Joined: 19 Mar 2008
Location: United Kingdom
Online Status: Offline
Posts: 8
Quote HairyMike Replybullet Posted: 19 Mar 2008 at 3:16am

I don't know exactly what your trying to achieve, but at a guess I'd say your passing the names of columns in a parameter?

Condition:  "ColumnName" in {Datasource.ParameterField}
IP IP Logged
Djavid
Newbie
Newbie
Avatar

Joined: 18 Mar 2008
Location: Netherlands
Online Status: Offline
Posts: 6
Quote Djavid Replybullet Posted: 19 Mar 2008 at 3:23am

yes i m passing the names of columns in a parameter.

the name of the column is column1, the parameter name is col1 and datatable dt.
I tryid to use your code but im getting a syntax error Confused
 
IP IP Logged
HairyMike
Newbie
Newbie
Avatar

Joined: 19 Mar 2008
Location: United Kingdom
Online Status: Offline
Posts: 8
Quote HairyMike Replybullet Posted: 19 Mar 2008 at 3:27am
That works for me....
 
If you can take a screenshot of what you are doing and upload it, maybe I can help.
IP IP Logged
Djavid
Newbie
Newbie
Avatar

Joined: 18 Mar 2008
Location: Netherlands
Online Status: Offline
Posts: 6
Quote Djavid Replybullet Posted: 19 Mar 2008 at 3:32am
Thanx that will be great..
Only i can't set any screenshots here. can i have your email?
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.