Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Crystal Report Problem Post Reply Post New Topic
Author Message
mikestokes
Newbie
Newbie


Joined: 28 Feb 2011
Location: United States
Online Status: Offline
Posts: 1
Quote mikestokes Replybullet Topic: Crystal Report Problem
     Posted: 28 Feb 2011 at 6:04pm
Hi Guys,  I am fairly new to Chrystal Reports and find that I may be trying to do something that the program is not designed to do.  First I am pulling data from a SQL Database.  My report is searching for missing invoice numbers within the database from either lost or destroyed invoices.  The table that holds the invoice numbers is set up for 10 digits in which we only use 6 digits for now.  There are 50 invoices to a book and I want to be able to input my search with the user inputting the first invoice number.  The table is named InvoiceNumb.  Is there a way to be able for the program to take this invoice number in the search and print it to a report and if this number actually exists in the database print the other selected fields that are associated with this number.  For example :
 
Invoice Number          Date            Employee              Amount
0000125050            02/12/2010        Mark               $   236.85
 
Then take the invoice number that was printed and add  One (1) to it and print it on the next line.  Upon doing so go to the database and find the data that is associated with this Invoice Number if it exists.  If it does not exist only the Invoice Number will be printed with no other data in the other fields.  Then go to the next Invoice Number until all 50 are printed in the report.
I have not been able to find a way to print data that does not exist in the database.  Thanks for your help.
Mike
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 01 Mar 2011 at 3:09am

the simplest solution is to create  a stored procedure to do the work, as Crystal will not requery the database.

Since the data doesn't exist in the database, it becomes difficult to find it.  A method to assist in this would be to have a table of numbers, then you could use an outer join to the existing table and to the numbers table to find missing values (they will have a null value)
 
HTH
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