Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

how to vertically align data in CR XI R2?

Hello!

I am using Crystal Reports XI R2.

I want to create 3 vertical columns of data (organized by field type), horizontally laid out across the page, like you'd see in an Excel spreadsheet. E.,g (please ignore the dots which I had to add to visually align the columns to illustrate my point):

Column A Column B Column C

dataA1 ... dataB1.... dataC1

dataA2 ... dataB2.... dataC2

................ dataB3.... dataC3

................ dataB4

................ dataB5

To position the column labels horizontally, I created 3 text objects and dragged them to the desired location, and I edited the text. To position the data for each column,

I created a Size & Position formula to conditionally place the X position of each field aligned under its corresponding column heading. The formula correctly displays the data aligned at the specified X location. However, the Y position of the data is not correct; I would like the first row of data to occur at the same Y position in each

column. Instead, the Y positions are based relative to the last column's Y position. I.,e Each column's data begins at a different Y position. Here is how it appears (without the dots which I had to add to create the preview to align the data to illustrate my point):

column A column B Column C

.................................. dataC1

.................................. dataC2

................................... dataC3

dataA1

dataA2

...................dataB1 <== 'dataB1' should be at the same y pos as 'dataC1'

...................dataB2

...................dataB3

...................dataB4

...................dataB5

How do I force the Y position for the data fields? Each data field is a short string (less than 30 characters) without carriage returns. It is simply an issue of formatting fields to begin at a specified Y position.

Here's what I've tried w/o success:

1. Tried using Format with Multiple columns... Across then down. Displays the data across -- but again, I want it down in columns like you'd see in an Excel spreadsheet.

2. I tried using Can Grow but that is not the solution since (a) it didn't display the output as I want it and (b) the data length is not growing at runtime; all the data fields are less than 30 characters in length and my field object is large enough to accomodate without needing to grow vertically.

3. tried using Grouping with "format Groups with Multiple columns" but despite various attempts, that functionality does not display correctly aligned groups & data whereas at least the approach I am trying with object positioning as described above is much closer to the desired outcome).

How do I force the Y position for the data fields?

Many thanks!

Jeanne

Former Member
Former Member replied

Take a look at CrossTabs reports and see if that will do what you want.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question