Topic: Multiple columns Posted: 01 Apr 2008 at 2:46am
hello, i m new in crystal report.i am finding certain difficulties to print a dynamic columns report with multiple columns where user can choose which column/field in the database table that they wish to see.
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Posted: 07 Apr 2008 at 3:24pm
The only way to do this is to use a SQL Command that uses aliases to rename the fields that get returned from the database. For example:
SELECT EmpName as Field1, EmpEmail as Field2 FROM TblEmployee
When using this code, you can dynamically use different fields from the database, but keep the alias names the same. That way CR will always see the fields 'Field1', 'Field2', etc. coming from the database.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum