Showing posts with label hide. Show all posts
Showing posts with label hide. Show all posts

Thursday, March 22, 2012

Conditionally hide 2 out of 6 rows in a matrix?

I just spent about 30mins searching through the forums for this and saw several posts, but I didn't find a straight answer that seems like it would work for my report. How can I add only 2 data rows to a group (to hide them via the group's visible properties) and keep the rest of the rows outside of the group, but still in the same column (vertical area), as shown:

This is the view of all rows:

Cat1 Cat2 Product A Data 1 # # Data 2 # # Data 3 # # Data 4 # # Data 5 # # Data 6 # # Product B Data 1 # # Data 2 # # Data 3 # # Data 4 # # Data 5 # # Data 6 # #

And this is the view I'm seeking in some cases:

Cat1 Cat2 Product A Data 1 # # Data 4 # # Data 5 # # Data 6 # # Product B Data 1 # # Data 4 # # Data 5 # # Data 6 # #

This question is not clear to me. So, do you want to hide two rows from each group? If so does it have to be any specific rows. If this is what you want then I think you can do this with ROWCOUNT

|||

Each Data line that I have added is for a separate field from the dataset window and I need specific fields hidden, but if it makes things more workable for changing visibility, I could go by the row number on which that they are located (although I doubt [data] row number is an accessible value).

|||

Sorry, I meant to say RowNumber in my last post and instead I said RowCount. You might be able to do this with RowNumber(). This will give you the rownumber of the dataset. CountRows() will give you the total rows within the group.

See if you can use CountRows() and RowNumber() and develop a logic based on what you need.

|||

It's not as simple as that because setting a row visibility hidden to true would just blank out the row and leave white space, and the only way I see to group the data to toggle group visibility would be to stuff all data pieces into the same group. Suggestions have been given to put the data you want to hide into a group, but that may only work to hide data pieces to the right of some other data (which would be in a separate group). As far as I can see, that won't allow me to get the result I've pictured above in my first post.

Conditionally hidden groups

Hi,

I have conditionially visible groups that are show/hide based on a report parameter. The problem is that I also want to have a document label on this group. When the group is hidden a blank entry appears in the doument map rather that no entry at all. Is this a bug or is there some work around. Thanks.

This worked for me.

I have two report parameters, Group1 and Group2, and the user selects what field they want to group on. One of the options for Group2 is "None", meaning that they do not want to have a second grouping for the report. In this case, I hide the group header and footer rows, and set the document map label to Nothing.

Edit the group, and set the document map label to something like:

=IIF (Parameters!Group2.Value = "None", Nothing, "My Document Map Label for Group2")

cheers,

Helen

|||Thanks for the reply, I'll give it a whirl.

Conditionally hidden groups

Hi,

I have conditionially visible groups that are show/hide based on a report parameter. The problem is that I also want to have a document label on this group. When the group is hidden a blank entry appears in the doument map rather that no entry at all. Is this a bug or is there some work around. Thanks.

This worked for me.

I have two report parameters, Group1 and Group2, and the user selects what field they want to group on. One of the options for Group2 is "None", meaning that they do not want to have a second grouping for the report. In this case, I hide the group header and footer rows, and set the document map label to Nothing.

Edit the group, and set the document map label to something like:

=IIF (Parameters!Group2.Value = "None", Nothing, "My Document Map Label for Group2")

cheers,

Helen

|||Thanks for the reply, I'll give it a whirl.

Conditionally hidden groups

Hi,

I have conditionially visible groups that are show/hide based on a report parameter. The problem is that I also want to have a document label on this group. When the group is hidden a blank entry appears in the doument map rather that no entry at all. Is this a bug or is there some work around. Thanks.

This worked for me.

I have two report parameters, Group1 and Group2, and the user selects what field they want to group on. One of the options for Group2 is "None", meaning that they do not want to have a second grouping for the report. In this case, I hide the group header and footer rows, and set the document map label to Nothing.

Edit the group, and set the document map label to something like:

=IIF (Parameters!Group2.Value = "None", Nothing, "My Document Map Label for Group2")

cheers,

Helen

|||Thanks for the reply, I'll give it a whirl.

Thursday, March 8, 2012

Conditional Page Header

Will Crystal Reports have a page header that will hide if a condition is not met or viceaversa? If so how is this done?
Example: If Company_Name = 'xyz' then unhide page header A
thanks in advance
cgInstead of hard coding the header,write a formula like :

if companyname = 'xyz' then

'Header name'

else

' '

and drag the formula in page header!

or

right click on Page header section,select Section Expert,select Common Tab,
click formula button on right of suppress button ,and write

companyname <> 'xyx'|||how exactly do i do this in Crystal? I will have to do the same for the footer too.

thanks
cg|||you mean writing the formula ?

I think you should go for 2nd option for both header and footer i.e suppress the section based on your condition.|||i tried the conditional supressing the header and it is not working.
i have tried with and with out checking the supress box with the formula in there.

this is what i have in the formula, the first 2 are the same. i was testing if it was case sensitive or not. this is a parameter field instead of a db field.

{?CustomerName} <> "Typenex Medical, LLC"
or
{?CustomerName} <> "TYPENEX MEDICAL, LLC"
or
{?CustomerName} <> "TYPENEX MEDICAL LLC"
or
{?CustomerName} <> "TYPENEX MEDICAL L.L.C."
or
{?CustomerName} <> "TYPENEX"
or
{?CustomerName} <> "TYPENEX LLC"

