Link to home
Start Free TrialLog in
Avatar of robert594
robert594

asked on

Creating a Deposit Slip for a Predefined Form

I have a simple table like the following that will go into a pre-formatted deposit slip.

DepositNo      DepositDate      DepositType      CheckNo      PostingAmt
00021      4/1/2010      C      1B      25
00021      4/1/2010      C      1C      25
00021      4/1/2010      C      1G      0.25
00021      4/1/2010      C      783632      58.25
00021      4/1/2010      C      1H      20
00021      4/1/2010      C      1I      20

How do i create a form so that I can print each record in its unique spot...ie...record 1 Post Amt. goes in one field, record 1 CheckNo goes into another field, record 2 Post Amt. in another field, etc.
Avatar of Marcus Aurelius
Marcus Aurelius
Flag of United States of America image

Robert:

I use CR XI and you would really need to just begin by using your design area and place your data elements approximate areas of the "virtual" form. Then via testing/ trial n error...match up the report as best you can to your form.

Once you've got it right..then you can LOCK IN the format.

But it is basically like creating any other report in Crystal.

Do you know how to use Crystal?

MikeV
Avatar of robert594
robert594

ASKER

i am somewhat familiar with crystal...i have crystal 10...my problem is in putting the data in the detail section, I get all the records printed as opposed to the just one record per field i am looking for.  Is there a way I just create a formula to get just the one corresponding deposit amount and check number per field.  Then, I can place each of those formulas in different parts of the report....i have played with recordnumber but just cant find the right answer...thanks...in advance.

What I need is different fields with the following info.

Show me the first check number

Show me the second check number

Show me the first deposit amount

etc.

Then, I can place each of these formulas in exact spots on the form.
Is there a way that I can create a variable for each field...ie..

CheckNo1 = recordnumber 1
Postingamt1 = recordnumber 1

etc...

Are you saying a form has a place for multiple check numbers and deposit amounts?
Can you describe your form or scan it.  You can upload it to
www.ee-stuff.com

Crystal uses the detail section for a single record.  So if you are trying to put multiple records on a form it may be impossible or very difficult

mlmcc
it seems rather easy but maybe it isnt...

the form is a simple deposit slip with 3 columns of 6 rows which will allow a check number and a deposit amount for each deposit.  Thus, I would like to maybe have records 1-6 print out in column 1, records 7-13 print out in column 2 and records 14-18 print out in column 3.  I have tried creating a subreport for each column and inserting the subreport in detail section a, b, and c.  Then, in each section saying Suppress if Recordnumber >6 for sec. a, or if recordnumber <6 or if recordnumber >13 for sec. b, and recordnumber<13 for sec. C.  This would put them in the right area but vertically, it puts it the following:

1    
2
3
4
5
6
   7
   8
   9
   10
   11
   12
   13
       14
       15
       16
       17
       18

I tried underlaying section to no avail.

Will you be printing this?  Do you have a paper size for the form defined?

You can try this

Format the detailed section for MULTIPLE COLUMNS
Right click the detail section in the left margin
Click FORMAT SECTION
Click the box for FORMAT WITH MULTIPLE COLUMNS
A new tab appears on the right
Click it
Set up the report to have 3 columns
Be sure you choose DOWN THEN ACROSS

In you detail section put the fields you want

YOu will have to experiment with the top and bottom margins to get the detail section limited to 6 rows.

mlmcc
because i have to start from 2" from the left side of the page (portrait), i have created a subreport where i tried using multiple columns...where i sit now is that the data just stays in one column...how can i indicate that after record 6 or the 6th value, it moves to column 2 and then after 6, it moves to column 3
Unfortunately there is no way that we have found to force a column break.  The only way is to set the paper margins so that after 6 rows it thinks you are at the end of page

mlmcc
boy, i just cant believe that there is no way to create this in crystal.  this seemed like an easy task, but maybe i was wrong.  I have tried specifying record numbers to no avail, the column breaks could not get me to where i needed, i tried setting variables (but i just dont know enough about whileprintingrecords and setting variables to make it work).  I am just flustered.
I'm thinking you can use VARIABLES to place the data...and not a subreport. Have you tried that?
can you point me in the direction of how to use variables...namely, can you give me an example using 1 or 2 of the records above and where to put these formulas...ie, in detail, or header, footer.
someone had suggested that i do the following...create two formulas...

first one called @calc which has all 16 deposits and check numbers and I inserted in the details section:

WhilePrintingRecords;

NumberVar Reset:=0;

NumberVar Amount:={AR_CashReceiptsHeader.PostingAmt};
StringVar CheckNo:={AR_CashReceiptsHeader.CheckNo};

NumberVar Deposit1;
StringVar Deposit1check;
NumberVar Deposit2;
StringVar Deposit2check;

//i have only copied the first two numbervar and stringvar for this example

If Deposit1check ="" then Reset:=1;
If Deposit1check ="" then Deposit1:=Amount;
If Deposit1check ="" then Deposit1check:=CheckNo;
If Reset = 1 then Amount:=0;
if Reset = 1 then Checkno:="";

If Deposit2check ="" then Reset:=1;
If Deposit2check ="" then Deposit1:=Amount;
If Deposit2check ="" then Deposit1check:=CheckNo;
If Reset = 1 then Amount:=0;
if Reset = 1 then Checkno:="";

If Deposit3check ="" then Reset:=1;
If Deposit3check ="" then Deposit1:=Amount;
If Deposit3check ="" then Deposit1check:=CheckNo;
If Reset = 1 then Amount:=0;
if Reset = 1 then Checkno:="";

Then, I created a reset formula called @calcreset which i put in the page header

WhilePrintingRecords;

NumberVar Amount:=0;
StringVar CheckNo:="";

I then put a @Show Deposit 1 in the group footer or page footer

WhilePrintingRecords;

StringVar Deposit1check;

Deposit1check

What i proceeded to get was a result of zero's accross all formulas.



Going back to mlmcc's comment about using multiple columns, is the amount of data different for each record or are they sized consistently?  If they're consistent, there doesn't seem to be any reason you can't use his suggestion to set your page margins so after six records the shift is to the next column - or you can use a blank page footer section (if you go back to using the main report) to occupy space at the bottom of the page which will have the same effect as changing the margins.

If that doesn't work, you certainly could do this using formulas, but that will be a big pain.  Conceptually what you'd do is put all of the values into an array in your details section, then in a report footer section (which would be the 'main' area of your report display) you could manually position each of the formulas to display a specific element of the array.  There are other approaches too - along the lines of what you're trying to do above - but I think they're overly complex for the situation and there's no advantage over just doing 16 individual formulas.

frodoman
can you give me an example of creating an array in this example..thanks for your input...
ASKER CERTIFIED SOLUTION
Avatar of frodoman
frodoman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Oops - in the second formula the ">" should be ">="

frodoman
frodoman...works like a charm...can i give you 10,000 points...you just wont believe that the time I have put into this...thanks....
I'm glad I could help.