Skip to Content
0
Former Member
May 20, 2014 at 01:28 PM

Crystal Report Database Query

20 Views

Hi I would like to ask regarding queries from the database. I have 2 main tables that gets their images from 1 master table.

First is TASK table and Second is ASSET table. Both tables are relational.

Each Task has Asset connected by Task_Asset_ID.

But both tasks and each assets may have also images from the Image table thru Assignment table. But I am wondering how could I query the data to show tasks with images and assets with images in one row.

For example

Task 1 may have Green.jpg

Asset 222 may have Red.jpg

Knowing that Task and Asset are relational, is it possible to show them in one row in crystal report?

.

Task

TaskID TaskName Task_Asset_ID

1

Task1 111 2 Task2 222 3 Task3

111

Asset

AssetID AssetName 111 Asset1 222 Asset2

Images

imgID ImgName 1 Red.jpg 2 Yellow.jpg 3 Blue.jpg 4 Green.jpg

Assignment

AssID TaskOrAssetID ImgID Type 1 1 4 X 2 222 1 Z 3 3 3 Z 4 111 2 X