Results 1 to 10 of 10

Thread: Data of some Records does not appear in CR9

Threaded View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2006
    Location
    India, Punjab, Bhatinda
    Posts
    1,689

    Question Data of some Records does not appear in CR9

    There are 2 problems in the Report...
    • Data of some Records does not appear
    • Data of Office address appear one line below from where Residence address appears i.e. the Tops of Residence & Office are not same during runtime. It is properly set during design time


    The
    • db is Access 2003.
    • CR9


    CounselMaster holds the counselIDs and other info.
    There is Table called CounselAddress which stores

    counselId
    addressLine1
    addressLine3
    addressLine4
    addressType
    preferred
    cityId

    There is table called CityMaster which reads the cityID from the cityID found in the CounselAddress

    There is yet another Table counselPhones
    which stores
    CounselID
    phone
    phoneType
    preferred

    CounselMaster is linked to counselAddress & counselPhone (INNER JOINS)
    The query2 which retrieves the data from these tables is....
    Code:
    SELECT CityMaster.cityName, IIf(CounselMaster!fName<>'',CounselMaster!fName & IIf(CounselMaster!mName<>'',' ' & CounselMaster!mName,'') & IIf(CounselMaster!lName<>'',' ' & CounselMaster!lName,''),'N.A.') AS counselName, CounselAddress.addressLine1, CounselAddress.addressLine2, CounselAddress.addressLine3, CounselAddress.addressLine4, CounselAddress.addressType, CounselAddress.preferred, CounselAddress.PIN, CounselPhones.phone, CounselPhones.phoneType, CounselPhones.preferred
    FROM CounselPhones INNER JOIN ((CounselMaster INNER JOIN CounselAddress ON CounselMaster.counselID = CounselAddress.counselID) INNER JOIN CityMaster ON CounselAddress.cityID = CityMaster.cityID) ON CounselPhones.counselID = CounselMaster.counselID
    WHERE (((CounselMaster.inPanel)=Yes))
    ORDER BY CityMaster.cityName, IIf(CounselMaster!fName<>'',CounselMaster!fName & IIf(CounselMaster!mName<>'',' ' & CounselMaster!mName,'') & IIf(CounselMaster!lName<>'',' ' & CounselMaster!lName,''),'N.A.');
    In the CR I have added two address fields as below...
    Code:
    //Formula Field - AddressOffice
    if {Query2.addressType}= "OFFICE/WORK" then
        if {Query2.addressLine1}<>"" then 
            {Query2.addressLine1} 
            & if {Query2.addressLine2}<>"" then 
                chr(10)& chr(13) & {Query2.addressLine2} 
                & if {Query2.addressLine3}<>"" then 
                    chr(10)& chr(13) & {Query2.addressLine3} 
                else '' 
        else '' 
        else ''
    else 
    ''
    ;
    Code:
     //Formula Field - AddressOffice
    if {Query2.addressType}= "RESIDENCE" then
        if {Query2.addressLine1}<>"" then 
            {Query2.addressLine1} 
            & if {Query2.addressLine2}<>"" then 
                chr(10)& chr(13) & {Query2.addressLine2} 
                & if {Query2.addressLine3}<>"" then 
                    chr(10)& chr(13) & {Query2.addressLine3} 
                else '' 
            else '' 
        else ''
    else 
    ''
    ;
    Grouping (in Report) is done 1st by cityName and then by counselName(which is Hidden) of Query2.
    Now when the report is printed, for some records the address comes out (i.e not printed) empty though in the query2 the data is populated. eg under the city Name Bathinda chirangi lal garg & Gopal Chand Gupta no info comes in the report (there could be more such records).

    Now for Jai gopal Goyal the office address is printed after residence is printed (i.e) they are not on the same Line). no idea what's happening.

    Iam attaching the db & report.

    Could somebody let me know what is wrong!!!!!!

    Thankz in advance......
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width