Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Dynamic Column Headings Post Reply Post New Topic
Author Message
rkrowland
Senior Member
Senior Member
Avatar

Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
Quote rkrowland Replybullet Topic: Dynamic Column Headings
     Posted: 12 Jan 2012 at 4:54am
Hi,
 
Does anyone know of a way of using a field as dynamic column headings without the use of a cross-tab?
 
A simple example of what I want to achieve is transaction month as column headings with financial year as row titles for a comparison year on year. I also want the user to be able to drill down into a field and return the records where the transaction date matches the financial year and the transaction month.
 
Basically I want to replicate the functionality of an Excel pivot table.
 
Thanks,
Ryan.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 12 Jan 2012 at 6:30am
well, it's kind of my standard answer, but create a stored proc that will return the data as you desire...but your column would be named something like month1, month2....it can't be dynamic, CR won't like it.  What you can do is included either another column or another table to tell CR what to display for the each column and you can write a formula to display the description of the columns on the report.
 
if you only wanted 1 column on the report, I can see filtering the data for entries where the months match, then group by year, now all that is left is the label, and you can use a formula to show that...if you wanted multiple months then I don't think that this method would work, but the stored proc would
 
HTH
IP IP Logged
Printable version Printable version

Forum Jump
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