Having trouble with a one to many relationship in Crystal reports 11

I have an old report that I inherited.  I have two main tables from which I draw data into this report:  QAmonitortrack and monitorsperfm.  I am correctly getting my data out of the QAmonitortrack table as the data relationships are one to one, but when I try to retrive data from the monitosperfm table, I only get one record back for each csrid.  I am trying to calculate the number of [callid] in the monitosperfm table for the fiscal month.  I have been through almost all of the table links and tried changing the link properties to give me more than one callid for each csrid I pulled out of qamonitortrack table.
Any suggestions?
Thanks...sql listed below:
SELECT "tblSupervisors"."LastName", "tblSupervisors"."FirstName", "tblCSR"."LastName", "tblCSR"."FirstName", "tblDirectors"."LastName", "tblDirectors"."FirstName", "tblSupervisors"."SupervisorID", "tblQAMonitorTrack"."CSR_ID", "tblQAMonitorTrack"."FiscalYear", "tblQAMonitorTrack"."FW_Month", "tblQAMonitorFWCalendar"."FiscalYear", "tblQAMonitorFWCalendar"."Fiscal_Month", "tblFM_BeginEndDates"."fm_start_date", "tblQAMonitorTrack"."FiscalWeek", "tblFM_BeginEndDates"."fm_end_date", "tblQAMonitorFWCalendar_1"."FiscalWeek", "tblQAMonitorFWCalendar_2"."FiscalWeek", "tblMonitorsPerFM"."callid", "tblMonitorsPerFM"."score", "tblQAMonitorFWCalendar"."FW_Start_Date", "tblQAMonitorFWCalendar"."FW_End_Date", "tblQAMonitorFWCalendar"."FW_Week_of_Month", "tblQAMonitorTrack"."CallsHandled", "tblCSR"."Group_ID", "tblPosition"."PositionDesc", "tblMonitorsPerFM"."dateofmonitor"
FROM   ((((((((("SMG_APPS"."dbo"."tblQAMonitorTrack" "tblQAMonitorTrack" INNER JOIN "SMG_APPS"."dbo"."tblManagers" "tblManagers" ON "tblQAMonitorTrack"."Mgr_id"="tblManagers"."ManagerID") INNER JOIN "SMG_APPS"."dbo"."tblSupervisors" "tblSupervisors" ON ("tblQAMonitorTrack"."Sup_Id"="tblSupervisors"."SupervisorID") AND ("tblManagers"."ManagerID"="tblSupervisors"."ManagerID")) INNER JOIN "SMG_APPS"."dbo"."tblCSR" "tblCSR" ON "tblQAMonitorTrack"."CSR_ID"="tblCSR"."CSRID") INNER JOIN "SMG_APPS"."dbo"."tblFM_BeginEndDates" "tblFM_BeginEndDates" ON ("tblQAMonitorTrack"."FiscalYear"="tblFM_BeginEndDates"."fiscalyear") AND ("tblQAMonitorTrack"."FW_Month"="tblFM_BeginEndDates"."fiscal_month")) INNER JOIN "SMG_APPS"."dbo"."tblMonitorsPerFM" "tblMonitorsPerFM" ON ((((("tblQAMonitorTrack"."FiscalYear"="tblMonitorsPerFM"."fiscalyear") AND ("tblQAMonitorTrack"."FW_Month"="tblMonitorsPerFM"."fiscal_month")) AND ("tblQAMonitorTrack"."CSR_ID"="tblMonitorsPerFM"."csrid")) AND ("tblQAMonitorTrack"."Sup_Id"="tblMonitorsPerFM"."supervisorid")) AND ("tblQAMonitorTrack"."Process_Order"="tblMonitorsPerFM"."Process_Order")) AND ("tblQAMonitorTrack"."Mgr_id"="tblMonitorsPerFM"."managerid")) LEFT OUTER JOIN "SMG_APPS"."dbo"."tblQAMonitorFWCalendar" "tblQAMonitorFWCalendar" ON "tblQAMonitorTrack"."FiscalWeek"="tblQAMonitorFWCalendar"."FiscalWeek") LEFT OUTER JOIN "SMG_APPS"."dbo"."tblQAMonitorFWCalendar" "tblQAMonitorFWCalendar_1" ON "tblFM_BeginEndDates"."fm_start_date"="tblQAMonitorFWCalendar_1"."FW_Start_Date") LEFT OUTER JOIN "SMG_APPS"."dbo"."tblQAMonitorFWCalendar" "tblQAMonitorFWCalendar_2" ON "tblFM_BeginEndDates"."fm_end_date"="tblQAMonitorFWCalendar_2"."FW_End_Date") INNER JOIN "SMG_APPS"."dbo"."tblDirectors" "tblDirectors" ON "tblManagers"."DirectorID"="tblDirectors"."DirectorID") LEFT OUTER JOIN "SMG_APPS"."dbo"."tblPosition" "tblPosition" ON "tblDirectors"."PositionID"="tblPosition"."PositionID"
WHERE   NOT ("tblSupervisors"."SupervisorID"=0 OR "tblSupervisors"."SupervisorID"=17 OR "tblSupervisors"."SupervisorID"=19 OR "tblSupervisors"."SupervisorID"=20 OR "tblSupervisors"."SupervisorID"=33 OR "tblSupervisors"."SupervisorID"=35) AND ("tblFM_BeginEndDates"."fm_end_date">={ts '2010-11-27 00:00:00'} AND "tblFM_BeginEndDates"."fm_end_date"<{ts '2010-11-28 00:00:00'}) AND "tblQAMonitorTrack"."FiscalYear"="tblQAMonitorFWCalendar"."FiscalYear" AND "tblQAMonitorTrack"."FW_Month"="tblQAMonitorFWCalendar"."Fiscal_Month" AND "tblQAMonitorTrack"."FiscalWeek">="tblQAMonitorFWCalendar_1"."FiscalWeek" AND "tblQAMonitorTrack"."FiscalWeek"<="tblQAMonitorFWCalendar_2"."FiscalWeek" AND ("tblCSR"."Group_ID"=1 OR "tblCSR"."Group_ID"=10 OR "tblCSR"."Group_ID"=15)
ORDER BY "tblSupervisors"."SupervisorID", "tblQAMonitorTrack"."CSR_ID"

