Question : Cast Question for Crystal Reports

I have a crystal report where I'm trying to match report Ids. On one table, the report id is formatted as a number. On the second table, the same field is formatted as string. In order for me to get the data I need, I currently write a second report off the table that has the string formatted report id and export it to excel. I then format the field to a number and then re-import it to the main report as an excel data source and link both fields together.
This is a quick resolution, but I need to constantly update this information and hate having to export and reimport the data.

I was reading that I can solve this by using the cast function. How can I do this?
I'm using crystal 11.

Thank you

Answer : Cast Question for Crystal Reports

You could use a COMMAND for the data source.  You supply the SQL so something like

SELECT T1.*, T2.*
FROM T1 INNER JOIN T2 ON
T1.NumberField = ToNumber(T2.TextField)

Another way would be to add the tables to the report and not link them.
Use the SELECT EXPERT to link them as

{T1.NumberField} = ToNumber({T2.TextField})

mlmcc
Random Solutions  
 
programming4us programming4us