Article View: microsoft.public.vb.crystal
Article #2Re: can a crystal formula do this?
From: David M. Goncalves
Date: Thu, 13 Aug 1998 00:00
Date: Thu, 13 Aug 1998 00:00
98 lines
4382 bytes
4382 bytes
I have encountered a similar problem printing Driver Log information for truck drivers, where it is important to know if the driver did not submit a log on particular day. Crystal is not very good at reporting on things that are absent (it's not just Crystal, either. Try to do it with a TdbGrid, and you probably already know what I mean). Here is my suggestion: Create a separate table which does nothing but provide continuous keys. For example, create a table comprised of nothing but dates, call it DATES.DB?. Populate the table with data ahead of time. Even three years worth of dates would only be 1100 records. Add this table to your Crystal report, and then link your true data table to this table based on date. Now every date is guaranteed to show up in your report, because it exists in DATES.DB?. You can now use formulas to display special messages if your actual data table does not have a matching record. DATES.DB? must be perpetually updated, but this could be a quick on-startup maintenance routine, ensuring that the range of dates is complete at the end. What do you think? You can also try Seagate's web page. They have an extensive knowledgebase, good tech support, too. There's also a Crystal newsgroup news.cogniza.com.seagate.public.crystal-reports.general Good luck! DMGoncalves Duncan Stewart wrote: > I can't help Luke but I too am desperately trying to do something > similar. > > I have reports which use groups to display data from several areas > (could be companies in sales data, regions, whatever) and I too would > like my group headers to display even when they are empty of data. > The fact that, say, one particular salesman has made NO sales is just > as important - sometimes even more so that tracking the actual sales. > > Surely it's possible. > > Can't see how though. (using version 5.0 patched to latest update). > > Duncan Stewart responding to:- > > > > Luke Bond who wrote: > >> Please help... >> >> I'm using Crystal 6.0 and I'm trying to write a particular report, >> but I >> can't seem to get the formula to do what I want. Say, for example, I >> >> wanted to write an 'Occupancy Report' for a hotel that lists each >> day >> (between two date parameters) and indicates how many rooms are >> booked/available and their status (enquiry, confirmed, etc.). This >> is >> fine, but on days that have no rooms booked, then it skips these >> days >> because crystal selected no data (based on the idea that these days >> contained to booked rooms). What I want is a list of each day >> between >> the specified dates, including the blank ones. >> >> I thought that I could put a formula in the report header that >> initializes a date variable according to the parameter field >> FROMDATE, >> and then increment this day by one until it matched the next record >> that >> crystal selected (ie the next day with rooms booked), and print that >> >> line, but in the meantime print a line that indicated this day has >> no >> bookings. >> >> The problem is that there is no formula command like 'loop', 'while' >> or >> 'repeat' that will loop through the blank ones, and I can't link >> this >> date variable to a group. >> >> PLEASE, if anyone can help then I would greatly appreciate it. It is >> for >> a very important program. >> >> Regards, >> Luke Bond. >> lukeb@ionsoftware.com.au > >
Technical Details
Message-ID:
<35D2E2E4.9271C4BC@vicon.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<35D10EAE.3D9C89D1@ionsoftware.com.au> <35D1E3A3.4733E9F1@which.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fae62,99458b5697f74167 X-Google-Attributes: gidfae62,public X-Google-Thread: ffff5,99458b5697f74167 X-Google-Attributes: gidffff5,public X-Google-Thread: 107f35,99458b5697f74167 X-Google-Attributes: gid107f35,public X-Google-Thread: 10baee,99458b5697f74167 X-Google-Attributes: gid10baee,public From: "David M. Goncalves" <dmgoncal@vicon.net> Subject: Re: can a crystal formula do this? Date: 1998/08/13 Message-ID: <35D2E2E4.9271C4BC@vicon.net> X-Deja-AN: 380882340 Content-Transfer-Encoding: 7bit References: <35D10EAE.3D9C89D1@ionsoftware.com.au> <35D1E3A3.4733E9F1@which.net> Content-Type: text/plain; charset=us-ascii Organization: Scanlon Associates MIME-Version: 1.0 Reply-To: dmgoncal@vicon.net Newsgroups: microsoft.public.vb.crystal,borland.public.delphi.reporting-charting,comp.lang.pascal.delphi.databases,comp.lang.pascal.delphi.misc