Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Dynamically update LOV in prompt page Post Reply Post New Topic
Author Message
AmitJ
Newbie
Newbie


Joined: 30 Dec 2010
Online Status: Offline
Posts: 14
Quote AmitJ Replybullet Topic: Dynamically update LOV in prompt page
    Posted: 30 Dec 2010 at 3:15am

Hi,
I have this requirement in one report which I am not able to implement technically.

Screen layout:
Filter 1
Filter 2
Filter 3           LOV Box
Filter 4
Filter 5

Functional requirement is:
On selection of each of the filters the values in the LOV box should dynamically change.
Say, on selection of Filter 1, I get 10,000 records in the LOV Box.
So on selection of some value in Filter 2, the list should shrink less than 10,000 record as Filter 2 criteris is applied on this list.
And this continues till last filter.

Issue:
The problem is that the Filters are not related to each other through any hierarchy and hence I am not able to
implement  cascading prompts.

Example:
University filter
Education level filter         Student List
Age filter

If I want to get list of students, the filters are not related to each other but are part of "where" clause
which gives me the list of students. As soon as I select some University, the Student list should get populated.
When I select particular Education Level, it should just show students of that Level.

As you can see, Age is not related to University or Education level but still helps us to get list of Students.

Please let me know how to implement this technically.
 
Amit
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 30 Dec 2010 at 3:24am
command object:
select filter1, filter2, filter3, ...
from tableWithStudents
 
now use this as the hierarchy for the dynamic selection.  I believe that you can left join to other tables to get a 'complete' list for the filter, but it wouldn't really make a difference...if you select say a university that isn't in the original selection, you still won't get anything, but the list will at least look complete.  You might want / need to add a distinct clause, but I wouldn't think so.
 
HTH
IP IP Logged
AmitJ
Newbie
Newbie


Joined: 30 Dec 2010
Online Status: Offline
Posts: 14
Quote AmitJ Replybullet Posted: 30 Dec 2010 at 4:00am
Hello lockwelle,
 
Thanks for quick reply.
 
As per example mentioned in last post,I want to know that can we populate LOV of Students list Prompt on the selection of University, Education Level, Age without cascading functionality?
 
Creation of command object is same as data reletionship/hierarchy between University, Education Level, Age .
 
But user wants reletionship only between
1.university to student
2.Education Level to student
3.Age to student
 
Can we achieve this without using cascading functionality?
 
waiting for valuable insights.
 
Thanks
Amit
 
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 30 Dec 2010 at 4:28am
question:
are you trying to allow users to not select one or more of the University,Education Level or Age filters (e.g. 'all' option)?
That seems to me to be the only reason to not use cascading functionality.
As lockwelle notes the report would return no values if you populated a LOV trying to use outer joins with no cascade.
Therefore why not reverse your cascading order
AGE
Education Level
University
Student(s)
 
Note: Even if you need to do an 'All' option you can set each level of the cascade to allow for multiple values andusers can hit the >> option to move all options over.


Edited by DBlank - 30 Dec 2010 at 6:58am
IP IP Logged
AmitJ
Newbie
Newbie


Joined: 30 Dec 2010
Online Status: Offline
Posts: 14
Quote AmitJ Replybullet Posted: 30 Dec 2010 at 8:47pm

Let me simplify my requirement with another example.

Scenario-
Students take education in collage. Same student may join private coaching class for good marks..!!
 
Now if we see there is no direct reletion ship between collage and coaching class.
 
My table structure is like-

Collage Table

Collage Name

Student Name

PS Collage

Peter

PS Collage

John

PS Collage

King

PS Collage

Thomas

Ferguson Collage

Alex

Ferguson Collage

Bob

Ferguson Collage

Don

Coaching Table

Coaching Class

Student Name

Williams Classes

Peter

Williams Classes

John

Williams Classes

Bob

Trinity Classes

King

Trinity Classes

Alex

Trinity Classes

Don

 

 

There are three prompts
  1. Collage -Should display all collage names available in database(PS Collage,Ferguson Collage)
  2. Coaching- Should display all coaching names available (Williams, trinity)
  3. Student name

Now requirement is that On selection of Collage,Student name associated with that collage should be displayed in LOV of Student name dropdown.

If user selects coaching class then student name lov should be filtered for common students those are in collage and class.
---continued
IP IP Logged
AmitJ
Newbie
Newbie


Joined: 30 Dec 2010
Online Status: Offline
Posts: 14
Quote AmitJ Replybullet Posted: 30 Dec 2010 at 8:59pm

--continued

i.e as per last post if user selects 'PS Collage' as first prompt then student names will be- Peater,John,King,Thomas
 
If user selects 'Trinity' as second prompt of coaching then students names will be filtered to 'King' only.
 
We can implement this by creating Student table with associated Collage name and coaching name in database and creating cascading prompts based on Student table. Its already implemented. However this will filter out coaching class as per collage selected. And user dont wont this cascading between Collage and Coaching fields.
 
Hope you understand this problem...!!
 
So question is ..can we populate Student name on the salection of Collage
and Coaching if there is no direct reletionship between Collage and Coaching?
 
 
If yes..please let me your idead/insights to achieve this..
 
Regards,
Amit
 
 
 
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.027 seconds.