Solved

Fake sub paragraph indentation in Crystal Reports Xl

Posted on 2009-04-06
8
845 Views
Last Modified: 2012-05-06
In Crystal reports, I have applied a formula to indent text if the display level exceeds 1.  If  the text exceeds the allocate space on the report it wraps around which is what I want it do.  However I want  the text that wrapped to the next line to align with the text above it.  See the attached example.
Indentation.doc
0
Comment
Question by:cookiejar
  • 3
  • 3
  • 2
8 Comments
 
LVL 34

Expert Comment

by:James0628
ID: 24083497
I don't have CR XI, but I'm thinking that someone once mentioned here that one of the later CR versions (CR XI or maybe CR 2008) included some kind of indenting options in the field format.  You might start by looking for that.  I'm sorry, but I can't remember the details.

 Otherwise, one option is to manually break the field into separate lines, so that you can add spaces where you want to.

 But if you actually just want to indent the whole field based on another field, you may be able to just put a second copy of that field on the report, but moved a bit to the right, and suppress that field unless your "indent" condition is true.

 In the simplest case, let's say that that was the only field in your detail section.  You'd create a new detail section and put that field in it, but slightly to the right.  Then go into the section expert for the original detail section (right-click to the left of the detail section and select "Section Expert"), click the formula (X+2) button to the right of "suppress" and enter the following:

{DISPLAY_LEVEL} > 1


 Then go to the section expert for the new section and enter the following suppression formula:

{DISPLAY_LEVEL} <= 1

 You're specifying when the sections will be suppressed (not show), so the original section will show when the level is <= 1, and the second section will show when the level is > 1.

 How well that will work for you will depend on your report.

 James
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 24083799
There is an indenting option on the field format for CR XI but no way to control it through a formula.

You could possibly use the SIZE AND POSITION which has a formula for the X location but I think that will just move the field right and not shrink the width.

How many indents are you looking at?

mlmcc
0
 

Author Comment

by:cookiejar
ID: 24088588
mlmcc:

I can have as many as  20 indentations.   If the Display_Level is > 1, the field should be indented at each incremental level.
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

Author Comment

by:cookiejar
ID: 24088911
I used the following formula for the X location to position the column but it doesn't move
If display_level  > 1 then
  .250 * {BE.Display_Level}
else
  .250

What am I doing wrong?
0
 

Author Comment

by:cookiejar
ID: 24093647
The solution that GRIPA1 posted was the solution to my problem.  Thank you, GRIPA1 .
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 24093960
Where is that comment?

mlmcc
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 24093978
0
 
LVL 34

Expert Comment

by:James0628
ID: 24094623
I'm pretty sure that's the "indentation option" I was thinking of.  Glad it worked for you too.  The duplication thing wouldn't have been much fun with 20 different levels.  :-)

 James
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question