VB Crystal Report >> inserting bullet at start of newline

by copulus » Tue, 11 Nov 2003 04:26:09 GMT

In Crystal Reports 8 I'm trying to preface each line in a text field with a
bullet. The text field has many lines separated with (I presume 'carriage
returns').

I need the start of each new line to have a bullet (or bullet like
character).

Can anyone help?



VB Crystal Report >> inserting bullet at start of newline

by Ken Briscoe » Tue, 11 Nov 2003 04:49:52 GMT


> I need the start of each new line to have a bullet (or bullet like

Create a text box, and change the font to Windings or Webdings, and find a
bullet, point, or arrow that suits you. You can conditionally supress/format
the text box as you see fit then. HTH.


KB - MCNGP #26

first initial last name AT hotmail DOT com

VB Crystal Report >> inserting bullet at start of newline

by copulus » Tue, 11 Nov 2003 07:03:36 GMT

The memo field being being referenced is from SQL Server. Each memo field
has multiple lines of text. I need to add a bullets to the lines when the
report is being run in Crystal.

ex.

-----------------------------------
This is the first line of text of record one.

This is the second line of text of record one.
-----------------------------------
This is the first line of text of record two.

This is the second line of text of record two.
-----------------------------------

I need to change it to ...

-----------------------------------
? This is the first line of text of record one.


? This is the second line of text of record one.
-----------------------------------
? This is the first line of text of record two.

? This is the second line of text of record two.
-----------------------------------


supress/format

VB Crystal Report >> inserting bullet at start of newline

by Ken Briscoe » Tue, 11 Nov 2003 10:33:01 GMT

> -----------------------------------

Hmmm....is there any rhyme or reason as to how the two lines are broken up?
(ie, the first line can only contain say, 50 characters)? If so, you can
break up the memo field in a formula using the Split function. If not, but
each memo field always contains two and only two lines, you can still create
a text box with Webdings or Wingdings font, just put a carriage return
between bullets.
If, however, the memo field can contain a varying number of lines, then
you'll need to create a formula that ouputs the bullet. Then create a
formula that can parse the memo field's contents (I can't think of a
function off the top of my head, but there's got to be one), and insert the
"bullet formula" right before each line. I hope that made sense.
I'm hoping that each memo field always contains two lines, then it will be
fairly easy to create the bullets. Post back if I was unclear or you need
more help.



KB - MCNGP #26

first initial last name AT hotmail DOT com



---
Virus? In the computer? Are you serious?
Checked by AVG anti-virus system ( http://www.grisoft.com ).
Version: 6.0.536 / Virus Database: 331 - Release Date: 11/3/2003

VB Crystal Report >> inserting bullet at start of newline

by copulus » Tue, 11 Nov 2003 16:18:15 GMT

Yes the text field will have a varying number of lines.

If I were to use the SPLIT function, how would I recognize where a new line
started.




up?
create
the

VB Crystal Report >> inserting bullet at start of newline

by Ken Briscoe » Tue, 11 Nov 2003 21:18:46 GMT

> Yes the text field will have a varying number of lines.
line

I'm not positive that CR will recognize this, but you can try this:

//@SplitFormula
Split((CStr({YourMemoField})), Chr(10))

This should return an array. One element will be the first line, the other
element will be the second line.

You'll then need to split the @SplitFormula up into two separate fields.

//@ArraySplitFormula1
Choose(1,{@SplitFormula})

//@ArraySplitFormula2
Choose(2,{@SplitFormula})

Now your memo field should be broken up into two separate fields - one
containing the first line and one containing the second line. Repeat
@ArraySplitFormula as needed to account for 3,4,5,etc lines in a memo field.

Now you can do as I mentioned in a previous post on making the bullets. I
can't believe that it's this hard to make bullets - I hope I'm not leading
you the long way around - I've never had to do this myself. Hope it works.



KB - MCNGP #26

first initial last name AT hotmail DOT com




---
Virus? In the computer? Are you serious?
Checked by AVG anti-virus system ( http://www.grisoft.com ).
Version: 6.0.536 / Virus Database: 331 - Release Date: 11/3/2003

Similar Threads

1. Inserting NewLine (line break) into resource string

Hello,

I'm having problem inserting line break into one of the strings located in 
project resource.

I've tried "Line1/nLine2" (from C#) and it wouldn't work. Tried Line1 + 
Environment.NewLine + Line2 also no luck.

Is there any workaround even if it involves editing resources.xml file 
directly.

Thanks,

Pen D. 


2. Inserting a newline into a message in Visual Basic.Net - Visual Basic

3. how to insert a newline char into a string

Hi,

I have a string variable;-

dim myString as String

and need to add some newline characters to it, how is a newline char entered
in VB?  (I am using VB 6)

thanks in advance
lee


4. giving user list of items then insert selected item as bullet points - Word VBA

5. Insert Bullet and Text

Hi,  

Below is userform code im working on and I believe im close .. but just 
can't seem to get it to work.  I know my code isint proffesional at all, but 
I hope you get the idea of what I was doing.

Code Objective: Open a document which contains a table , search col1 for the 
word that matches a textbox in the userform (which becomes the target row) 
then depending on what the user selects in the dropdown deteminds the target 
Col to add a bullet to the list.

*Note opening the doc and every thing works just not the inserting a bullet

Thank you to anyone that helps.

Happy Holidays!

Ben Z.

CODE:

Private Sub CommandButton1_Click()

'Works with custom toolbar
Dim sendbar As CommandBar
Dim sendbox As CommandBarControl
Set sendbar = Application.CommandBars("Todays-Task")
Set sendbox = sendbar.Controls(2)
Set sendtopic = sendbar.Controls(1)

Dim Word As New Word.Application
Dim WordDoc As New Word.Document
Word.Visible = True 'Only true during testing'
Dim strPath As String

'Open word doc'
C = ActiveDocument.CustomDocumentProperties("Task").Value
strPath = "C:\MyDocuments\" & T & "\Planning\2007\Todos.doc"
Set WordDoc = Word.Documents.Open(strPath)
With WordDoc

System.Cursor = wdCursorWait
Dim oTbl As Table
Dim oCll As Cell

'<><><><><>Search Col(1) For Keyword<><><><><><><>'

Set oTbl = WordDoc.Tables(1)
With oTbl
  For Each oCll In .Columns(1).Cells
    If oCll.Range.Text = sendtopic.Text Then
      p = oCll.RowIndex
   End If
   Exit For
  Next
End With

'<><><><> Based on userform info<><><>'
If ComboBox2.Text = "Pay" Then

Set oTbl = WordDoc.Tables(1)
Set Selec = oTbl.Cell(p, 4)
With Selec
     .EndOf Unit:=wdCell
     .TypeText Text:=sendbox.Text
End With

WordDoc.SAVE

WordDoc.Application.Quit

System.Cursor = wdCursorNormal

MsgBox "Task Updated"

End Sub

6. Insert Bullet - Word VBA

7. Problem - can't insert menu on word start

Hi,
I have following problem: I have a small piece of VBA code, that should
insert a custom menu with one option. It works perfect, if I start DOC
document with double-click. However, when I convert it to DOT, it doesn't
work, neither when I put the file in the user Templates folder, nor in the
StartUp folder of the Office, nor even, if DOT is opened with double-click.
Adding the DOT as Add-In (Tools - Templates and Add-ins) doesn't help.
I have tried both methods I know: with Document_Open / Document_Close in
ThisDocument, as well as AutoOpen / AutoExit in a VBA-module.
I very appreciate any help,
Adam

8. Insert Generic text starting from a bookmark - MS Word&VBA