1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Linking in Crystal Reports

Discussion in 'Business Applications' started by galoryber, Jan 5, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. galoryber

    galoryber Thread Starter

    Joined:
    Mar 15, 2010
    Messages:
    96
    I need to refine a report that shows the number of products sold each hour, to the number of Bar products, and the number of Food products sold each hour. The basic report is already there for me.

    Blue Will be for Tables and Red will be for Columns

    The bar / food products are defined by their SummaryNum. The problem is... this report pulls from the POSDetail table which does not contain the SummaryNum field.

    It pulls Prodnum from POSDetail. Prodnum can be found in the Product table as well, which contains the needed ReportNo field. The ReportNo field is needed because it can be found in the ReportCat table which, finally, contains the SummaryNum field I need. I've therefore linked POSDetail to Product to ReportCat.

    Am I in the right train of thought here? Can I tell it to take any product it gets from that table A, out of any report number from table B, as long as that report number has a specific summary number from table C?

    Hopefully I've made this easy enough to follow.
     

    Attached Files:

    • L.bmp
      File size:
      187 KB
      Views:
      43
  2. Center

    Center

    Joined:
    Jan 13, 2009
    Messages:
    38
    Hello galoryber,

    So if I'm reading your question right, is your question related to Access (as opposed to Crystal Reports?)

    I think what you're saying is that the information you need is in the tables POSDetail and ReportCat, but you need the table Product to link the two tables together. And you appear to have linked the tables the way I would have (using left joins instead of inner joins).

    The only thing I would point out is that your query there will only produce results for products that had a transaction. If a product had no transaction (no TRANSACT), then you won't see that product shown in your report. If that is ok with you, then I think you're on the right track.
     
  3. galoryber

    galoryber Thread Starter

    Joined:
    Mar 15, 2010
    Messages:
    96
    While I'm doing all of this in Crystal Reports, it essentially works in similar manners. Unfortunetaly, my understanding of a lot of this is pretty minimal, as new as I am with it, so I appreciate the second opinion.

    The TRANSACT field actually comes up with a number for another table with the transaction summary, so it actually doesn't pertain, but your thinking was correct.

    All that's left now is to find out why the report generates nothing when I tell it to pull only a certain summary number. Are you familiar with Cystal Reports? or just recognizing that the linking works similar? I don't know if there is a certain way to type in the selection formula for linked fields, becuase when I add in the selection formula for {ReportCat.SummaryNum} = 2 (or any other value) I get nothing, when I know there is something there to pull.
     
  4. galoryber

    galoryber Thread Starter

    Joined:
    Mar 15, 2010
    Messages:
    96
    Ah- hah! nevermind my stupid mistakes..save the file .. THEN try it in the customer's software... ;) hahah.

    It is working correctly, and the selection formula I've already got.

    Thanks for your help.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/972821

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice