Print Page | Close Window

how to write a While statement in crystal reports

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Writing Code
Forum Discription: .NET 2003 programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=20233
Printed Date: 18 Apr 2024 at 12:55pm


Topic: how to write a While statement in crystal reports
Posted By: tnthunder
Subject: how to write a While statement in crystal reports
Date Posted: 18 Nov 2013 at 2:02pm

how do i write a condition/statement that gets me the results seen in final table below? i have 2 tables, that have similar column, but in the final table i need to display the appropriate Description depending on the code and EDLType/codetype/DLType.

can someone help me please.


Final table:
comp    EDLType    EDLCODE    Eployee#    Desc
102      D                1                1000            Portion
102      D                2                1000            salary
102      D                3                1000            A.Tax
102      D                100            1000            Support
102      E                4                1000            T.time
102      E                1                1000            RTime
102      E                2                 1000            OT
102      L                201             1000            E.Portion
102      L                200             1000           C.Portion
                   
table 1:                   
Comp    ECode    Desc         codetype   
102      1             RTime        E   
102      2             OT             E   
102      3              DT             E   
102      4              T.time       E   
102      5              autopay    E   
                   
table 2:                   
comp    DLCode    Desc            DLType   
102      1               Portion        D   
102      2               salary          D   
102      3               A.Tax           D   
102      4               B.Tax           D   
102      5               C.Tax           L   
102      200           C.Portion      L   
102      201           E.Portion      L   
102      100           Support        D   



Replies:
Posted By: lockwelle
Date Posted: 13 Dec 2013 at 5:02am
looking in CR help:
there is
while condition = true do(
//your code here
)

and
do(
// your code here
)while condition=true

HTH



Print Page | Close Window