Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help With Selection Criteria Using Shared Variable

Status
Not open for further replies.

MISdad

Technical User
May 5, 2004
34
Hello.

I have a subreport that displays current open diagnoses for the client in the main report. I want to be able to run the report based on the type of diagnosis in the subreport. I've created a shared variable that assigns a value of "Y" if the diagnosis is one I want and "N" if it is not. I have pulled the shared variable back to the main report and it displays the correct value. The problem I'm having is that I want to select only the records that have the "Y" in the shared variable field but crystal tells me that I cannot do this because the value must be calculated later. Any ideas on how I can accomplish this. Thanks.

Jim
 
Use the shared variable to suppress the unwanted records. Go to the section expert->details->suppress->x+2 and enter:

whileprintingrecords;
shared stringvar desireddiagnosis;
desireddiagnosis = "N"

-LB
 
It sounds like you have the wrong report as the main report to me, and you should try to avoid subreports anyway.

The point LB is making is that you cannot filter main report rows based on a subreport value because the main report has already executed by the time the subreport does.

If you fleshed out your requirements someone might better advise you, otherwise go with the suppression notion.

Crystal version
Database/connectivity used
Example data
Expected output

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top