Solved

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

Posted on 2011-03-03
24
325 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
Comment Utility
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
Comment Utility
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
Comment Utility
Note: The cascading is working correctly, we just don't have the drop downs.
0
 
LVL 100

Expert Comment

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

mlmcc
0
 
LVL 1

Expert Comment

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

Author Comment

by:SeyerIT
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
What .Net assemblies are you using?

mlmcc
0
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 2

Author Comment

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

Thanks
0
 
LVL 2

Author Comment

by:SeyerIT
Comment Utility
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
Comment Utility
That looks right.  I don't know why it is behaving that way.

mlmcc
0
 
LVL 2

Author Comment

by:SeyerIT
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
are you saying to add the parameters without cascading? If so, this does work.
0
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
No, cascade them.  I assume the tables are joined.

mlmcc
0
 
LVL 2

Author Comment

by:SeyerIT
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
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 …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

771 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

10 Experts available now in Live!

Get 1:1 Help Now