on 01-22-2009 4:56 PM
Hi,
Your help is very much appreciated.
I have a report with 3 colmns as follows,
User id Description LVL
Test1 Menu1 2
Test1 Menu2 4
Test1 Menu3 5
Test2 Menu1 3
Test2 Menu2 2 .......
I want the above data ib the following format,
User id | Menu1 | Menu2| Menu3
Test1 | 2 | 4 | 5
Test2 | 3 | 2|
How can this be achieved in crystal report?
Please let me know the solution if you can find one.
Thanks
Try inserting a group on the field Test1 and create a formula like this
whileprintingrecords;
stringvar Menu:="";
Place this in group header and create another formula like
whileprintingrecords;
stringvar Menu;
Menu:=Menu{menu field}" | ";
Place this in detail section and create another formula like
whileprintingrecords;
stringvar Menu;
Place this formula in group footer and also place the UserId in group footer
Repeat the same steps for getting the numbers as well. You can suppress the detail section and group header.
Regards,
Raghavendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am getting error message when I use "whileprintingrecords;" statement "Result of selection formula must be boolean".
I have data in db2 database, which I have used in Crystal Report and generated report as,
USERId, DESCRIPTION, LVL
Test1 Menu1 2
Test1 Menu2 4
Test1 Menu3 5
Test2 Menu1 3
Test2 Menu2 2 .......
(USERID, DESCRIPTION, LVL) are the field names in table.
Following are data inserted into table in respective column,
Test1, Menu1, 2
Test1, Menu2, 4
Test1, Menu3, 5
Test2, Menu1, 3
Test2, Menu2, 2 .......
I am able to pull same data in the report in the following format,
User id Description LVL
Test1 Menu1 2
Test1 Menu2 4
Test1 Menu3 5
Test2 Menu1 3
Test2 Menu2 2 .......
But the report has to be generated in the following format,
User id Menu1 Menu2 Menu3
Test1 2 4 5
Test2 3 2
Here, USERID column is retained as it is with only one TEST1, TEST2 values(multiple values of TEST1, TEST2 are removed). DESCRIPTION & LVL Column titles are no more there. The contents of DESCRIPTION & LVL are changed from Column to Row data. It is turned from Vertical to horizontal.
I hope it might be clear to understand. My bad I did not explain correctly.
Thanks
Hi Raghvendra,
I am new to CR. Could you please elaborate more. When I try to add the formula,
whileprintingrecords;
stringvar Menu:="";
in formula editor in "Group Selection" I am getting error" Result must be boolean for teh formula"
If we can give me the steps it will be great. I have pulled the information in Crystal Reports. If you can tell me how to achieve this from here it will be helpful.
If I insert Formula in "Group Sort Order Formula" under "Current Formula" I am getting " Formula cannot be evaluated at time specified".
If I insert Formula in "Select Expert- Group" I am getting "Result must be boolean for the formula".
I am doing it right way?
Thanks
Hi Raghvendra,
I did not get what the formaula logic is,
whileprintingrecords;
stringvar Menu;
Menu:=Menu{menu field}" | ";
If I have follwing data how I should chage teh formula, ( To distinguish I am entering Field names and data in braces{ })
{One Menu} {Fund Menu}
{One Menu} {Fund Menu} ......
Thanks
kiran are you using crosstab?
what are you using and what version of CR?
Regards
Jehanzeb
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.