Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populated and Unpopulated Database Views

Status
Not open for further replies.

risman

IS-IT--Management
Mar 13, 2002
29
US
Hello,
I've been working Crystal for quite a while now, and still frustrated by blank returns on reports. I write reports for a Radiology Dept., and our new RIS application vendor has "supplied" us with views to use with Crystal 8.5, SQL, OLE DB. These views can have as many as 2 to 50 fields in them. It seems some get populated and some don't.
For example, if I have a view of 'vusrEXAM' and fields {PatientLastName}, {PatientFirstName}, {DateOfBirth}, {MRN}
I would like a formula to run a generic report on this view to return say 5 random entries (none being 0) for each field. This way, I could keep a list on whether or not to use a particular view/field in a report. Browsing each field is painfully slow, only to have Crystal hang, error out, or return zip. Any help would be appreciated! Thanks!
 
I'm not positive what it is you need...

If you don't want certain rows (such as null, blank and 0 values), I'd place the filtering criteria into the record selection formula.

I generally do randomizing in a Stored Procedure, though Crystal does have a RND function (random).

So once you've filtered to rows that have appropriate values, you could count the number of rows, and then pass that to a subreport, which could use RND to extract 5 rows through the use of variables.

Hopefully this explains the capabilities, now if you could supply some examples of what you have and what you want, perhaps we can flesh it out.

-k kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top