Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Creating Arrays Post Reply Post New Topic
Author Message
hjestrada
Newbie
Newbie


Joined: 15 Jul 2013
Location: United States
Online Status: Offline
Posts: 5
Quote hjestrada Replybullet Topic: Creating Arrays
     Posted: 15 Jul 2013 at 10:06am
Hello,
I have two tables, table_1 has several number options such Num1, Num2,...and Num10 and table_2 has texts such text1, text2 text3....and text10. If from the table_1 a Num2 is selected I would like from table_2 a text2 to be printed.

I am trying to do an Array but I cannot seem to be able to do so, any help please?

Thanks
Harold Estrada
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 Jul 2013 at 10:09am
did you join the tables?
IP IP Logged
hjestrada
Newbie
Newbie


Joined: 15 Jul 2013
Location: United States
Online Status: Offline
Posts: 5
Quote hjestrada Replybullet Posted: 15 Jul 2013 at 10:12am
Yes I did, however, the tables are only joined by an index key of each table.
Harold Estrada
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 Jul 2013 at 10:14am
please explain
IP IP Logged
hjestrada
Newbie
Newbie


Joined: 15 Jul 2013
Location: United States
Online Status: Offline
Posts: 5
Quote hjestrada Replybullet Posted: 15 Jul 2013 at 10:26am
The index key is what makes the two tables to be join in this case my two tables have an index field named "caseID" and all other fields are totally different from each other. So that is the reason why I am trying to make an array to equalize one of the fields of table_1 to the field of table _2 regardless of what each field has on it's own table.

Thanks,
Harold Estrada
IP IP Logged
hjestrada
Newbie
Newbie


Joined: 15 Jul 2013
Location: United States
Online Status: Offline
Posts: 5
Quote hjestrada Replybullet Posted: 15 Jul 2013 at 10:38am
To be more specific with what I am trying to do:
I have already done this but with a lot of coding in the formula that makes this work however, I would like to use less coding by utilizing an array instead of changing the code every time they need to make changes to their tables. The first table has several options as a dropdown and the second table has text data options so when an option of the first table is selected I want an option of the second table to be printed. I thought that by just creating an array in the middle of the two tables it will make it work much simpler but I am not really much into an array so I only know the basic of what I have read from the help menu.

Thanks,
Harold Estrada
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 15 Jul 2013 at 10:53am
just to throw my 2 cents in...

In Crystal arrays don't seem to be very useful as they are basically a list, just a column, so storing 'useful' data usually requires having multiple arrays and making sure that you keep them in sync...seems like more work that it's worth.

If you can keep the data simple, say the array holds the value from table2 to be used, and you can extract the field number from table1 so that it is a simple index, then the array would probably work.

HTH
IP IP Logged
hjestrada
Newbie
Newbie


Joined: 15 Jul 2013
Location: United States
Online Status: Offline
Posts: 5
Quote hjestrada Replybullet Posted: 15 Jul 2013 at 10:58am
I was afraid that a point of view like this would come but thank you for your 2 cents it helps a lot.
Harold Estrada
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