Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

alignment

Status
Not open for further replies.

vishalsethia

Programmer
Nov 1, 2005
9
US
Hi,

I have a table which has responses to a particular survey. I need to display the results of the survey using CR. One of options of the survey is "Others, please explain".

What my boss needs is "Others please explain for the first time" and then two tab spaces and then in consecutive lines all the answers for Others please explain aligned with two tab spaces.

I'am able to get that properly, but when the asnwer to a question is long, it word wraps and starts from the 1st col, rather than the alignment specified.

Any tips ??

--Vis

 
Not exactly sure what the issue is, technical infoirmation is always more useful than descriptions of the requirements.

Crystal version
Database/connectivity
Example data
Expected output.

Saying things like "in consecutive lines all the answers for Others please explain aligned with two tab spaces." doesn't state whether you mean there are numerous fields, or simply extended text in one field.

A single field would use the Can Grow option to accomplish this, so I'll make assumptions here.

Group by whatever field you want the "Others Please Explain" column concatenated for, and use the 3 formula mthod to concatenate the data:

Group Header
whileprintingrecords;
Stringvar array TheComments;
redim TheComments[1];
Numbervar x:=1;

Details
whileprintingrecords;
Numbervar x;
Stringvar array TheComments;
redim TheComments[x];
TheComments[x]:={table.field;
x:=x+1;

Group Footer
whileprintingrecords;
Stringvar array TheComments;
Join(TheComments,chr(13)

This will display all values separated by a carriage return.

-k
 
Hi Synapsevampire,

Sorry for not being clear in my previous post.
I'am using VB.NET with CR and Oracle as the backend.

The coloumns in the table are
question1, question2 ..... question10.

Now, say for eg. the responses for Question 1 were

Yes
No
Other's Please Explain => this was a test
Other's Please Explain => test2
Other's Please Explain => test3
No

Now my report has to show
Yes 1
No 2
Others Please Explain
This was a test 1
test2 1
test3 1

I'am able to achieve this , but in case ,if any answer is long, then the output becomes like this (the tabbed space is not aligned when it comes to a new line)

Yes 1
No 2
Others Please Explain
This was a test this was a test
this was atest 1
test2 1
test3 1

I hope I'm making sense

Also, is there a way in which I can group each of the questions one by one during run time. (ie) group by question1 display the count, and then in next page group by question2 display the count, and so on until question10.
--Vis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top