blissland Posted December 25, 2008 Posted December 25, 2008 Here is the preliminary real-life description--the specific logic question is at the bottom: We get "submissions" of soil samples and we perform a variety of tests on them and write results on printouts that are generated when the samples are brought in and i run a "print tests" script. In all but one case, each test has one layout that is printed and taken into the lab for writing results onto. That layout is repeated on the printout for each sample for which the test was ordered. So, the printout will have rows to enter data for many samples all on one page. All of that works perfectly in our current db except for the "but one case" above. In that one case, the "active bacteria" and "active fungi" tests use the same layout [which is lame, but that's how it is]. As a result, this layout prints once for active bacteria and once for active fungi, essentially ordering the same page twice since these two tests are ordered together 99% of the time. Because there is this 1%, I can't simply tell it to print for one test and not the other. I tried another option where I search for both tests ("=active" will find both) but this just results in the layout being repeated twice for each sample. What I want is a final sheet that has only one row per sample, regardless of whether it has one or both tests associated with it. Is there a way within this script that I could take this found set (submission==x, test="active") with two records per sample and reduce it so only one of them (either one) is showing? So instead of this: 50 activebacteria 50 activefungi 51 activebacteria 51 activefungi i get 50 activesomething 51 activesomething Or is there a better way to address this problem?
Søren Dyhr Posted December 25, 2008 Posted December 25, 2008 Perhaps something in this direction would do: http://www.kevinfrank.com/download/kf-fast-summary.zip --sd
Recommended Posts
This topic is 5811 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now