Cheque using Crystal Report

I have created a program in Visual Studio 2005 where the end product is going to be a crystal report that prints an A4 Cheque where the cheque is perforated at the bottom of the page.
I have two tables in SQL Server 2005 where all the data is stored. A Header Table which contains the customer’s name addresses etc. Also a Line table which contains the details of the statement, e.g. Description, price etc.
Each customer is assigned an unique number in the Head table and all the corresponding records for that customer in the Line table have this unique number assigned to them.

My problem is that sometimes there is lets say 20 transactions on the statement for a customer and this then will need a second page which will take a second A4 sheet with a cheque on it.

How can I get the first page not to print anything on the cheque itself and just print it on the second page that it used?

I am in the process of doing it myself but would like some other views on how to complete it?

Thanks.
LVL 1
EamonAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

frodomanCommented:
Without more info about how your report is structured it's difficult to say precisely.  As a general strategy though, I would create a subreport for the check itself and position this subreport in your page footer so that it prints on the cheque portion of your form.  Without any other changes this would print the cheque information on every page.

Since you don't want to print 2 cheques if you have two pages, you would place a shared variable on your report that gets set to 0/off/etc. in the group header and then gets set to 1/on/etc in the group footer.  The subreport that prints the cheques can produce different output based on this shared variable - if the variable is on then produce a cheque normally and if it isn't produce some static text such as "VOID - Not a Valid Cheque" to occupy the same space.

Hope this helps,

frodoman
0
mlmccCommented:
Sounds like a viable solution.  Agree more information may be needed.

mlmcc
0
EamonAuthor Commented:
At present I have a group footer which contains the sellers name, address, seller Number. Im my details section I have all the details from my Line table which includes, LotNo, Description, Value Of lot. In my group footer I have the totals and the cheque amounts and Name which is printed on the cheque itself.

In the case where I have 20 lots and a second page is needed, maybe to somehow say, print page 1 on a blank page from tray 1 from the printer and then print page 2 from tray 2 where the cheque's are.

Would something like that be possible do you think?
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

frodomanCommented:
No, to the best of my knowledge Crystal still hasn't added to ability to print pages from different printer trays, hence my suggested approach (after your description I still believe that's your best bet).

Another option would be to put the details in a subreport and limit them to 20 items (or whatever your max per page is) and simply not show any items beyond your max - effectively limiting each to a single page.
0
EamonAuthor Commented:
I thought that alright.

Could you give me more info on shared variable?
0
mlmccCommented:
0
frodomanCommented:
The white paper should cover it.  In your case basically in the header you'll have a formula like this:

shared booleanVar PrintCheck := false;

Then in the group footer the same formula with a value of true.  I would create your subreport with some simple formulas  - for example for the payee something like this:

shared booleanVar PrintCheck;
if PrintCheck = true then
  {table.payee}
else
  '***VOID - Not a Valid Check ***'


frodoman
0
EamonAuthor Commented:
Looking at that white paper now. One quick Q, How would I limit my Details section to just 10 records?
0
mlmccCommented:
Use conditional suppression with a variable

Are you printing one check at a time or multiple?

mlmcc
0
EamonAuthor Commented:
It will be multiple cheque's.
0
mlmccCommented:
I assume this is a single report and there is no subreport.  I don't see that you mention subreprots.

Try this
In the report header add a formula
Name - DeclVars
WhilePrintingRecords;
Global NumberVar RecCount := 0;

In the group header
Name - ResetCount
WhilePrintingRecords;
Global NumberVar RecCount;
RecCount := 0;

In the detail section
Name - CountRecords
WhilePrintingRecords;
Global NumberVar RecCount;
RecCount := RecCount + 1;

Conditionally suppress the details section
Formula
Global NumberVar RecCount;
RecCount > 10

mlmcc


0
EamonAuthor Commented:
Yes it is single report with multiple cheques. I entered all your formulas and it does what you suggest. Thing is one of my customers has 12 records to show on the details section. the above method doesnt show the last 2 records. I need to be able to see them. You were saying above about using a shared variable, Would that be the way to go to show the other 2 records.

Then on the first page and first cheque to set the payee name to "**VOID** or something to that affect.
0
EamonAuthor Commented:
Would you know of any other 3rd party that I could use to select which tray a page should be takin from. One of the main aims of the project was too stop cheques being wasted.

Thanks.
0
mlmccCommented:
Here is a link with several third-party viewers.  You might check Visual Cut.  It has the ability to burst reports which may provide the capability you need.
http://www.kenhamady.com/bookmarks.html

mlmcc
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mlmccCommented:
Glad i could help

mlmcc
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.