Results 1 to 3 of 3

Thread: [RESOLVED] get the distinct records in details section

  1. #1

    Thread Starter
    Hyperactive Member shirishdawane's Avatar
    Join Date
    Dec 2004
    Location
    Mumbai,India
    Posts
    363

    Resolved [RESOLVED] get the distinct records in details section

    hELLO,
    I have 3 fields in details section . Each of contains 15 records but i want to print only distinct of those. That means i should get only three fields rather than 45 fields. is that any provision in crystal report to print only distinc fields from details section. I am calling data from View. when i run query (select distinct(metimpno) from view_metalutl)in SQL Server then it gives exact result. So plz help me out.
    On Error GoTo http://www.vbforums.com

    Note :
    1) Please use [vbcode]your code goes in here [/vbcode] tags when posting VB code.
    2) Please mark thread as Resolved using the Thread Tools menu, if you got solution.

  2. #2
    Lively Member
    Join Date
    Dec 2004
    Posts
    121

    Re: get the distinct records in details section

    From my reading of your post, it sounds like you might be confusing fields (or colums) and records (or rows). From your sql statements it looks like your results would be something along the lines of:

    metimpno
    1
    2
    3

  3. #3

    Thread Starter
    Hyperactive Member shirishdawane's Avatar
    Join Date
    Dec 2004
    Location
    Mumbai,India
    Posts
    363

    Re: get the distinct records in details section

    Quote Originally Posted by Malim
    From my reading of your post, it sounds like you might be confusing fields (or colums) and records (or rows). From your sql statements it looks like your results would be something along the lines of:

    metimpno
    1
    2
    3
    I got the solution by creating view it shows only distinct recordS & AND CALL THAT VIEW IN YOUR REPORT.
    Following is he sql query to see distinct records in crystal reports:
    create view view_gldutl
    as select distinct invo_stock.mt_imp_invo,invo_stock.expinvno
    from invo_stock,view_annex
    where invo_stock.expinvno = view_annex.expinvno
    On Error GoTo http://www.vbforums.com

    Note :
    1) Please use [vbcode]your code goes in here [/vbcode] tags when posting VB code.
    2) Please mark thread as Resolved using the Thread Tools menu, if you got solution.

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