I have a crystal report which fetches data from a table. It is then displayed in a tablular format. Now I want to add a new column in the report. The values for the new column will be based on the values of an already existing column which is getting populated from the table. The relation is based between the tables.
For eg: Currently crystal report fetches data from XYZ table. The values of co开发者_运维百科lumns column1 and column2 are displayed in the report. Now I am adding a new field in crystal report to be displayed. The values for this field is obtained from a column of another table, say column3 of table ABC. Table ABC has column3 and column4. The relation will be like, i have to select ABC.column3 where XYZ.column2=ABC.column4.
How to achieve this in crystal report.
Thanks in advance
In the report creation wizard, select both your XYZ and ABC tables, similar to this
Then in the next step, setup the relation [XYZ.column2=ABC.column4], similar to this
Now in the next step, select all the columns you want to display from both tables, similar to this
That should take care of your requirement.
精彩评论