Talk with the Author
 Crystal Reports Forum : General Information : Talk with the Author
Message Icon Topic: formula err Post Reply Post New Topic
Author Message
remo
Newbie
Newbie
Avatar

Joined: 18 Oct 2007
Location: Singapore
Online Status: Offline
Posts: 12
Quote remo Replybullet Topic: formula err
    Posted: 11 Apr 2008 at 9:59pm
I hav a prob like this

Itemcasc and Itemcascaddition a are 2 sub reports

Itemcasc formula contains like this,

DIM str AS STRING

IF {ItemCASCProduct.CASCProductCode} <> "" THEN
    str = str + "CASC Product Code         : " + {ItemCASCProduct.CASCProductCode} + CHR(13)
END IF

Itemcascaddition formula contains like this,

DIM str AS STRING
IF {ItemCASCAddition.CASCCodeOne} <> "" THEN
    str = str + "CASC Code One             : " + {ItemCASCAddition.CASCCodeOne} + CHR (13)
END IF
IF {ItemCASCAddition.CASCCodeTwo} <> "" THEN
    str = str + "CASC Code Two             : " + {ItemCASCAddition.CASCCodeTwo} + CHR (13)
END IF
IF {ItemCASCAddition.CASCCodeThree} <> "" THEN
    str = str + "CASC Code Three           : " + {ItemCASCAddition.CASCCodeThree} + CHR (13)
END IF
FORMULA = str

i ll show my xml data.

cbc:ItemCASCProduct>
  <cbc:CASCProductCode>VBA0BC</cbc:CASCProductCode>
  <cbc:ItemNumber>01</cbc:ItemNumber>
  <cbc:SequenceNumber>01</cbc:SequenceNumber>
  </cbc:ItemCASCProduct>
- <cbc:ItemCASCAddition>
  <cbc:CASCCodeOne>CODE1A</cbc:CASCCodeOne>
  <cbc:CASCCodeTwo>CODE1A</cbc:CASCCodeTwo>
  <cbc:CASCCodeThree>CODE1A</cbc:CASCCodeThree>
   <cbc:ItemNumber>01</cbc:ItemNumber>
  <cbc:SequenceNumber>01</cbc:SequenceNumber>
  <cbc:AdditionalSequenceNumber>01</cbc:AdditionalSequenceNumber>
  </cbc:ItemCASCAddition>
- <cbc:ItemCASCAddition>
  <cbc:CASCCodeOne>CODE1B</cbc:CASCCodeOne>
  <cbc:CASCCodeTwo>CODE1B</cbc:CASCCodeTwo>
  <cbc:CASCCodeThree>CODE1B</cbc:CASCCodeThree>
  <cbc:ItemNumber>01</cbc:ItemNumber>
  <cbc:SequenceNumber>01</cbc:SequenceNumber>
  <cbc:AdditionalSequenceNumber>02</cbc:AdditionalSequenceNumber>
  </cbc:ItemCASCAddition>
- <cbc:ItemCASCProduct>
  <cbc:CASCProductCode>VBAVBA</cbc:CASCProductCode>
  <cbc:ItemNumber>01</cbc:ItemNumber>
  <cbc:SequenceNumber>02</cbc:SequenceNumber>
  </cbc:ItemCASCProduct>
- <cbc:ItemCASCAddition>
  <cbc:CASCCodeOne>CODE1BA</cbc:CASCCodeOne>
  <cbc:CASCCodeTwo>CODE1BA</cbc:CASCCodeTwo>
  <cbc:CASCCodeThree>CODE1BA</cbc:CASCCodeThree>
  <cbc:ItemNumber>01</cbc:ItemNumber>
  <cbc:SequenceNumber>02</cbc:SequenceNumber>
  <cbc:AdditionalSequenceNumber>01</cbc:AdditionalSequenceNumber>
  </cbc:ItemCASCAddition>
- <cbc:ItemCASCAddition>
  <cbc:CASCCodeOne>CODE1BB</cbc:CASCCodeOne>
  <cbc:CASCCodeTwo>CODE1BB</cbc:CASCCodeTwo>
  <cbc:CASCCodeThree>CODE1BB</cbc:CASCCodeThree>
  <cbc:ItemNumber>01</cbc:ItemNumber>
  <cbc:SequenceNumber>02</cbc:SequenceNumber>
  <cbc:AdditionalSequenceNumber>02</cbc:AdditionalSequenceNumber>
  </cbc:ItemCASCAddition>

i write inside section report inside Itemcascaddition suppress(no drill) x-2 like this  

{ItemCASCAddition.SequenceNumber}=previous ({ItemCASCAddition.SequenceNumber})

but my output shows like this

CASC Product Code:VBAOBC

CASC Code One    :CODE1A
CASC Code two    :CODE1A
CASC Code three    :CODE1A

CASC Code One    :CODE1BA
CASC Code two    :CODE1BA
CASC Code three    :CODE1BA

CASC Product Code:VBAVBA

CASC Code One    :CODE1A
CASC Code two    :CODE1A
CASC Code three    :CODE1A

CASC Code One    :code1BA
CASC Code two    :code1BA
CASC Code three    :code1BA
 
BUT IT SHOLULD SHOW LIKE THIS

CASC Product Code:VBAOBC

CASC Code One    :CODE1A
CASC Code two    :CODE1A
CASC Code three    :CODE1A

CASC Code One    :CODE1B
CASC Code two    :CODE1B
CASC Code three    :CODE1B

CASC Product Code:VBAVBA

CASC Code One    :CODE1BA
CASC Code two    :CODE1BA
CASC Code three    :CODE1BA

CASC Code One    :CODE1BB
CASC Code two    :CODE1BB
CASC Code three    :CODE1BB

I KNOW ITZ COZ OF {ItemCASCAddition.SequenceNumber}=previous ({ItemCASCAddition.SequenceNumber}) FORMULA PROB INSIDE Itemcascaddition  X-2
Cn u help me 2 rewrite err free formula?

thanx in advance

remo

 
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.030 seconds.