Solved

Help - Main report does not pass data to subreport

Posted on 2007-11-14
3
1,548 Views
Last Modified: 2013-11-16
Hello and thanks to all who reply.

 ----------

 


Overall report pulls medical history about patients. The data pull centers around the patients medical insurance card ID number and sub-members of the said ID number.

Here is my design; the main report is a SQL Command designed to ask the user for the main medical ID number. The first prompt is one to ask the user for the ID number (static string parameter). It then goes out and gets a list of sub-members based on that ID Number. A new set of prompts appear that are linked to the sub-report SQL command the first ask the user add any or all of the sub-members (dynamic parameter) to the list. Below that prompt, a nother set ask the user to type in a beginning and ending date range for the data pull (because how the date range is formatted I have to do a string static prompt).

 

Now the Sub-Member dynamic list is used as a crystal reports filter and not passed into the sub reports SQL Command. The Beginng and Ending date, and the Main ID Number are passed to the sub-reports SQL Command.

 

Here is where the report breaks down. The original member ID that was inputted from the main report gets flushed before it can be passed to the sub-report. I am base this on what I observe from when I run the report. After I input the ID Number and the 2nd set of prompts appear asking for the sub-members and date range the ID Number parameter is still at the top but blank. Later, after the report is ran I look at the 'Show current parameters value..' from the Report menu and it shows as empty. If I rerun the report and do not leave the 2nd Main ID Number prompt but type in the number again the report works fine. If I change the Sub-report ID Number link to a dynamic prompt, on the 2nd set of prompts the top one is dynamic and the ID Number I inputted is the first and only thing in the list. If it is chosen then the report works as I would like.

However, this report is for the general  co-worker population and I would like to not have them have to type in the main ID Number in twice or even have them chose it again from a dynamic list.

 

I have tried shared variables and built the report another way and the same thing happens. When the dynamic list of sub-members is shown the data from the main report is flushed except for the list of sub-members.
 

 
Is there a way to fix it so the ID Number gets passed correctly or have the dynamic prompt default to the first item in its list. Or is there some other way to fix this?

 

Thank you for your help.
0
Comment
Question by:YGregersen
3 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 125 total points
ID: 20281492
I think your problem is the dynamic parameters.  The subordinate parameters aren't set until the first parameter is chosen, even if it is the only one in the list the selection is needed to trigger the update of the others.

mlmcc
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20511479
Forced accept.

Computer101
EE Admin
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

This article describes some very basic things about SQL Server filegroups.
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

746 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

16 Experts available now in Live!

Get 1:1 Help Now