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

parameter clientcode xcode

Status
Not open for further replies.

codrutza

Technical User
Mar 31, 2002
357
IE
CR XI
I developed a report which retrieves records for a parameter ?clientcode (=”aaaa”). My boss want to retrieve records where (t.clientcode=”aaaa” or for t.xcode=”aaaa”) but I don’t have the xcode in the table, I have just the xname; I have as well the t.clientname in the table. Then I was thinking to make another parameter ?clientname=”alcor”, but my boss wants the parameter based by clientcode.
Please tell me if that is possible and how to do it.
Thanks
 
YOu must first add a table to your report which holds the Xcode.

In select expert you can then use a single parameter as required
t2 = new table added which holds Xcode.

(t1.clientcode= ?clientcode or t2.xcode = ?clientcode)

Ian
 
Thanks, Ian, but I can't add tables in db
 
How many xcodes and corresponding client names are there? You could create a formula like this:

select {table.clientname}
case "alcor" : "aaaa"
case "johnson" : "bbbb"
case "berg" : "cdcd"

Then set your formula = to the parameter.

-LB
 
They are far too many codes....:( and they are added/deleted more every day
 
How do YOU know what xcodes correspond to what client names?

-LB
 

If I understand right your question:

Xcode doesn't exist, I was just writing about it, for the explanation. Clientname is the same as xname. Let’s say clientcode="AAAA" and clientname="A1" and xname="A1". I made a parameter on the name, and it worked fine, but my boss wasn’t happy; he wanted a parameter on code :( The more I think, and I think what you are asking, I don't think is possible... sorry...
 
Why don't you show some actual sample data that shows what is in the database for client code and client name and xname. Please show several rows.

-LB
 
So, they are 2 tables: clients and jobs; I can't give the real name for the clients or the consignee.

I retrieved the records which have clients or the consignee STELAN

clients.ClientCode clients.ClientName jobs.ConsigneeName jobs.Number
STE/LAN STELAN STELAN 1047447
STE/LAN STELAN STELAN 1048035
STE/LAN STELAN STELAN 1048036
STE/LAN STELAN STELAN 1048037
STE/LAN STELAN STELAN 1048022
STE/LAN STELAN STELAN 1047540
STE/LAN STELAN STELAN 1047541
STE/LAN STELAN STELAN 1047830
STE/LAN STELAN STELAN 1048605
STE/LAN STELAN STELAN 1048606
STE/LAN STELAN STELAN 1049794
STE/LAN STELAN STELAN 1049452
STE/LAN STELAN STELAN 1049514
STE/LAN STELAN STELAN 1048745
STE/LAN STELAN STELAN 1048746
STE/LAN STELAN STELAN 1048703
STE/LAN STELAN STELAN 1048704
STE/LAN STELAN STELAN 1049632
STE/LAN STELAN STELAN 1050006
STE/LAN STELAN STELAN 1050009
TIANIN LOGISTICSCOA STELAN 1043723
TIANIN LOGISTICSCOA STELAN 1043900
TIANIN LOGISTICSCOA. STELAN 1043901
/Group Air & Sea STELAN 1043411
/Group Air & Sea STELAN 1043372
/Group Air & Sea STELAN 1043373
AS/EUR Air & Sea Ltd STELAN 1045920
/Group Air & Sea STELAN 1043839
/Group Air & Sea STELAN 1043418
AS/EUR Air & Sea Ltd STELAN 1045154
/Group Air & Sea STELAN 1044010
STE/Store STE Stores Ltd STELAN 1045763
STE/Store STE Stores Ltd STELAN 1045432
STE/Store STE Stores Ltd STELAN 1045824
TAO LOGIXTICS STELAN 1044265
STE/Store STE Stores Ltd STELAN 1045898
STE/Store STE Stores Ltd STELAN 1045906
STE/Store STE Stores Ltd STELAN 1045848
STE/Store STE Stores Ltd STELAN 1046908
NGB LOGISTICSCO STELAN 1043644
NGB LOGISTICSCO STELAN 1044518
NGB LOGISTICSCO STELAN 1044312
STE/LAN STELAN STELAN 1049016
STE/LAN STELAN STELAN 1049017
STE/LAN STELAN STELAN 1049136
STE/LAN STELAN STELAN 1049137


 
So is the consignee name the "xname"? You said earlier that it was the same as the clientname, but in the above data it is only sometimes the same.

How are you linking these two tables? On what field? What would this same data look like with the linking field as a fifth column?

-LB
 
Must be my English. I meant I retrieve the records which have the (consigneename STELAN or the clientname STELAN)(with parameter ?name). Yes the xname is the consigneename, mea culpa. The tables are linked jobs.accountnumber=clients.accountnumber. I have to be at work to have access to the reports, to print the fifth column accountnumber, if I understood right. I work just part time.
 
You don't have to add the column if it is the same as the fourth column.

Can you explain what the user is requesting using the above data? You say he/she only wants to use a parameter based on the code field--but to return what? If there is no existing xcode, then all you have is the existing code, and in some cases it would return two different names per code.

I'm wondering though whether they just want to use the code to return records where the clientname and xname are the same, in which case you would just need to add a link between clientname and xname in addition to the account link.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top