The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

Help me report on crystals...(Seagate Crystal Reports)

rfaliasrfalias Registered User regular
edited April 2009 in Help / Advice Forum
Or is that crystal reports?

Anyways, I just picked up crystal reports at work the other day (Version 9).
I grasped it fairly quick, except for one thing...

Field linking between databases.
Maybe my trial and error is failing me but I can't seem to get it to do what I want.

Here is the setup.

I have one database (HD), it is fairly new. It contains information on helpdesk tickets. So inside it has username,ticket number,dates, etc...

Now, we have another, much older database(CHG) that also contains tickets and much more than the newer one. More importantly the database contains a different type of ticket that is not created through the other database. We will call them tasks.
They have all of the same information, and also contain tickets from the first database as well.

Here is my conundrum.
I currently have tickets from the (HD) database that list all of a users tickets, and shows the dates, times, and other relevant information for a specified time range (Last7Days).
I also want to find tickets for the same users, and time range from the (CHG) database and put them in the same report.

The thing is, the two databases don't have identical field names. Now I can link up ticket number fields from both databases which are completely unique and are the same format, as well as time stamps. I linked them up, but if I drag them both out, no data shows. I'm sure that's not how database linking works so help me understand how it works and a practical application for it. Because pulling 2 fields and expecting results just really isn't working out.

I do understand the join options, like inner, outer Left/right. But I just can't figure out how to get data from both databases to display.

If something isn't clear, just ask and I'll do my best to clarify.

rfalias on

Posts

  • a penguina penguin Registered User regular
    edited April 2009
    Oh man, it's been a while, but I'll give this a shot. So here's a fair warning that I might be completely wrong.

    At the end of the day, all you are doing is using a fancy interface to generate SQL statements for you.

    You're tying the two tables in via a value that's the same between the two, so you need a field that does that. Then you link the two by doing what you're doing now. If you don't have fields in each tables that are the same (and have the same info), then you have to do something about that. If there is a third table that has a field that all three tables share, you can link both table back to that and then it will work. There's got to be something that these guys share. Whatever it is, it's probably a 1:1 relationship, so there's your join. Since it's a helpdesk thing, it'll probably be 'Users' or something.

    Remember, you don't need to link the actual field you want to pull in, you're just tying the tables together. Once you've done that, you can drag and drop and field you want from either table. You'll have to put whatever field you linked on into your report, but you don't have to display it.

    a penguin on
    This space eventually to be filled with excitement
  • vonPoonBurGervonPoonBurGer Registered User regular
    edited April 2009
    rfalias wrote: »
    Now I can link up ticket number fields from both databases which are completely unique and are the same format, as well as time stamps.
    Just to make sure I understand, you have an older database (CHG) that has a lot of older "task" records, and also has newer "task" records that are mapped one to one with a ticket record in the newer database (HD)? Are you absolutely certain that the ticket/task numbers are identical between these two DBs? It sounds to me like you might be joining on two fields that are actually completely independent of one another. I.e. ticket IDs and task IDs might be autogenerated from sequences in their respective DBs, and might have no relation to one another. Hence when you try to join using those fields you get no results, because they aren't actually related to one another.

    vonPoonBurGer on
    Xbox Live:vonPoon | PSN: vonPoon | Steam: vonPoonBurGer
  • rfaliasrfalias Registered User regular
    edited April 2009
    Ok, so I can finally simplify this.

    DB1 has a unique ChangeID, DB2 has the same ChangeID (Possibly listed multiple times per ID, instead of just ONE).

    I want to be able to List all of the changeID's from table 1 as a group, with some data from table two that has the same changeID, but not the same data. See the main ID from DB1 has the general information, then DB2 has more specific tasks and information on who worked on the change. I want to list DB1 as a group, then list some of the corresponding fields from DB2 that have the same ChangeID associated with them.

    So, a line would look like...
    (Group)
    DB1.ChangeID DB1.Summary
    (Data)
    DB2.ChangeID DB2.Summary DB2.Data

    Remember that DB1.ChangeID and DB2.ChangeID would have the exact same unique identifier.
    It seems that no matter how I link it, it just always shows up blank when I put fields from each database in the report.

    rfalias on
Sign In or Register to comment.