Solved

Creating a Deposit Slip for a Predefined Form

Posted on 2006-07-19
20
504 Views
Last Modified: 2008-02-01
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.
0
Comment
Question by:robert594
  • 9
  • 4
  • 3
  • +1
20 Comments
 
LVL 17

Expert Comment

by:MIKE
ID: 17142175
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
0
 

Author Comment

by:robert594
ID: 17142458
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.
0
 

Author Comment

by:robert594
ID: 17143074
Is there a way that I can create a variable for each field...ie..

CheckNo1 = recordnumber 1
Postingamt1 = recordnumber 1

etc...

0
 
LVL 100

Expert Comment

by:mlmcc
ID: 17143118
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
0
 

Author Comment

by:robert594
ID: 17143257
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.

0
 
LVL 100

Expert Comment

by:mlmcc
ID: 17143348
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
0
 

Author Comment

by:robert594
ID: 17143454
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
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 17143850
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
0
 

Author Comment

by:robert594
ID: 17145980
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.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 17

Expert Comment

by:MIKE
ID: 17146262
I'm thinking you can use VARIABLES to place the data...and not a subreport. Have you tried that?
0
 

Author Comment

by:robert594
ID: 17146412
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.
0
 

Author Comment

by:robert594
ID: 17146484
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.



0
 
LVL 42

Expert Comment

by:frodoman
ID: 17146743
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
0
 

Author Comment

by:robert594
ID: 17146777
can you give me an example of creating an array in this example..thanks for your input...
0
 
LVL 42

Accepted Solution

by:
frodoman earned 500 total points
ID: 17146928
Create a formula like this in your Details section:

  shared stringVar array Checks;
  shared numberVar array Amounts;

  redim preserve Checks[UBound(Checks)+1];
  redim preserve Amounts[UBound(Amounts)+1];

  Checks[UBound(Checks)] := {AR_CashReceiptsHeader.CheckNo};
  Amounts[UBound(Amounts)] := {AR_CashReceiptsHeader.PostingAmt};

  // Dummy return value required
  ' ';

Then in your report footer you can use a collection of formulas like this to position the values:

  numberVar ThisNumber := 5;
  shared stringVar array Checks;

  if UBound(Checks) > ThisNumber then
    Checks[ThisNumber]
  else
    ' ';

Just change the first line so "ThisNumber" is 1 for the first item, 2 for the second item, etc.  The code will check to make sure the item exists and display a blank if it doesn't (for the numeric amount you'll have to display a zero instead of a blank).

frodoman
0
 
LVL 42

Expert Comment

by:frodoman
ID: 17146940
Oops - in the second formula the ">" should be ">="

frodoman
0
 

Author Comment

by:robert594
ID: 17150993
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....
0
 
LVL 42

Expert Comment

by:frodoman
ID: 17153435
I'm glad I could help.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now