CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Mar 2011
    Location
    Greece
    Posts
    26

    Create Groups from database-Crystal Report

    Goodmorning
    I want little help in a crystal report i try to create.

    I wrote the above query
    {Emp016.DatePar} >= {?@CXD@_From Date} AND
    {Emp016.DatePar} <= {?@CXD@_To Date} AND

    {Emp016.PelProm}="1" AND
    {Emp016.KwdPar} IN [1,3,5,6,9]

    This query select receipts from a database with code 1,3,5,6,9. Now i want to make groups for each code and print a header for every code. For example

    1.Receipts->> Customers Sells
    -----------------------------------------------------
    1......
    2.....
    3.....
    4.....

    3.Receipts->Suppliers Sells
    ----------------------------------
    1.....
    2.....
    3....
    4.....

    Something like that. I already collect the data 1....,2..... but i cant create the groups with their headers. Can someone help;;; Do i have to change my query or i can make something other.

  2. #2
    Join Date
    Jul 2005
    Posts
    1,083

    Re: Create Groups from database-Crystal Report

    You could create those groups in the report itself
    In CR ide: menu / insert / group
    select {Emp016.KwdPar} field
    in group header section insert a formula field
    Code:
    If {Emp016.KwdPar} = 1 Then "Customer Sells" Else
    If {Emp016.KwdPar} = 3 Then "Suppliers Sells" Else
    If {Emp016.KwdPar} = 5 Then "aaaa aa Sells" Else
    If {Emp016.KwdPar} = 6 Then "bbbb bb Sells" Else
    If {Emp016.KwdPar} = 9 Then "cccc cc Sells" Else
    {Emp016.KwdPar}
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

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

Featured