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

Record Selection Problem

Status
Not open for further replies.

MadCatmk2

Programmer
Oct 3, 2003
145
GB
Hi all

Please bear with me for this one as it awjkward for me to explain the problem.

I'm using Crystal 9.0 and a connection to a sql database.

The report i am trying to produce is to show open calls on our help desk system. The report i have outputs all the correct data relating to the open calls. The problem comes from when i try to select entries based on a specific location or name. The output at present looks like this:

Request ID 14809 {Group header}
Department [Dept] |
Name [Name] |{Details section}
Location [Location] |

[Logged date] [Priority] [Summary] {Group footer 1}
[Sub report detailing notes on the call] {group footer 2}

The problem comes when i try to specify calls from a specific location or name. The details section looks like this:

{Req_Alpha1}{CLID_Alpha1}

Alpha1 in both tables changes depending on the a field StyleID. They both can take on the form of Location, name and department. When i try to search on CLID.Alpha1 for a specific Location it does bring up the calls but unfotunately it omits the rest of Alpha1's values i.e. name and department.

I hope this makes sense to someone and they could perhaps suggest a few ideas of how i might perform the record selection and keep all of the details for each Request ID.

Thanks in advance
 
You're probably best served posting technical inforamtion.

-Database used (probably by SQL database you mean SQL Server, SQL is a language)
-Example data
-Expected output

It's generally easier and more accurately describes the environment.

"They both can take on the form of Location, name and department." means that it contains all of them, or it contains one of them per field?

Stating the style_id seems the solution.

Post some relevant data and expected output.

-k
 
Hi

Thanks for the reply, as i say i didn't think i had explained it very well. I'll try again with the info you requested, so here goes.

It is indeed a SQL server that i'm connecting to.

I'll miss out the the fields that i have in the group footer as they don't have affect the part of the report i'm having a problem with, heres a simple example of the data.

Example Data
-------------

{Request.ID}
{Style.Alpha1} {CLID.Alpha1}

Request ID 10000 (Group Header)
location Hospital1 |
department Plastics | (Details)
name Fred |

Request ID 10001
location Hospital2
department Stroke Unit
name Mary

Request ID 10002
location Hospital1
department CCU
name Bob

The problem comes when i try a record selection for those calls for say "Hospital1"

Required Data
--------------

Request ID 10000
location Hospital1
department Plastics
name Fred

Request ID 10002
location Hospital1
department CCU
name Bob

Outputted Data
--------------

Request ID 10000
location Hospital1

Request ID 10002
location Hospital1

The correct jobs are being output though the name and location fields are being ommitted.

The table layout is as follows:

Request --> CLID --> Style

Request has the ID number as well as some other details relating to the call itself. The CLID table stores the client details and the Style table holds the titles.

one request can have multiple CLID entries. The CLID.StyleID links to the Stlye table.

Style.Alpha1 can be either Name, Location, or Department depending on the StyleID in the CLID table.

I hope this makes more sense. I apologise for my explanation as it may not be clear. If there is anything else that is needed please let me know.

Thanks for the help, i appreciate it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top