locked
Subscript & SuperScript in Crystal Report RRS feed

  • Question

  • User-1160646140 posted
    hi , I m developing application which contain information about chemical compound. all formula of chemical compound contains superscript & subscript. I store value in database using sub & sup Tag .but crystal report does not support these tag how can we change formula to subscript & superscript form in crystal Report as following NH4Al(SO4)2.12H2O Any help will be appreciated Thanks in advance
    Wednesday, July 9, 2008 2:53 AM

All replies

  • User-210605826 posted

    first i have script in crystal report for substring but only number

    Local StringVar inString := {Tableofyour.your_field};
    Local StringVar outString := "";
    Local NumberVar i;
    For i := 1 To Length(inString) Do
    (
       Local StringVar inC := inString [i];
       Local StringVar outC;
       
       If NumericText(inC) Then
       (
          SELECT inC

          CASE "0":
            outC := ChrW (8304)
          CASE "1":
            outC := ChrW (185)
          CASE "2":
            outC := Chrw (178)
          CASE "3":
            outC := Chrw (179)
          CASE "4":
            outC := ChrW (8308)
          CASE "5":
            outC := ChrW (8309)
          CASE "6":
            outC := ChrW (8310)
          CASE "7":
            outC := ChrW (8311)
          CASE "8" :
            outC := ChrW (8312)
          CASE "9" :
            outC :=  ChrW (8313)
         )
       Else
          outC := inC;
       outString := outString + outC
    );
    outString

    but for example C10H10 cant display 0 in crystal report

    first i have script in crystal report for superstring but only number

    Local StringVar inString := {Tableofyour.your_field};
    Local StringVar outString := "";
    Local NumberVar i;
    For i := 1 To Length(inString) Do
    (
       Local StringVar inC := inString [i];
       Local StringVar outC;
       
       If NumericText(inC) Then
       (
          SELECT inC
          CASE "0":
            outC := ChrW(8320)
          CASE "1":
            outC := ChrW (8321)
          CASE "2":
            outC := Chrw (8322)
          CASE "3":
            outC := Chrw (8323)
          CASE "4":
            outC := ChrW (8324)
          CASE "5":
            outC := ChrW (8325)
          CASE "6":
            outC := ChrW (8326)
          CASE "7":
            outC := ChrW (8327)
          CASE "8" :
            outC := ChrW (8328)
          CASE "9" :
            outC :=  ChrW (8329)
       )
       Else
          outC := inC;
       outString := outString + outC
    );
    outString

    but when display in crystalreport distance of number char in them very large

    Sunday, November 20, 2011 9:21 PM
  • User1196771204 posted

    hi praja,

    have you resolved the issue? The previous response was excellent and it should work directly

    Please keep me posted! Thanks! 

    Wednesday, November 23, 2011 9:05 PM