Click here to Skip to main content
15,909,325 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I have crystal report in that i want to display ID field from table .
But i want it to display field on same page in horizontal way.
like this on report details section

---------------------------------------
|
|
| ID : 1 ID :2 ID : 3
|
| ID : 4 ID : 5 ID : 6
| and go on...
---------------------------------------

Please guide me in this how to do it.....

What I have tried:

I tried it but it prints in vertical manner like

------------------------
| ID : 1
| ID : 2
| ID : 3
| ID : 4
Posted
Updated 10-Apr-16 19:20pm

1 solution

Crystal Reports is a banded reporting solution which means it repeats sections based on the data provided to it - typically the Details section repeats for each data-row provided to the report.
Therefore you have 2 options, either edit your data to concatenate in the manner described or use formulas in Crystal to populate a Global variable.
Assuming your data is as above you could create a Global Text Variable in the Page Header section and initialise as an empty string.
Then populate the same variable in each Details section using something like
C#
Global StringVar myTextVariable = myTextVariable + " " +  ReportData.Field;

Then you would create a third formula in the page footer to display the Global Text Variable.
You would be better off grouping (& probably are) the data, therefore you would move the Global Text Variable to the Group Header and the display to the Group Footer.

The Crystal Reports Help has information on creating an using Global Variables
I did try locating a better link for you but there is a lot out there.

Kind Regards
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900