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

Join tables with two different data types - Cryrstal XI

Status
Not open for further replies.

NewB2007

Technical User
Feb 25, 2008
42
US
I need to join two tables that both have the same unique identifier column. But the data types in which they are stored are different. Is there a way to join the two together. The table that is currently in use is in a subreport. I just get an error saying that the data types are different. I was just wondering if there was a way to shut that off in Crystal XI or if there is a work around that anyone knows of.
 
If you are linking a field in a sub to a field in the main report, you can create a formula in either place that converts the datatype of one to the other, and then link the formula to the field. Be sure the formatting is the same.

-LB
 
I tried to add a command that pulls the fields from the table that I am trying to get ahold of. This is what I tried

SELECT INT(ID_KEY), ................ FROM NOTES

The ID_KEY is actually a string but in the table that I am trying to link to the field is called RM_TRASACTION which is a number field.

The problem that I come upon is that the software that runs the report throws an error 707 filepath, database connection error, Execute <PEStartPrintJob>

I am not real familiar with the Command feature of Crystal so more than likely I have some syntax wrong somewhere or this doesn't work the way that I think it is working. When I look in the Database Connection window and I look at the data type of the ID_KEY after the command brought it into the report it shows that it is of type integer.

ANY THOUGHTS?!?!?!
 
So you do not want to use the subreport approach? You could use a command as your datasource, but you haven't really provided enough information. I'd want to see how the two fields you want to link currently display. Can you please show samples? What kind of database are you using?

-LB
 
Here is what I have got going... I have a report with a subreport. Inside of the subreport there are two existing tables. I need to add another table to the subreport. This is where the problem lies. The ID_KEY of the new table is of Data Type string. The ID of the RM_Transactions table is of data type Integer. So I thought that I would be able to add a command to this existing subreport to pull the data from this table. Except that when I was writing the command to pull the data I could then covert the ID_KEY to data type Integer. Which as far as I could tell worked... But when I went to run the report through a third party software the report crashes. The DB is a DB2.
 
Hi,
Does the 3rd party app run under an account that has access to the database and its tables, including the one you are trying to add?



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top