Writing Code
 Crystal Reports Forum : Crystal Reports .NET 2003 : Writing Code
Message Icon Topic: how to write a While statement in crystal reports Post Reply Post New Topic
Author Message
tnthunder
Newbie
Newbie


Joined: 18 Nov 2013
Location: Canada
Online Status: Offline
Posts: 1
Quote tnthunder Replybullet Topic: how to write a While statement in crystal reports
    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   


Edited by tnthunder - 18 Nov 2013 at 2:11pm
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4276
Quote lockwelle Replybullet 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
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.