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

Report not displaying actual values

Status
Not open for further replies.

samson123

Programmer
Jun 17, 2005
79
US
Help needed..
Using CR XI, Access 2000

I have two tables...

1) MRCOL --Mater table holding Table name, DBfield name, Display Name
2) TCON----Contact Info

The MRCOL table

Table_name DBfield_name Display_Name
TCON CONFNM First Name
TCON CONLNM Last Name
TCON CONCNM Company Name

TCON Table

CONFNM CONLNM CONCNM
Peter Smith Dell
John Doe HP
Paul Proctor IBM


I am passing parameters to the report and it should display First Name, Last Name, Company Name based on what the user selects to display from the ListView.

I have 3 parameters Param1 thru Param3.

In the detail section I have @col1 thru @col3. col1 thru col3 have same formula except the Param#

@col1 formula looks like below .

Select (?Param1)
Case MRCOL.Display_Name: "{" & {MRCOL.DBfield_Name} & "
default: ""

This is displaying {TCON.CONFNM} if I pass First Name

For example report output looks like this:

First Name Last Name Company Name
{TCON.CONFNM} {TCON.CONLNM} {TCON.CONCNM}
{TCON.CONFNM} {TCON.CONLNM} {TCON.CONCNM}
{TCON.CONFNM} {TCON.CONLNM} {TCON.CONCNM}


How do I get the actual names ? I am sure I am missing something very obvious.
 
I think it should be set up like:

Select (?Param1)
Case "First Name" : {TCON.CONFNM}
Case "Last Name" : {TCON.CONLNM}
Case "Company Name" : {TCON.CONCNM}
default: ""

-LB
 
LB,

Thanks for your response.. I would have done the same. But the problem is I cannot do that. The reports are generic. The Display Names are stored in the Master table (MRCOL) along with the Table Names and field names.

Can you or anybody propose a way of handling by problem ?

 
Hi,
What parameter values are being passed and how do they 'fit in' with your formulas..



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
I am passing "First Name" to param1
"Last Name" to param2
"Company Name" to param3
 
lb and others,

Correction..

Select (?Param1)
Case {MRCOL.Display_Name}: "{" {MRCOL.Table_Name} & "." & {MRCOL.DBfield_Name} & "}"
default: ""

I missed {MRCOL.Table_Name} & "." in my post..

This is how it is in the code .
Can somebody please help...?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top