Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Formula to amke lines dynamic Post Reply Post New Topic
Author Message
gracia
Newbie
Newbie


Joined: 09 May 2007
Location: Philippines
Online Status: Offline
Posts: 17
Quote gracia Replybullet Topic: Formula to amke lines dynamic
    Posted: 09 Jun 2007 at 4:58am
Hi!
 
I have a table that looks like this:
 
# of Tickets          Jan        Feb     Mar
-------------------------------------------------
6                         TN1        TN1     TN1
-------------------------------------------------
7                         TN1
                           TN2
-------------------------------------------------
8                                        TN1     TN1
                                          TN2
                                          TN3
-------------------------------------------------
 
I want to add a formula to the line to make it dynamic
so if I have more than 1 TN's it will automatically adjust.
Any suggestion? Thanks!
                              
Grace Pujalte
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 09 Jun 2007 at 8:19am

Hi,

Are you grouping on Ticket Numbers or are they unique........If you are grouping on Ticket Numbers then Place the line in the Group Footer that should do the trick.............No need for formula
 
Cheers
Rahul
IP IP Logged
ScubaVal
Newbie
Newbie
Avatar

Joined: 09 Mar 2007
Location: United States
Online Status: Offline
Posts: 12
Quote ScubaVal Replybullet Posted: 11 Jun 2007 at 5:56am
Good morning,
I peeked at this topic because I thought it might be what I am looking for:
 
I want to change the text in the item label based on the results (i.e., in the case above, if there is only one ticket the label changes from "# of Tickets" to "Ticket #").  I don't know if that is what Grace meant, but I sure would like some help.  Thanks in advance.
 
Valerie
try it... if it doesn't work, google it
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 11 Jun 2007 at 8:41am
If you have the information in a group, then you can put a Count summary field in the group header and then use the formula button to change the text depending upon the value of the group count value.
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>
IP IP Logged
gracia
Newbie
Newbie


Joined: 09 May 2007
Location: Philippines
Online Status: Offline
Posts: 17
Quote gracia Replybullet Posted: 11 Jun 2007 at 6:21pm
Hi!
 
Yes I am grouping them by ticket numbers and by month, but number of TN's varies per number of tickets and per months depending on the values retrieved by the query.
 
Thanks!
Grace Pujalte
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 11 Jun 2007 at 8:16pm
You have to put the caption in the group header. That way it can change for each group displayed depending upon how many TN's are in that group.
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>
IP IP Logged
kapsii
Newbie
Newbie


Joined: 12 Jun 2007
Location: India
Online Status: Offline
Posts: 2
Quote kapsii Replybullet Posted: 12 Jun 2007 at 10:14pm

If you want the lines to appear after 1st record then 2nd record then after 3rd record and so on.... then follow these steps...

1. Create another detail section below your section. In that section put a line.
2. Create a formula and place it in the Report Header or Group header (Choice depends on your requirement) I think report header would do good. In that formula write:
//This will initialize the counter
shared numbervar iCount;
iCount := 0; 
3. In the section expert go to the suppress condition for the detail section that you created, there write this formula:
//This formula will suppress the section
whileprintingrecords;
shared numbervar iCount;
iCount := iCount + 1;
If RecordNumber Mod iCount = 0 Then
     False
Else
     True;
Cheers
IP IP Logged
kapsii
Newbie
Newbie


Joined: 12 Jun 2007
Location: India
Online Status: Offline
Posts: 2
Quote kapsii Replybullet Posted: 12 Jun 2007 at 10:21pm
Or what you can do is instead of making another section, just put a BIG text box around all your objects, right click it and move it to the back and then put the last formula (The one in third point) in the BOTTOM border conditional formula. Look at output of both and go for the one that suits you.
 
Still i would think going for a section would be best... as when you would format other objects.. the text box might come in the way!!!
 
Hope i understood your problem correctly and was able to help...
Cheers
IP IP Logged
gracia
Newbie
Newbie


Joined: 09 May 2007
Location: Philippines
Online Status: Offline
Posts: 17
Quote gracia Replybullet Posted: 15 Jun 2007 at 12:54am
Hi!
 
Thanks , the report looks quite good now having lines, just one more question,Do I need formula to make the lines move if there are more than 2-3 TNs added at the record? for example I will run the report for this month and I have 3 TNS compared to last month which has 2 TNS.
 
Number of Tickets        May          June
            6                      TN1            TN1
                                    TN2            TN2
                                                      TN3
--------------------------------------------------------------
                                    
Grace Pujalte
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.