AnsweredAssumed Answered

Portal Printing:Where is my mistake?

Question asked by NaturSalus on May 21, 2012
Latest reply on May 21, 2012 by NaturSalus

Title

Portal Printing:Where is my mistake?

Post

Hello,

My objective is to generate two types of reports, each form one end of a relationship:

Medicines & Diseases report. Report of the medicines and the diseases treated, generated  from a layout based on the Disease_Detail TO. This is so, because there is a portal to MedicineDisease on the Medicine_Detail TO.

Diseases & Medicines report. Report of the diseases and medicines needed, generated from a layout based on the Medicine_Detail TO. This is so, because there is a portal to MedicineDisease on the Disease_Detail TO.

 

Both reports have a similar structure and are triggered by a similar Print script. However, although I don't have any problems with the Medicines & Diseases report, the Diseases & Medicines report doesn't show all the records.

So I guess I have made some mistake that I cannot detect so far.

 

RELATIONSHIPS

Medicine --< MedicineDisease >-- Disease

 

Medicine::__kp_Medicine = MedicineDisease::_kf_Medicine

MedicineDisease::_kf_Disease = Disease::__kp_Disease

 

LAYOUTS 

 

Medicine_Detail Layout

 

On the On the Medicine_Detail layout based on the Medicine TO I have a Portal to MedicineDisease TO with the following fields:

 

Disease::dCommonName

Disease::BodySystem

Disease::BodyOrgan

 

Medicines & Diseases Report Layout

 

In order to generate a report with a list of all the medicines and the diseases that they treat, I have the Medicine_Report layout (List View) based on the Disease TO with the following structure:

Header: Medicines & Diseases

Sub-summary by Medicine::mScientificName with the field: Medicine::mScientificName

Sub-summary by Medicine::mTradeName with the field: Medicine::mTradeName

Sub-summary by Medicine::mType with the field: Medicine::mType

Body: the body part has the following three fields: Disease::dCommonName, Disease::BodySystem, Disease::BodyOrgan

 

When the Medicines & Diseases List Print script is triggered I get the right report as shown in the picture attached. 

 

Disease_Detail Layout

 

On the Disease_Detail layout based on the Disease TO I have a Portal to MedicineDisease TO with the following fields:

 

Medicine::mScientificName

Medicine::mTradeName

Medicine::Type

 

 Diseases & Medicines Report

 

In order to generate a report with a list of all the diseases and the medicines needed from treatment, I have the Diasease_Report layout (List View) based on the Medicine TO with the following structure:

Header: Diseases & Medicines

Sub-summary by Disease::dCommonName with the field: Disease::dCommonName

Sub-summary by Disease::BodySystem with the field: Disease::BodySystem

Sub-summary by Disease::BodyOrgan with the field: Disease::BodyOrgan

Body: the body part has the following three fields: Medicine::mScientificName, Medicine::mTradeName, Medicine::Type

 

When the Diseases & Medicines List Print script is triggered I get the following incomplete report (only the first medicine for each disease is shown)

Diseases & Medicines

Disease Name: Aerofagia

Body System: Digestive

Body Organ: Large Intestines

Name---------------------------Trade Name------------------------------Type

Foeniculum vulgare--------------Hinojo------------------------------------Plant

 

Disease Name: Artritis

Body System: Skeletal

Body Organ: Bones

Name----------------------------TradeName------------------------------Type

Harpagophytum procumbes--------Harpagofito------------------------------Plant

 

 The MedicineDisease table has all the expected values

MedicineDisease::__kp_MD--------------1-----2------3------4------5

Disease::_kf_Disease-------------------1-----2------3------4------5

Medicine::_kf_Medicine-----------------1-----1------1------2------2

 

Since for each "disease" record it is shown only its first "medicine" record my problem must be related to the fact that I am not doing the Diseases & Medicines report from the right context, but I don't understand why the chosen context is wrong. 

 

 Any ideas where is the mistake?

 

Thanks,

 

natursalus

 

 

medicine_disease_report.jpg

Outcomes