If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Crystal Reports > Using Same Field to Pull Data

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-09-11, 15:27
stella2626 stella2626 is offline
Registered User
 
Join Date: Nov 2011
Posts: 1
Question Using Same Field to Pull Data

I am trying to set-up a report for Help Desk calls. I want one field for the problem description and another field for the solution description. In the database they are in the same field in the table but are identified by 0 for the problem description, 1 for a note and 2 for the solution.

When I go to Select Expert and choose the identifier for the problem description field, it changes it for the solution description field as well.

How do I distinguish the parameters between the two fields so changing one doesn't affect the others?

Sorry - I am new to this so it is probably very simple.

Thanks for your help!
Reply With Quote
  #2 (permalink)  
Old 11-09-11, 20:59
myle myle is offline
(Making Your Life Easy)
 
Join Date: Feb 2004
Location: New Zealand
Posts: 1,143
I don't know Crystal

What I would is create 4 query
A notes that only looks at the Notes and the Description call it note: with the ID
B solution that only looks at the solution and the Description call it solution: with the ID
C problem that only looks at the problem and the Description call it problem: with the ID

Then the last one would join the 3 querys by the ID

then you will see

ID | problem | solution | note

or look up crosstabs of provit Querys
__________________
hope this help

See clear as mud


StePhan McKillen
the aim is store once, not store multiple times
Remember... Optimize 'til you die!
Progaming environment:
Access based on my own environment: DAO3.6/A97/A2000/A2003
VB based on my own environment: vb6 sp5
ASP based on my own environment: 5.6
VB-NET based on my own environment started 2007
SQL-2005 based on my own environment started 2008
MYLE
Reply With Quote
  #3 (permalink)  
Old 11-10-11, 14:18
mission mission is offline
Registered User
 
Join Date: Oct 2010
Posts: 44
Quote:
Originally Posted by stella2626 View Post
I am trying to set-up a report for Help Desk calls. I want one field for the problem description and another field for the solution description. In the database they are in the same field in the table but are identified by 0 for the problem description, 1 for a note and 2 for the solution.
Quote:
Originally Posted by stella2626 View Post


Your table uses the same field for problem description, note and solution. Which means for each problem, there are 3 records that are associated to the problem. The particular problem should have a problem number which will be common for the 3 records.

Here is what you need to do:

Add the table to the report, group the records by problem number. This will group the 3 records for the same problem together.

Add 3 formulas, problem_desc, note, solution to the report in the Detail section (suppress the formulas to hide them), with the following codes:

problem_desc:

If {field} = 0 Then // depends on how you set the 0, 1 and 2 up
{field}

note:

If {field} = 1 Then // depends on how you set the 0, 1 and 2 up
{field}

solution:

If {field} = 3 Then // depends on how you set the 0, 1 and 2 up
{field}


This would set the problem_desc formula to the field if the field is 0. The same applies to note and solution. With this, now you have 3 fields that contains values from the single field. You can now print the values of these 3 fields in the Group Footer.




Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On