not sure if this makes a difference but i have version 8.5

thanks
cg|||i tried the conditional supressing the header and it is not working.
i have tried with and with out checking the supress box with the formula in there.

this is what i have in the formula, the first 2 are the same. i was testing if it was case sensitive or not. this is a parameter field instead of a db field.

{?CustomerName} <> "Typenex Medical, LLC"
or
{?CustomerName} <> "TYPENEX MEDICAL, LLC"
or
{?CustomerName} <> "TYPENEX MEDICAL LLC"
or
{?CustomerName} <> "TYPENEX MEDICAL L.L.C."
or
{?CustomerName} <> "TYPENEX"
or
{?CustomerName} <> "TYPENEX LLC"

not sure if this makes a difference but i have version 8.5

thanks
cg

You have written the expression wrong.
Whatever you have written will be always true in any condition. Just check it properly. Use

NOT (condition1 AND condition2 AND so on)|||Make it simple :

- Right click on Formula field in field explorer

- click New

-name your formula

Type this

if {?CustomerName} <> 'ABC' and {?CustomerName} <> 'XYZ' then

' '
else

'HEADER'

Drag the formula field in report where you want to print the header.

Friday, February 24, 2012

Conditional Column Formatting

Hi Everyone,
I am trying to hide a column in a matrix table. I have no
trouble using conditional formatting to control the visibility of the
column, but when I hide the column the main row in the matrix does not
shrink. Therefore, I have a big gap... My thought was to use conditional
formatting to control the column width of the main matrix row. Listed
below is the expression that I used. Can anyone help me with the error
message or recommend a better solution?
=IIF(Fields!FiscalYear.Value = IIF(Month(TODAY()) = 10-12,Year(TODAY()) ,Year(Today())-1), 0.625in, 0.25in) cannot be
parsed as a unit because it does not contain numeric values. Examples
of valid unit strings are "1pt" and ".5in".
Regards,
A.AkinPut double quotes around the "0.625in" and "0.25in"
"awakin" wrote:
> Hi Everyone,
>
> I am trying to hide a column in a matrix table. I have no
> trouble using conditional formatting to control the visibility of the
> column, but when I hide the column the main row in the matrix does not
> shrink. Therefore, I have a big gap... My thought was to use conditional
> formatting to control the column width of the main matrix row. Listed
> below is the expression that I used. Can anyone help me with the error
> message or recommend a better solution?
>
>
>
> =IIF(Fields!FiscalYear.Value = IIF(Month(TODAY()) => 10-12,Year(TODAY()) ,Year(Today())-1), 0.625in, 0.25in) cannot be
> parsed as a unit because it does not contain numeric values. Examples
> of valid unit strings are "1pt" and ".5in".
>
> Regards,
>
> A.Akin
>|||That doesn't help. It still gives the same error message.
Is there another way of doing this?
"Michael C" wrote:
> Put double quotes around the "0.625in" and "0.25in"
>
> "awakin" wrote:
> > Hi Everyone,
> >
> >
> >
> > I am trying to hide a column in a matrix table. I have no
> > trouble using conditional formatting to control the visibility of the
> > column, but when I hide the column the main row in the matrix does not
> > shrink. Therefore, I have a big gap... My thought was to use conditional
> > formatting to control the column width of the main matrix row. Listed
> > below is the expression that I used. Can anyone help me with the error
> > message or recommend a better solution?
> >
> >
> >
> >
> >
> >
> >
> > =IIF(Fields!FiscalYear.Value = IIF(Month(TODAY()) => > 10-12,Year(TODAY()) ,Year(Today())-1), 0.625in, 0.25in) cannot be
> > parsed as a unit because it does not contain numeric values. Examples
> > of valid unit strings are "1pt" and ".5in".
> >
> >
> >
> > Regards,
> >
> >
> >
> > A.Akin
> >
> >|||Anthoney,
Did you ever figure this out? I need to control the width of a column but
it appears column width isn't formattable via an expression.
thanks,
Justin
"AnthonyG" wrote:
> That doesn't help. It still gives the same error message.
> Is there another way of doing this?
> "Michael C" wrote:
> >
> > Put double quotes around the "0.625in" and "0.25in"
> >
> >
> > "awakin" wrote:
> >
> > > Hi Everyone,
> > >
> > >
> > >
> > > I am trying to hide a column in a matrix table. I have no
> > > trouble using conditional formatting to control the visibility of the
> > > column, but when I hide the column the main row in the matrix does not
> > > shrink. Therefore, I have a big gap... My thought was to use conditional
> > > formatting to control the column width of the main matrix row. Listed
> > > below is the expression that I used. Can anyone help me with the error
> > > message or recommend a better solution?
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > =IIF(Fields!FiscalYear.Value = IIF(Month(TODAY()) => > > 10-12,Year(TODAY()) ,Year(Today())-1), 0.625in, 0.25in) cannot be
> > > parsed as a unit because it does not contain numeric values. Examples
> > > of valid unit strings are "1pt" and ".5in".
> > >
> > >
> > >
> > > Regards,
> > >
> > >
> > >
> > > A.Akin
> > >
> > >