Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Cascading filters Post Reply Post New Topic
Author Message
De Herdt Ian
Newbie
Newbie


Joined: 31 Aug 2009
Online Status: Offline
Posts: 3
Quote De Herdt Ian Replybullet Topic: Cascading filters
    Posted: 31 Aug 2009 at 12:16am
Hello,
 
When i make a cascading filter it sometimes happens that adding a filter to the list, filters items from the 1st filter.
 
Example:
 
When i make a filter City with 4 values: "Antwerp, Brussels, Milan, Paris" retrieved from my sql server 2005 database and i run the report it shows me those 4 values in a dropdown list. After that i add a new filter to that filter, with the values "John, Joe, Fred" also retrieved from my sql server 2005 database. Then the 1st filter only has 3 values: "Antwerp, Brussels, Milan".
 
I would really appriciate any help on this topic.
 
Thanks in advance
 
Ian De Herdt


Edited by De Herdt Ian - 02 Sep 2009 at 10:37pm
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 31 Aug 2009 at 6:35am
if it is cascading, you probably want to change the join to an outer join.  basically, it seems to be saying that you don't have any people assigned to the city the drops off, so running a report based on those filters would give you zero records, so why show you the option.
 
try changing the join, and the parameters will probably display correctly.
 
HTH
IP IP Logged
De Herdt Ian
Newbie
Newbie


Joined: 31 Aug 2009
Online Status: Offline
Posts: 3
Quote De Herdt Ian Replybullet Posted: 02 Sep 2009 at 10:33pm
Thank you for the fast reply, I am still trying to figure out where to apply the outer join.
 
The data that fills up the filters is a view from a SQL server 2005 database. And when i try to edit the filter i only see the following options:
(i'm on a dutch version so i'll try to translate/explain what i see)
- Filter text
- sort order
- only values with descriptions
- allow multiple values
- allow unique values
- allow a range of values
 
Also all the values do show up when i use the selection expert and assign a filter to a parameter, they show up in the drop down list below {?MyParameter?}
 
 
Thanks in advance
 
Kind regards,
 
Ian


Edited by De Herdt Ian - 02 Sep 2009 at 11:43pm
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 03 Sep 2009 at 6:14am
Sorry, I don't think that I can be of much more help.  I don't use Crystal to get the parameters (I have a separate wizard where I have much more control)
 
You're showing a list of numbers, but the original issue was loosing cities when people are applied.
 
You could try looking at the view and see if it returns people or can be modified to return people associated with cities...then you can compare the people/cities you see in the view to what Crystal is displaying.
 
Hope this helps in some way.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 03 Sep 2009 at 7:25am

Your data values in the parameters are defined by the data that is being retreived from your source.

You are using a view as your source. When you limit the scope of the view to 4 cities that changes your param to just show those. When you add in the extra limit of just a few people then your view is only returning rows that meet these conditions and so your params are only showing 3. basically your DB has no person that you are filtering on that is in Paris.
If you haev 2 tables in the view (one for city the other for person) you can write a more complicated view that left joins the two after the filters have been applied not before.
or use to views as your source 1 as a filterd view of the city table and the other as a filtered view of the people table and left join them in crystal.
 
However Lockwelle was correct from teh get go that if a user select Paris they will never get any name value for the person param because your data shows that does not exist. The report will be 0 rows for Paris so I am not sure why you want to do that.
IP IP Logged
De Herdt Ian
Newbie
Newbie


Joined: 31 Aug 2009
Online Status: Offline
Posts: 3
Quote De Herdt Ian Replybullet Posted: 10 Sep 2009 at 1:40am
I solved my own problem after alot of trial and error, i noticed CR doesn't allow more then 1000 records in the result set of possible filter possibilities.

Edited by De Herdt Ian - 10 Sep 2009 at 2:14am
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.032 seconds.