Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: page breaks on a memo field Post Reply Post New Topic
Page  of 2 Next >>
Author Message
ewimmer
Newbie
Newbie


Joined: 08 Jun 2009
Location: United States
Online Status: Offline
Posts: 8
Quote ewimmer Replybullet Topic: page breaks on a memo field
     Posted: 08 Jun 2009 at 10:20am
Hi, I need to create a page break based on speicific text in a memo field.  Does anyone have any ideas.  thks
LISA
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Jun 2009 at 11:17am

1. Do you want the break after the memo field completes or are you trying to break the field into 2 parts and then break in the middle?

2. Where is this memo field (head, footer, details,etc.)?
3. Are there any fields below this field on the same section in the report?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Jun 2009 at 11:27am
depending on your answers you can use an instring function as part of a formula in "a new page after" in the section expert...
instr({table.field},"specific text to look for")>0


Edited by DBlank - 08 Jun 2009 at 11:27am
IP IP Logged
ewimmer
Newbie
Newbie


Joined: 08 Jun 2009
Location: United States
Online Status: Offline
Posts: 8
Quote ewimmer Replybullet Posted: 08 Jun 2009 at 11:59am
its on the detail section.  I tried the
instr({table.field},"specific text to look for")>0,
but it looks like it can't find the text.  Any other ideas.
LISA
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Jun 2009 at 12:22pm
Test this out in a formula so you can tweak it to get it to work.
Make a formula as "Test Page Break".
In the formula put:
instr({table.field},"specific text to look for")
Place this on the section you have the memo field displayed.
This formula should return a 0 whenever the "specific text to search for" is not in the memo field (table.field) or the number of characters where that string starts if it is in the field.
to make the search not case sensitive add another part to the end so it will be:
instr({table.field},"specific text to look for",1)
If it was just the case sensitive and you can get it to give you a value > 0 then move that into the expert and just add the >0 onto the end of it (so it only does a page break when it finds the string).
IP IP Logged
ewimmer
Newbie
Newbie


Joined: 08 Jun 2009
Location: United States
Online Status: Offline
Posts: 8
Quote ewimmer Replybullet Posted: 08 Jun 2009 at 12:33pm
thnks, I did the test and it returned 2.
LISA
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Jun 2009 at 12:36pm
So the formula works but you did not get the new page after to work?
 
If so and you need more help can you answer the questions I first asked and then explain what you did to add in the formula for the page break.
Thanks
IP IP Logged
ewimmer
Newbie
Newbie


Joined: 08 Jun 2009
Location: United States
Online Status: Offline
Posts: 8
Quote ewimmer Replybullet Posted: 08 Jun 2009 at 12:42pm
hi,
I tested this and it returned true, which it should. but when I put this in NEW PAGE AFTER or NEW PAGE BEFORE it doesnt recognize it.
 
instr({memofield},"what i'm looking for",1)>0
LISA
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Jun 2009 at 1:03pm

assuming you wan t this on a details section are you doin all of the following?

1. Open Section Expert.
2. Click on the Details section to highlight it.
3. Uncheck the "new page after" check box.
4. Click on the formula box to the right of the New page after (the x-2)
5. Put the formula in here ( instr({memofield},"what i'm looking for",1)>0) and save and close.
6. Verify the X-2 next to the new page after is RED (while the details section is highlighted).
7. Hit OK.
 
If this does not work then something else is going on here. You have validated that the formula works in 2 different ways. As long as the formula was placed in the correct section AND the field resides correctly on that section then is should work.
If you are trying to do something else like a new page after a group footer  only when one of the detals rows of that group has this vaule then this won't work. You would have to sum the instr formula on the group and then add new after if teh SUM >0.
So again if the above does not work I would need to know exaclty what section you are trying to do a new page after and what is on that section to assist more.
Hope this helps.


Edited by DBlank - 08 Jun 2009 at 1:04pm
IP IP Logged
ewimmer
Newbie
Newbie


Joined: 08 Jun 2009
Location: United States
Online Status: Offline
Posts: 8
Quote ewimmer Replybullet Posted: 08 Jun 2009 at 1:13pm
no, it still didnt work.  i went thru all the steps above exactly.  The memo field is in the detail.  I'm trying to do the breaks there. 
LISA
IP IP Logged
Page  of 2 Next >>
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