1 Reply Latest reply on Feb 6, 2014 10:48 AM by philmodjunk

    Repeating fields or related data for Calculation

    MatthewIaniro

      Title

      Repeating fields or related data for Calculation

      Post

           Im having a hard time deciding which route to go with this.

           I have products that contain various things they are made of, and in my report it needs to be formatted nicely & I can't have large gaps taking up a whole lot of space in my layout.

      example:

      #5005 AwesomePart

      plastic      strong         blue color           2%

      Child friendly

            

           But sometimes its gonna be like even with possible empty fields.

            

      #5005 AwesomePart

      plastic      strong         blue color           2%

      Child friendly

            

      #5006 Amazing Part

      plastic      incredible         black color           3%

      metal      dense        blue  color          7%

      Choking hazard

      rubber     soft        black  color          2%

      Safe enough

            

            

           So ill show a sample of my calculation code (*Note, I left in all the text formatting and tabs because this data needs to appear a certain way.)  I can easily format it the way I want this way. But repeating type 1A, term value 1A, datathing 1A, notation 1A. Im trying to avoid making 1Bs 2As fields. And I'm not sure if I can get repeating fields to work in my calculation / format.

           So im playing with related data portals and calculations and I just don't know which direction to go for this part. Because related data portals are taking up alot of space and auto resize doesn't work, or atleast I can get it to function how I imagin. And making a data field for each thing,  I'll have around 100 fields in my calculation. 

           Does anyone have any advice or direction I should take? I feel I over complicated it.

      calculation example:

           If ( IsEmpty ( part number 1A) ; "" ;
           TextStyleAdd(TextSize( TextFont( TextColor( product number 1A ; RGB( 0 ; 0 ; 0 ) ); "Arial" ) ; 7) ; Underline ) )
            & 
           If ( IsEmpty ( part name 1A) ; "" ;  "  " &
           TextStyleAdd( TextSize( TextFont( TextColor( part name 1A ; RGB( 0 ; 0 ; 0 ) ); "Arial" ) ; 7) ; Underline ) )
           & ¶  & 
           If ( IsEmpty ( type 1A ) ; "" ; Char (9) &
           TextSize( TextFont( TextColor( type 1A ; RGB( 0 ; 0 ; 0 ) ) ; "Arial" ) ; 7) )
           & 
           If ( IsEmpty ( term value 1A ) ; "" ; Char (9) &
           TextSize( TextFont( TextColor( term value 1A ; RGB( 0 ; 0 ; 0 ) ); "Arial" ) ; 7) )
           &
           If ( IsEmpty ( color 1A ) ; "" ; Char (9) &
           TextSize( TextFont( TextColor( color 1A ; RGB( 0 ; 0 ; 0 ) ); "Arial" ) ; 7) ) & TextSize( TextFont( TextColor( " color" ; RGB( 0 ; 0 ; 0 ) ); "Arial" ) ; 7)
           &
           If ( IsEmpty ( percent 1A ) ; "" ; Char (9) &
           TextSize( TextFont( TextColor( percent 1A ; RGB( 0 ; 0 ; 0 ) ); "Arial" ) ; 7) ) & TextSize( TextFont( TextColor( " %" ; RGB( 0 ; 0 ; 0 ) ); "Arial" ) ; 7)
           & ¶  &
           If ( IsEmpty ( note 1A ) ; "" ; Char (9) &
           TextSize( TextFont( TextColor( note 1A ; RGB( 0 ; 0 ; 0 ) ); "Arial" ) ; 7) & ¶ )