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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting specific records in a table

Status
Not open for further replies.

TomiCobi

Technical User
Sep 29, 2010
5
CA
I am a new CR user. I am using CR9. I am being asked to do a report that requires me to get specific records in a table and use it as a paramater. The table fields and sample data in each field are: TABLE_NAME <PROVINCE, PSI_NAME, etc.>, CODE <NU, ACC, etc.>, SUBSTITUTE, UPPER CODE & DESCRIPTION <Ontario, Acadia University, etc.>.

I only need to get and use the data in the DESCRIPTION field AND ONLY records with PSI_NAME in the TABLE_NAME field. Then I will use the data in DESCRIPTION FIELD as my parameter.

I hope I made myself clear in here but I would really need any help on this.
 
Hi,
I am not sure what you mean by 'use it as a parameter'.

Parameters are usually user inputs that somehoe modify or restrict the data returned from the datasource.

Could you give an example of what you need to do?



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Are you trying to create a picklist for a parameter? Or are you just trying to limit the records in the report? If you are just trying to limit the report records, you can use a record selection formula like this:

{table.table_name} = "PSI_NAME"

If you are trying to create a picklist, you could create a command like this:

Select table.description
from table
where table.table_name = 'PSI_NAME'

Then in the parameter setup screen you would select {command.descsription} as your value field to populate the picklist. You would NOT link the command to any tables, and you should NOT reference it in the record selection formula or body of the main report. Ignore the message that says you have two datasources for the report. In the record selection for the report, you would use simply:

{table.description} = {?Description} //your parameter name

-LB
 
Thank you for your prompt responses. To further clarify, the details of the report would like this on print out:

PSI_Name ID# Full_Name Member_Type Member_Category Email Expected_YR_of_Grad

Where
PSI_Name = is a record in Gen_Tables.TABLE_NAME


ID#, Full_Name, Member_Type, Member_Category, Email = are all from Name table


Expected_Yr_of_Grad = is in EDUC table

The requirements are:
1. Use PSI_Name as reference point in getting the PSI description from the same table [Gen_Tables], in the same row but in anoher field [Description]
2. The data in [Gen_Tables.Description] will be used as a parameter selection list.
3. The thing is there are a lot of other information in Gen_Tables, but we wanted only that portion of the table.

I am really very thankful for your help Turkbear and lbass.

Regards,
 
I think you should try my suggestion regarding creating a parameter picklist.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top