Click here to Skip to main content
15,885,719 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
how to add serial nos in crosstab in crystal reports??? plz help need quick answer
Posted
Updated 18-Jan-19 6:53am
v2
Comments
thatraja 7-Feb-14 3:00am    
Not working?

Check this
Serial no In Cross tab[^]
Add Serial number in Crystal Report[^](This one has screenshots for 1st link process)
 
Share this answer
 
Add this code in your SQL select statement:
SQL
DENSE_RANK() OVER (PARTITION BY [COL1],[COL2] ORDER BY [COL3]) as Serial,

This will add a Unique Row Number to each group of Record. Use this "Serial" Column in Crystal Reports as your serial number.

To see an example goto the following link below:

https://javarevisited.blogspot.com/2016/07/difference-between-rownumber-rank-and-denserank-sql-server.html#axzz5cyzl9s8y
 
Share this answer
 
Comments
Richard Deeming 18-Jan-19 13:09pm    
Resurrecting a question from five years ago with a link to your blog? Yeah, that's spam.
Jamshaid Riaz 21-Jan-19 9:41am    
thats is not my blog, I just tried to put a example, searched through google. Focus on the solution I have proposed. That solution is no where to find on Internet, at least to my searching capabilities. I have posted this solution on many questions asked long ago, just to help.
Member 10507871 yesterday    
Best 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