Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Load and Unload Array Post Reply Post New Topic
Author Message
ziggy
Newbie
Newbie
Avatar

Joined: 30 Nov 2011
Location: Australia
Online Status: Offline
Posts: 4
Quote ziggy Replybullet Topic: Load and Unload Array
    Posted: 30 Nov 2011 at 1:48pm
New to this
I put this formula in a sub report selecting records with a date in the future
 
shared stringvar array FutureApptList;
Shared numbervar X;
FutureApptList[X]:={Urno}&" "&{ClinicCode};
redim preserve FutureApptList[ubound(FutureApptList)+1];
X:=X+1
 
and this one in
shared stringvar array FutureApptList;
Shared numbervar X;
local numbervar I;
For I := 1 to X do
(FutureApptList)
 
in the main report which should (I thought) simply unload the array into the report - it reutrns "True" and thats all.
 
Plan is to eventually load the array with future records and then as records with past dates are read check to see if they are in the array and flag each with a Yes or No respectivly. - Can't even get the array to unload let alone check it against another list.
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 01 Dec 2011 at 2:41am
you need to tell what to do with the array.
 
let's say you want it to display a list of the array values, instead of
for ii:=1 to x do
(FurtureApptList[ii])
 
you would do something like:
local string resList;
for ii:=1 to x do
(resList := resList + chrw(10) + chr(13) + FutureApptList[ii];);
mid(resList, 3)   //skip the first crlf
 
you would think that your code is correct,or that CR would understand it, but I think that arrays can confuse it, as it is not a single value, and CR likes single values (99.99% of all items processed are basically single values)
 
obviously, it is cases like this that are the .01%
 
(yeah, I just made up the percentages)
 
HTH
 


Edited by lockwelle - 01 Dec 2011 at 2:42am
IP IP Logged
hirecrishecom
Newbie
Newbie
Avatar

Joined: 04 Dec 2011
Location: Hong Kong
Online Status: Offline
Posts: 4
Quote hirecrishecom Replybullet Posted: 04 Dec 2011 at 7:34pm
Choose Components > Generate Job from the main HPL window.
The Generate window appears, as Figure 115 shows.

Click Load/Unload Job in the Generate group.
Select a format for the data file in the Format Type group.
Select a name for the generated components and type it in the Generate Name text box.
This name is used for each of the components that this option creates.

Type the name of the database that you will load or unload in the Database text box or click the down arrow to select a database from the selection list.
Type the name of the table within the database in the Table text box or click the down arrow to select a table from the selection list.
Type the name of a device array in the Device text box or click the down arrow to select a device from the selection list.
If you enter the name of a device (file) instead of a device array, ipload creates a device array of the same name as the unload job and inserts the specified device into that device array.

When you specify a file instead of a device array in the Device text box, ipload makes the following assumptions about the data file:

The file is an ASCII file.
The file uses the same locale as the database.
The file uses a vertical bar (|) for the field delimiter and a new line for the record delimiter.
The fields in the data file are in the same order as the columns of the target table.
Click OK.
Figure 116 shows appropriate ch
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.