If the db is huge, you may want to copy it, and delete all but a few hundred rows.
Then you can play with the copy till you get the query doing what you want.
You might try changing this section
"tblQAMonitorTrack"."CSR_ID"="tblCSR"."CSRID") INNER JOIN "SMG_APPS"."dbo"."tblFM_BeginEndDates" "tblFM_BeginEndDates" ON ("tblQAMonitorTrack"."FiscalYear"="tblFM_BeginEndDates"."fiscalyear") AND ("tblQAMonitorTrack"."FW_Month"="tblFM_BeginEndDates"."fiscal_month")) INNER JOIN "SMG_APPS"."dbo"."tblMonitorsPerFM" "tblMonitorsPerFM" ON
To left outer joins.
Also, just create a connection to the tblMonitorsPerFM all by itself, run a query and see if you get multiple results directly from the DB...

Similar Messages

  • Struggling with a one to many relationship in a sub-report

    Post Author: Scott_tansley
    CA Forum: General
    I have a database schema as per below: tblENQUIRY                 tblDatasheets                  tblReportParasIRSID (PK)       1 --> &  IRSID (FK)                       UID (PK)Attribute1                     SHEETID (PK)     1 > &  SHEETID (FK)Attribute2                     Attribute1                         LIST_ORDER                         tblStandardParasAttribute3                     Attribute2                         PARA_CODE (FK)    & < 1   CODE     (PK)etc...                            Attribute3                                                                     TEXT                                   etc...
    The PROBLEM I am a Crystal Reports Newbie, and having to work through things bit by bitu2026  I've managed to achieve quite a lot, but I'm totally stuck with this and would appreciate some help. I need to create a report (essentially a letter and some datasheets) around a one-to-many relationship, which I have managed to compile using a main report (for the one &#91;tblENQUIRY&#93;) and sub report (for the many &#91;tblDatasheets&#93;).  Essentially I need a covering letter, then the u2018manyu2019 datasheets, and then a number of other pages (which are largely static text). I have created a main report which includes the covering letter, holds a subreport for the datasheets, and then contains the text for the additional pages.  This all works fine, and I get the correct number of datasheets for each main report. My problem stems from the use of this sub report.  This sub-report needs to hold some attribute values for each datasheet, which is fine.  However, on each datasheet page I need to have some paragraphs, which are held in another one to many relationship.  Each datasheet may have up to six paragraphs held as a code in tblReportParas, with a relationship to the text as held in tblStandardParas. My original thought would have been to embed another sub report, containing the values from tblStandardParas!TEXT, into the first sub report.  However, I have found that it is not possible to have a sub-report inside another sub-report.  I had seperated the first sub-report out from the main report, and then embedded another sub-report into it.  This worked fine until I tried to stitch the sub-report back into the main report (at which point the sub-sub-report dissapeared from view). I have therefore reworked my sub-report a little, and the attribution is now stored in a pageheader, with the tblStandardParas!TEXT in a detail section below it.  This almost works! The only problem is that there is no relationship between the pageheader and detail sections.  To clarify, I would expect to have one datasheet, with the attribution at the top, and then the six paras below.  Then, the same on the next page (assuming there is a second datasheet) for that report.  Instead, I get the correct attribution, but the detail section actually gives every paragraph in the database, no matter which datasheet/or report it related to!  I therefore need to limit the detail section to only show those paragraphs where the SHEETID in tblReportParas is the same as the tblDatasheets SHEETID. Any offers of advice would be appreciated.

    Post Author: Scott_tansley
    CA Forum: General
    I managed to resolve this myself in the end.  I moves the tblEnquiry data into report header/footer sections, this allowed me to add the tblDatasheets information into the details section, which gave me multiple pages - and then finally, the Paragraphs were added through the use of a sub report. 
    There's probably an even better way, but for now it works, it's quick - and so I'm going to go with it!
    Thanks for your interest.

  • I have been through all the steps given in help to enable cookies but the site i am trying to log into still says i have to have a cookie enabled browser....i am only having trouble with this one site and it is not blocked

    each time i try to log in as a member to this site i get the message that i have to have a cookie enable browser. all other sites seem to be working fine. cookies are enable, have been cleared and i have nothing blocked at all

    Download a new copy of the Firefox program and save the DMG file to the desktop
    * Firefox 3.6.x: http://www.mozilla.com/en-US/firefox/all-older.html
    * Firefox 4.0.x: http://www.mozilla.com/en-US/firefox/all.html
    * Trash the current Firefox application to do a clean (re-)install
    * Install the new version that you have downloaded
    Your profile data is stored elsewhere in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder], so you won't lose your bookmarks and other personal data.

  • Update one to many relationship

    Since cfgridupdate is somewhat buggy, does anyone have a
    better suggestion to edit/update two tables with a one-to-many
    relationship? Any suggestions are welcome.

    cfquery

  • TS1368 is anyone else having trouble with utunes store?

    is anyone else having trouble with utunes srore?

    many thanks.
    With those symptoms, I'd try the following document:
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • Urgent : java bean having bidirectional one to many relationship

    Hi,
    We have complex requirement in our application.
    We need to copy java bean having bidirectional one to many relationship to another javabean having bidirectional one to many relationship..
    E.g
    Class Basket1 {
    public String color;
    pubic String type;
    public List<Basket1> basketList = new ArrayList()
    Class Basket2 {
    public String color;
    pubic String type;
    public List<Basket2> basketList = new ArrayList()
    We need to exact copy Basket1 to Basket2. We are in trouble to copy List of child because we do not have how many child Basket1 have of same type..
    Can someone help us how we can implement such kind of complex object bidirectional one to many relationship??

    I can't see anything bidirectional about these relationships. What I can see is a couple of BasketN classes that look identical so I don't know why they both exist, and they both contain lists of themselves as members, which suggests some kind of tree structure. Nothing bidirectional there. I can see tat these things can form circular object graphs but I don't see why you would want to do that.
    We need to exact copy Basket1 to Basket2And I don't know what that means. Please explain.

  • We are currently having troubles with our iTunes. Playing different songs and randomly it changes the name of the song to pink time after time. We could go through 5 songs before it will change the next one to song title time after time and artist pink

    Hi I am having trouble with iTunes! Randomly when I click on a song in iTunes it changes the song title to time after time and the artist is pink.
    I could click on 4 songs and they will be normal but then the 5th one will change the info to time after time.
    I haven't done anything different or new, it started doing it all of a sudden, well that I have noticed anyway. Please help.

    Hello Schimi. The Time Capsule is a kind of product that offer you two possibility:
    - To use the TC as a router or as an external HD.
    The difference between WPA and WPA 2 are:
    - They are two kinds of internet connection.
    WPA uses dynamic key encryption , which means that the key is constantly changing and makes the invasion of a wireless network more difficult than WEP . WPA is considered one of the highest levels of wireless security for your network and is recommended if your devices support this kind of encryption . Newer routers offer WPA2 security . WPA2 is compatible with WPA , but offers higher security level . In fact, it meets the high standards of many government agencies . If the router and computer support WPA2 , this should be your choice.
    If you need any help or if you find some difficult setting up it you can contact Apple Support.
    I am sure that they can help you with that.
    I am sory for the delay. I holpe that you solve your issue.

  • One-to-many relationship: problem with several tables on the one side...

    Hello
    I'm having problems developing a database for a content management system. Apart from details, I've got one main table, that holds the tree structure of the content ("resources") and several other tables that contain data of a particular datatype ("documents", "images", etc.). Now, there's one-to-many relationship between "resources" table and all the datatype tables - that is, in the "resources" table there's "resource_id" column, being a foreign key referenced to the "id" columns in the datatype tables.
    The problem is that this design is deficient. I can't tell form the "resource_id" column from which datatype table to get the data. It seems to me that one-to-many relationship only works with two tables. If the data on the one side of the relationship is contained in several tables, problems arise.
    Anybody knows a solution? I would be obliged.
    Regards
    Havocado

    Hi;
    A simple way may be create a view on referenced tables:
    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as hr
    SQL>
    SQL> drop table resources;
    Table dropped
    SQL> create table resources(id number, name varchar2(12));
    Table created
    SQL> insert into resources values(1,'Doc....');
    1 row inserted
    SQL> insert into resources values(2,'Img....');
    1 row inserted
    SQL> drop table documents;
    Table dropped
    SQL> create table documents(id number, resource_id number,type varchar2(12));
    Table created
    SQL> insert into documents values(1,1,'txt');
    1 row inserted
    SQL> drop table images;
    Table dropped
    SQL> create table images(id number, resource_id number,path varchar2(24));
    Table created
    SQL> insert into images values(1,2,'/data01/images/img01.jpg');
    1 row inserted
    SQL> create or replace view vw_resource_ref as
      2    select id, resource_id, type, null as path from documents
      3      union
      4     select id, resource_id, null as type, path from images;
    View created
    SQL> select * from resources r inner join vw_resource_ref rv on r.id = rv.resource_id;
            ID NAME                 ID RESOURCE_ID TYPE         PATH
             1 Doc....               1           1 txt         
             2 Img....               1           2              /data01/images/img01.jpg
    SQL> Regards....

  • TS3274 my ipad is having trouble with my music... i had recently gotten a new one when i signed into my icloud the music that i had on the original one was not there.... some songs were in fact there but not clickable ( it was there only gray)..anyone kno

    my ipad is having trouble with my music... i had recently gotten a new one when i signed into my icloud the music that i had on the orignal one was not there.... some songs were in fact there but not clickable ( it was there only gray)... i was looking for help on how to get the music on the ipad

    my ipad is having trouble with my music... i had recently gotten a new one when i signed into my icloud the music that i had on the orignal one was not there.... some songs were in fact there but not clickable ( it was there only gray)... i was looking for help on how to get the music on the ipad

  • I have an Ipod Touch (4th Gen) and I am having troubles with my downloads from purchasing music from the Ipod. On my downloads icon in the Itunes Store (on Ipod) there is a symbol of how many songs I still have waiting to download, but they wont download.

    I have been having troubles with this for months and am extremly tired of not being able to download my songs. I bought these songs off of Itunes as well, so I really hope i can retrieve them. I do not know where to find a personal apple support person yet, does anyone know where to find one on the website?

    See these previous discussions:
    Waiting applications: Apple Support Communities
    Downloading apps stuck on waiting...: Apple Support Communities

  • Since installing the new OS i am having troubles with different appliction icons showing up on my main page twice (upper left corner), and not allowng me to select certain ones (app store specifically).   Anyone else having this issue?

    Help - anyone else out there having trouble with the new OS system on their ipad 2?    I am not getting mutliple copies of several apps ont he main page.  They are "collecting: in a pike int he upper left corner and the original application icon is no lobger working.    I have tried a hard sync, and that didn't help.

    It should only be able to have one copy of an app on the iPad. Have you tried a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.
    Do all the apps work ? In the past a few people have taken a screen shot of their iPad screen and that has then become their background picture - so some of the 'app's may actually be on your wallpaper picture and not actual apps. Have you tried changing the wallpaper to see if that makes any difference ?

  • Having trouble with double entries in ical after installing Lion.  After entering an event, another one pops up right next to it.

    Having trouble with double entries in ical after installing Lion.  After entering an event, another one pops up right next to it.

    Check iCal preferences, the Accounts Tab. You might have duplicate accounts.

  • Having trouble with music apps shutting down, even after I swipe them off the screen. They go off then come back on in a few minutes. This happens in my car either ubs plugged in, or bluetooth. ANy one else have that issue?

    Having trouble with music apps shutting down, even after I swipe them off the screen. They go off then come back on in a few minutes. This happens in my car either ubs plugged in, or bluetooth. ANy one else have that issue?

    Hi, beth.lau.gr.
    Thank you for visiting Apple Support Communities.  
    I understand you have been experiencing issues with your iPhone restarting and showing you a blue screen.  I wont be able to give you an exact answer as to why this is happening.  However, this is the most relevant troubleshooting article for this issue.  This article also provides options to reach out to us via phone for additional assistance.  
    If your iOS device restarts, displays the Apple logo, or powers off while you're using it
    http://support.apple.com/en-us/HT203899
    Cheers, 
    Jason H.  

  • HT201320 I am having trouble with password. Forgetting password,as I have many mail IDs like yahoo,gmail,hotmail,apple, I cloud etc.,thus confusing about password and restating through procedures. The altered password is not accepted I Safari

    I am having trouble with password. Forgetting password,as I have many mail IDs like yahoo,gmail,hotmail,apple, I cloud etc.,thus confusing about password and restating through procedures. The altered password is not accepted I Safari. When I want to open my mail but window appears as incorrect password though the mail appears on the left. however whe I go to my mail separately opening my mail, without mail icon in my pad.

    I'm having the same problem, what did you do?

  • Any one having trouble with AirDrop?

    Any one having trouble with AirDrop?

    I'm unable to Airdrop
    Still lacking useful detail...   Do the "nearby" contacts have AirDrop enabled on their devices?  Are they <10 m away, line of sight (no walls or furniture intervening)?

Maybe you are looking for

  • Substitute item line text (BSEG-SGTXT)

    Dear all, I have some questions here. For example, in tcode FB60, we enter the vendor code, invoice date, amount, tax, etc. When click on simulate, there will be another line item for Tax Input(if we select the tax). One of my requirement is, if user

  • Ipod connection to itune and my computer

    Basically, i have an ipod touch 80GB and it seems to freeze my Itunes and the program my computer this is an annoying problem that i really do need solved.

  • Acrobat says document has no hyperlinks - but it does!

    I created a pdf from a Publisher document using Acrobat Standard 7.0.  There were hyperlinks created in the Publisher document but they don't work in the pdf document.  When I check links by using the Advanced tool and check for links in the document

  • JPEGS not showing on app

    Hi, I've installed the Lightbox gallery widget and exchanged the sample pictures with some of my own. Everything looks like in live view but not showing up on the app itsekf when loaded on the phone. Have I missed out on something? /Cynthia

  • How to contact Apple

    Hello I'm Tommy and I'm wondering if I could contact Apple. And what I mean by contacting Apple is that, I want to suggest Apple some bug fixes  on iOS6 that they could fix. Like the home button on the iPad, which it got very non responsive. Thank yo