| Author |
Message |
magjal
Newbie
Joined: 17 Dec 2009
Location: Sweden
Online Status: Offline
Posts: 2
|

Topic: Using data from a file as filter Posted: 17 Dec 2009 at 5:03am |
|
Hi everybody,
using Crystal Reports X I am wondering if the following is possible and how to do it:
I have a file containing multiple patient-id´s, now I want to use those ID´s as a filter in my report (so I dont have to input them manually, since there are a great number of ID´s). I need the choise of filtering so that only data with the same ID´s as those in my textfile are returned in the report.
Any ideas on how to solve this?
|
IP Logged |
|
|
|
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
|

Posted: 17 Dec 2009 at 7:18am |
|
If you kept it as a spreadsheet or in a row based DB and make the field the same type as your DB (likely numeric) rather than a text field with all the items in it, it should be easy to just use that as a source and link it to the ID's in your DB. Assuming you use an inner join it would filter the data as you desire.
Edited by DBlank - 17 Dec 2009 at 7:19am
|
IP Logged |
|
magjal
Newbie
Joined: 17 Dec 2009
Location: Sweden
Online Status: Offline
Posts: 2
|

Posted: 18 Dec 2009 at 6:56am |
|
Ok, and thanks for the reply. But I´m somewhat new in using crystal as well as in more advanced SQL.
To be more specific, this is similar to the function I am looking for:
SELECT c1, c2, c3 FROM table1 WHERE table1.c1 = file.c1
Here the file is the xls file containing my list of patientnames that I want to extract from my database. The actual SQL command if done manually would look something like this:
SELECT c1, c2, c3
FROM table1
WHERE table1.c1 = value1 or value2 or value3...
But how to do this in crystal in an easier way? I managed after your reply to add my xls file as input source, but I have no clue to how to use all the data it contains for filtering (since I need to filter out data for all the entries in the file at once).
|
IP Logged |
|
|
|