Re: Reports Developer 2000 question

From: Marcel Claus <Marcel.Claus_at_Informatik.Uni-Oldenburg.DE>
Date: 1998/06/11
Message-ID: <6locih$4k5_at_news.Informatik.Uni-Oldenburg.DE>#1/1


Cynthia Langevin wrote:

> Hello,
>
> I have a question regarding report development. I hope to receive answers
> as it is most important to me.
>
> The question regards the following report:
>
> Header: Physician Status
> Run Date and Time:
> User Id:
> Page Number of Total Pages
> Company, Facility or Team Name
>
> Body:
>
> Physician Name/Degree Status
> Joe Doe, MD FT (full-time)
> John Smith, MD PT (part-time)
> Cynthia Lang, MD PRN (part-time as needed)
>
> ordered by physician id
>
> Total Number of Physicians: xxxx
> Total FT: xx
> Total PT: xx
> Total PRN: xx
>
> The question is how do you calculate the summaries for the individual
> status'? There is a function created that creates the total for Phy_id, but
> I am not sure how to do the other individual total counts for the 3
> different status.
>
> The other question is regarding the physician privileges have to be active
> for the date that the report is run on. There is a phy_privileges table
> that has privilege_status in it and if it is not active, they are not
> supposed to appear on the report. The report can be run for individual
> company, team or facility or for all companies, facilities or teams. Would
> you check the systemdate against the start_date for the physician privilege
> and how would you do that?
>
> Thanks so much for your help in trying to assist me. You can respond
> directly to me at clangevin_at_tcipro.com or I will check the newsgroup daily.
>
> Cynthia

Question 1:
I hope you are familar with PL/SQL, cause you'll need it... You can create placeholder columns directly in the data modeller. Define as numbers and define one placeholder for every summarized status. Initialize the placeholders in the BEFORE-REPORT-TRIGGER with 0. This is important, cause otherwise the columns are initialized with NULL and you can't add one.
Place a formula-column in the query and write PL/SQL-code to add one to the placeholder column representing the status of the record you just fetch (use an IF-THEN-ELSIF-ELSE statement) Display the placeholder-columns in your report.

Question 2:
You can compare dates. They are handled like numbers (actually they are 7-byte numbers) and you can use operators like <, >, =, >=, <=. So you can write:
... where sysdate < start_date ...
Remember that this will always evaluate to false if start_date is NULL.

Marcel Received on Thu Jun 11 1998 - 00:00:00 CEST

Original text of this message