Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Dynamically move columns left/right. Crystal 2008 Post Reply Post New Topic
Author Message
burgervr
Newbie
Newbie


Joined: 03 Mar 2011
Online Status: Offline
Posts: 2
Quote burgervr Replybullet Topic: Dynamically move columns left/right. Crystal 2008
    Posted: 03 Mar 2011 at 5:46pm

Hi

 
I hope the answer could be as simple as the question. I do NOT want to use a cross-tab report

 

Assume I have a few columns in Crystal

 

Jan       Feb      Mrt       Apr       May      Jun       Jul        Aug      etc        Total

 

The user select a date range based on start and end date

Let’s assume the data selected 15/02/2011 to 15/08/2011 and for whatever reason there were no transactions in June

 

What I would like to see in Crystal is

 

Feb      Mrt       Apr       May      Jul        Aug      Total

 

Can a column that has no data returnd be susspended and the column to the right automatically be moved to the left.

If not, can the formula button on the X and Width parameter when doing Object Size and Position be used in anyway to achieve the same and if so how?

(Nevermind what I put in the formula nothing seems to change anyway)

 

If none of the above can be achieved, I am open for any other suggestions that might give me the required data return as long as no heavy coding is involved as I am not a programmer

 

Regards

Burger



Edited by burgervr - 03 Mar 2011 at 5:48pm
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 07 Mar 2011 at 9:52am
when I tried to move objects, nothing seemed to happen...
Here's the trick...All of the movements are:
a) in twips (1440 to the inch)
b) from the original location of the control.
 
So to move the control 1 inch to the right the formula is 1 * 1440, I don't remember if you increment by accessing a property, or just return a number.  The formula will not move to an absolute position, only a relative position.
 
HTH
 
It's been a while since I did this
IP IP Logged
burgervr
Newbie
Newbie


Joined: 03 Mar 2011
Online Status: Offline
Posts: 2
Quote burgervr Replybullet Posted: 07 Mar 2011 at 1:42pm

Hi Lockwell

 

This works great. If I can now take it one step further.

Is there a way to pick up the X (Left start) and Width from a column

 

Where I am going with this is to say: (Explained in English not coded)

 

Start value for column 1 = 1 inch for X and Width = .5 Inch

NOW my formula for column 2

If my Col1 field have no value Then my X for Column 2 must be X of Column 1 x 1440 and width must be Width of Column 1 * 1440

 

For Column 3 I do a check for blank column 2 or not

Then for column 3 my X would be my (X of column 1 + width of column 2 + width of column 3) * 1440

 

Hopes this gives an idea what I want to achieved

 

To do this thou as mentioned I need to know how to pick up the X and width of a specific column

 

Can you help or have any idees on this

 

Regards

Burger 

IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 08 Mar 2011 at 3:03am
I think that I once wrote a report that was entirely dynamic in the layout.  I remember that all the columns started at the same point, and then were either suppressed or moved, but that may be another story...
 
As for displaying the columns in certain locations (so you can skip a column) I would think that a global/shared variable could keep track of where 'next' column is to be printed.
 
HTH
 
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.