Solved

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

Posted on 2011-03-03
24
338 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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
 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Pull date to Group header 6 36
Selection between two dates and time range. 21 52
Count If in Crystal Reports 2 32
Crystal Report with Dynamic Page Headers? 5 31
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

739 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