Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a intersting requirement i.e. i have to display the data in Hierarchy view(Tree Structure) like
A
B C
D E F G
Here i have attached my sample file and xl file also. I have requirement
1) If you select Austrila from list box in Hierarchy structure we dnt have data for City listboxes for both side then those listboxes should disappear (wheneevr we dnt have the data for any list box that should disapper) and suppose we dnt have data for Region either left or right side from hierarchy that list box should disappear and the arrow has directly point to State list box.
2) Based on a Column am dividing the whole structure into 2 parts(left, Right) but in my report am not able to get that correctly am getting same data for both sides for this am using a condition like this""=If((Type ='Region') & (LOC ='Left'),Trim(Desc))"".
So please help me to get out of this
Hi Anil,
No, it is possible. The complex way would be to write some VBScript to change the orientation and size of the arrow.
The simple way is to have different arrows. In your example, I would keep the two arrows that point from Country-Region and Region-State. However, if region has no values, hide these two (using the same method as above for hiding the List Box).
You will also have a third arrow that points directly from Country-State. However, if there are regions, this arrow is hidden. When there are no regions, you show this arrow.
Example attached.
Regards,
Stephen
Hi,
I would use sets to show/hide the list boxes (Layout tab, Show, Conditional). For example:
=Count({<Type ={'City'}, LOC ={'Left'}>} Desc)
This will hide the left City box if there are no cities.
Does that help you get started?
Regards,
Stephen
Hi Stephen,
Thank you very much for your replay its working perfectly and how to hide the arrow also.
suppose for regions list box if we dnt have entries for that,, that list box should hide and the arrow has directly point to state list box how can we do this????
Regards,
Anil
Hi Anil,
You can't change the arrow direction. The solution is to have two arrows. One shows for one condition and the other shows for the other condition.
Regards,
Stephen
Hi Stephen,
Is my requirement is not possible in QV? and i dnot understand what do you mean by two arrows? and how to show them?
From my original post can you give me any ideas for my second point....
Regards,
Anil
Hi Anil,
No, it is possible. The complex way would be to write some VBScript to change the orientation and size of the arrow.
The simple way is to have different arrows. In your example, I would keep the two arrows that point from Country-Region and Region-State. However, if region has no values, hide these two (using the same method as above for hiding the List Box).
You will also have a third arrow that points directly from Country-State. However, if there are regions, this arrow is hidden. When there are no regions, you show this arrow.
Example attached.
Regards,
Stephen
Perfect Stephen thanxx alot
My last issue is
In my Hierarchy for left side and right side i have to show different data but am getting same data for both sides
below is the example
Based on a Column(Loc) am dividing the whole structure into 2 parts(left,Right) but in my report am not able to get that correctly am gettingsame data for both sides for this am using a condition(Properties-> General-> filed expression) like this""=If((Type ='Region') & (LOC ='Left'),Trim(Desc))"".
Regards,
Anil
Hi Anil,
Like I said above, you should probably use a set for this. For example:
=Count({<Loc={'Right'}>} Desc)
Gives me a result of 21 on the cleared document while:
=Count({<Loc={'Left'}>} Desc)
Gives me 11.
You should also realise that your expression for your list boxes is incorrect. You need to replace & with AND. The field "LOC" should also be replaced with "Loc" as field names are case sensitive.
Regards,
Stephen
Thnx Stephen for your answers
This conditon =Count({<Loc={'Right'}>} Desc) is giving a syntax error but i have changed my previous condition as you said, like this =If((Type ='State') and (Loc ='Left'),Trim(Desc))
now its working perfectly thnx
But am wondering that in my live application am using the same condition like
=If((N_ITEM_TYP ='ACE') and (C_LOC ='ODD'),Trim(X_ITEM_VAL))
there am not geting any records simply getting empty list box,, if i replace AND with & then its not showing the correct data, any ideas for this???
Regards,
Anil
Thanx a lot Stephen,
I have changed my condition also =If((Type ='Region') and (Loc ='Left'),Trim(Desc)). now its giving correct result
I have tried with this conditoin =Count({<Loc={'Right'}>} Desc) as you said but its showing a error in syntax it self.
Regards,
Anil