Solved

How to create Dynamic Parameter using fields from two tables AND retain drop-down information?

Posted on 2011-03-03
24
330 Views
Last Modified: 2012-05-11
I have two tables connected by primary foreign key. One table has product type name while the other table has product name. I want to create a dynamic parameter using both of these, but it seems that when using these fields from two different tables I lose the drop downs, and the data must be entered by the user manually. When I create the parameters individually, they work fine and have the drop downs, but when cascading them as a dynamic, the drop downs are gone.
0
Comment
Question by:SeyerIT
  • 13
  • 8
  • 2
  • +1
24 Comments
 
LVL 26

Expert Comment

by:Kurt Reinhardt
ID: 35030259
You definitely should be able to use cascading parameters from different tables.  I just did so in a test report.  How are the tables joined (Inner or Outer) and are you allowing multiple value selection?

~Kurt
0
 
LVL 2

Author Comment

by:SeyerIT
ID: 35030361
I am using Inner join, not enforced. And I tried both multiple values and discrete values. Either way the drop downs did not show up.
0
 
LVL 2

Author Comment

by:SeyerIT
ID: 35030368
Note: The cascading is working correctly, we just don't have the drop downs.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 35031229
If you don't cascade them, do the dropdowns work?

mlmcc
0
 
LVL 1

Expert Comment

by:dcurry22
ID: 35035456
Can you create a view and use this as your source?
0
 
LVL 2

Author Comment

by:SeyerIT
ID: 35036845
mlmcc,

I created two seperate Dynamic Parameters and added only one field to each one to create them uncascaded. When I do this, the dropdowns do work. We tested that previously but determined it would not be effective as the results are not filtered as you work down through each drop down.

dcurry22,

I am not sure what you mean by creating a view and making it the source. Can you provide more details please. I apologize as I am rather new with Crystal.
0
 
LVL 1

Expert Comment

by:dcurry22
ID: 35037023
My line of thinking was that you could create a view that marks both the first and second values and your second query could be  based on the value of that column.  But, not sure that would qualify as "dynamic".  
Also, I forgot to ask, are you using CR inside of Visual Studio?
The Dynamic Cascading Parameters feature is not available in Crystal Reports for Visual Studio, but is available in one of the upgraded versions. (Crystal Reports and CR Server/ Business Objects Enterprise)

There are other answers to your questions within Experts-Exchange which address this using a sub-report. I am not familiar enough with sub-reports to be of much help but thought you could reference these.  
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 35037547
Is the problem in the Crystal designer or when you run the report?

What version of Crystal?

mlmcc
0
 
LVL 2

Author Comment

by:SeyerIT
ID: 35038108
I appreciate your guys' help on this matter. I am working in Crystal Reports 2008. In the designer.. Not working in Visual Studio.

The problem is currently visible when refreshing the data in the designer and the parameters prompt comes up to select the data you want to see. I assumed since in designer the drop downs were not there that when another user runs the report (which would be in the viewer) would not have any drop downs either.
Step 1Step 2Step 3Step 4Step 5Step 6
0
 
LVL 2

Author Comment

by:SeyerIT
ID: 35038164
FYI: This is training data..

The pictures represent the process I am using to create the parameter.

The two fields being used come from two different tables; Product_Type, and Product.
They are linked through Product Type ID.

Note: We have successfully used Product Type ID and Product Name from the table Product which does in fact create the drop downs, however the Product Type ID is not user-friendly. We would need to see the Product Type Name, which comes from the Product_Type table.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 35038200
What .Net assemblies are you using?

mlmcc
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 35038228
Sorry misread your comment.

You have to select both field in the select expert.

First choose to use the product name tyoe the product name

mlmcc
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 2

Author Comment

by:SeyerIT
ID: 35059825
Sorry just getting back.. Let me give that a try and get right back..

Thanks
0
 
LVL 2

Author Comment

by:SeyerIT
ID: 35059862
Still didn't get the drop downs.. Unless I didn't setup correctly in Select Expert.. Here is the screenshot...
SP32-20110307-130255-585.jpg
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 35060034
That looks right.  I don't know why it is behaving that way.

mlmcc
0
 
LVL 2

Author Comment

by:SeyerIT
ID: 35069172
Ok, just wanted to make sure I had that right.. So, still no idea why this is preventing drop-downs? We ran into this while I was getting trained on how to use the software and decided to attack this issue since it will most likely be something we will be requiring in the future.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 35072582
Most of the reports I have written use static parameters for 2 reasons.
1.  they are for systems using CR 10 or before (no dynamic pararmeters)
2.  The reports will be run inside another application that is handling the parameter prompting and passing.

You are doing this in the CR2008 designer and not through an application?

I don't have CR2008 but will try it in CR XI

mlmcc
0
 
LVL 2

Author Comment

by:SeyerIT
ID: 35082368
Yes, we are creating the parameters through Crystal 2008. Thanks again for all your time!
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 35085622
The preview is through CR2008 and not an application is that correct?

I just built 2 in CR XI and got the drop downs for them

Can you start a new report using the same source and just add the 2 parameters to it?

mlmcc
0
 
LVL 2

Author Comment

by:SeyerIT
ID: 35086462
are you saying to add the parameters without cascading? If so, this does work.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 35087174
No, cascade them.  I assume the tables are joined.

mlmcc
0
 
LVL 2

Author Comment

by:SeyerIT
ID: 35110496
Okay, let me try to recreate using completely different data sources, but the same scenario.. I'll get back shortly.
0
 
LVL 2

Author Comment

by:SeyerIT
ID: 35128073
Well it works in the live database.. Using data from two different tables the cascading is working and the drop downs show up.. I don't understand why the sample data acted differently..  Thanks again for all your help!
0
 
LVL 2

Author Closing Comment

by:SeyerIT
ID: 35128081
It should have been working to begin with.. Something may have been wrong with the sample database but it would work the way mlmcc described..
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now