Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Using Dynamic Arrays Post Reply Post New Topic
Author Message
judyl
Newbie
Newbie


Joined: 23 Mar 2012
Online Status: Offline
Posts: 3
Quote judyl Replybullet Topic: Using Dynamic Arrays
     Posted: 23 Mar 2012 at 3:15am
I am looking for Crystal Report XI samples of using dynamic arrays.  I found a 2002 document that gives good information, but would like to see the "whole picture" - the .rpt itself.  The sample .rpt file I'm looking for is named CR_Arrays_Samples.zip which is referenced in the 7/23/2002 Crystal Decisions white paper "Advanced Reporting Techniques Using Arrays."  Have been working with SAP's Crystal Reports support, but they don't have any information on arrays, and can't find this file or something similar.
 
Does anyone have this .zip file, or know of any other good sample .rpt files I can download that use dynamic arrays?
 
I have Brian's "Crystal Reports Encyclopedia Professional XI Reports", but it does not go into the depth I'm looking for.
 
Thank you!
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 23 Mar 2012 at 3:34am
why would you want to use arrays?
 
I only ask as I haven't found the arrays to be particularly helpful.  They're only 1 dimensional, which means that to store any significant information requires several arrays running in synch.  In addition, all access is through formulas and having to loop through the array.
 
I have found (and this just my opinion) that delimited strings seem to take about the same amount of work, are more flexible.
 
It's not that I am against arrays, but the fact that they are just a label (let's say) and don't include something like the recordID to link to in another table, just make them basically list boxes...very primitive.
 
That is not say that using them as a list of what has been displayed or for various other purposes can't be done, it just requires you to do the record keeping because CR can't.
IP IP Logged
judyl
Newbie
Newbie


Joined: 23 Mar 2012
Online Status: Offline
Posts: 3
Quote judyl Replybullet Posted: 26 Mar 2012 at 2:48am

It is for printing conference badges.  The data is in format date/session format with one record for each date/session:

3/21/2012 AA01
3/21/2012 AB01
3/22/2012 BA01
3/22/2012 BB01
3/22/2012 BC02 ... etc.  upt to 6 days of sessions.
 
I need to fromat it such:
 
3/21/2012    3/22/2012  ... etc... up to 6 columns
AA01            BA01
AB01            BB01
                    BC01
 
Or, optionally like:
 
3/21/2012  AA01, BA01
3/22/2012  BA01, BB01, BC1  etc.. up to 6 rows.
 
To complicate, they may want the badges printed 2 or 3 across the page.
 
Seemed the best way to do this would be with arrays.  Perhaps there is a better way, though?
 
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 26 Mar 2012 at 3:45am
from the data and layout desired, it looks more like a cross tabs style report.  You would 'pivot' on the date.
 
as for multiple badges per page, use a multicolum layout...
 
I am assuming that the columns to be printed is ON the badge, not a badge for each day...
 
HTH
IP IP Logged
judyl
Newbie
Newbie


Joined: 23 Mar 2012
Online Status: Offline
Posts: 3
Quote judyl Replybullet Posted: 26 Mar 2012 at 3:49am
Yes, it is one badge per person with multiple columns for days/sessions. I'll take another look at crosstabs.  Most examples I saw were for summary reports.  Thanks.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 26 Mar 2012 at 4:07am
you're right, they are typically used in summary's but I would think that you should be able to manipulate it so that it prints the value.
 
Otherwise, I can see subreports that are linked to the person and the date...the only issue with that is whether or not you would want a blank column if they have no sessions on a particular day.
 
since you know the number of dates, you can easily layout out the badge call the subreport the specified number of times.
 
Not an ideal solution, but at least another avenue to explore.
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