Vb Continue Lines in Next Section Crystal Report

  1. #1

    shukla is offline

    Thread Starter

    Fanatic Member


    new line in crystal report

    we use "vbnewline" in our vb to put one line in text.
    how to put it in crystal report through coding ?

    WHETHER YOU SUCCEED OR FAIL IS NOT AS IMPORTANT AS WHETHER YOU TRIED YOUR BEST


  2. #2

    rasinc is offline

    Hyperactive Member


    Re: new line in crystal report

    Try Chr(13) or some use Chr(13) + Chr(10)

  3. #3

    shukla is offline

    Thread Starter

    Fanatic Member


    Re: new line in crystal report

    sorry but it does not work.

    WHETHER YOU SUCCEED OR FAIL IS NOT AS IMPORTANT AS WHETHER YOU TRIED YOUR BEST


  4. #4

    Re: new line in crystal report

    sorry but it does not work.

    Yeah, that is helpful. Maybe if you explained your problem a little better.

    Chr(13) does work but you need to set the Can Grow option of the reporting object. For example

    {Customers.CompanyName} + chr(13) + {Customers.ContactTitle}


  5. #5

    rasinc is offline

    Hyperactive Member


    Re: new line in crystal report

    Should've seen that myself brucevde. I have my defaults to Grow 0 automatically so I forgot about that one.

  6. #6

    shukla is offline

    Thread Starter

    Fanatic Member


    Re: new line in crystal report

    i set property cangrow as true but still not working it gives space instead of new line.

    WHETHER YOU SUCCEED OR FAIL IS NOT AS IMPORTANT AS WHETHER YOU TRIED YOUR BEST


  7. #7

    rasinc is offline

    Hyperactive Member


    Re: new line in crystal report

    Do you want an actual line drawn on the page or do you wish to have more space available to show the text as two lines? I've never tried setting the property cangrow from code but in Crystal, it requires a numeric parameter not boolean since you can specify how many lines it will max out.

  8. #8

    shukla is offline

    Thread Starter

    Fanatic Member


    Re: new line in crystal report

    i dont want to draw line.I want my text as in 2/3 lines it depends upon database structure.
    For example i want to display address of customer i hv stored address in different fields in my db.
    so i want to place it in this way, addr1 + newline + addr2 + addr3 + city + country

    WHETHER YOU SUCCEED OR FAIL IS NOT AS IMPORTANT AS WHETHER YOU TRIED YOUR BEST


  9. #9

    VBFnewcomer is offline

    Frenzied Member


    Re: new line in crystal report

    try using

    Code:

    addr1 & chr(10) & chr(13) &  addr2 & chr(10) & chr(13) & addr3 & chr(10) & chr(13) & city & chr(10) & chr(13) & country

  10. #10

    shukla is offline

    Thread Starter

    Fanatic Member


    Re: new line in crystal report

    WHETHER YOU SUCCEED OR FAIL IS NOT AS IMPORTANT AS WHETHER YOU TRIED YOUR BEST


  11. #11

    VBFnewcomer is offline

    Frenzied Member


    Re: new line in crystal report

    li'll suggestion, try the above methods in a new report (not the existing ones) and post the results. Also use a Formula Field and not the actual Fields.
    Good luck

  12. #12

    Re: new line in crystal report

    Hi,

    I realise that this is a very old thread but I've had a very similar problem and wanted to add my solution since one hasn't been provided yet -

    If you have "Text Interpretation" set to HTML for the object as I did you must use the "<br>" to add carriage returns.

    For Crystal XI -
    On the report; right click the object - Format Field - Paragraph tab - Text Interpretation frame at the bottom
    There is no Text Interpretation for text boxes, drag a function onto your report and size it accordingly.

    Please note that there appears to be a bug if you try to add multiple breaks, the workaround is to add a white space between your breaks -

    Code:

                          ' I'm using basic syntax                      Dim                      sOut                      As                      String                      sOut=sOut & "The quick brown fox<br>" sOut=sOut & " <br>"                      ' The space is important as the break is ignored otherwise!                      sOut=sOut & "jumped over the lazy dog."                      Formula=sOut

godfreysadamess.blogspot.com

Source: https://www.vbforums.com/showthread.php?537911-new-line-in-crystal-report

0 Response to "Vb Continue Lines in Next Section Crystal Report"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel