Hey guys,
I have this report that was created by someone else before I got to this job. I am going to explain how it is set up and show you the details of the report and the formulas.
We are a school with regular couples and then we have partners (same sex). This report makes the Parent 1 - Father and Parent 2 - Mother. I added code in that allowed the Father #2 cell and email to display, but because the mother is already Parent 2, it does not read the Mother #2 contact info because Mother is already in that spot. Make sense?
I studied the setup of the report and added two new vars that would pull Mother # 2 cell and email, and it shows up on the report, but it now shows up on other families info instead of just certain ones, like the regular contact vars do.....Any help with the formula so that it only shows up for same sex couples would be much appreciated! Thanks.
WhilePrintingRecords;
StringVar HomePh;
StringVar P1CellPh;
StringVar P2CellPh;
StringVar P1Email;
StringVar P2Email;
Stringvar Pm;
StringVar Pe;
If {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contacttype} in ["Home", "Home Phone", "Father Home Phone", "Mother Home Phone"] then HomePh := {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contactnum};
If {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contacttype} in ["Father Cell Phone", "Parent 1 Cell Phone"] then P1CellPh := "P1m: " + {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contactnum};
If {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contacttype} in ["Mother Cell Phone", "Parent 2 Cell Phone", "Father #2 Cell Phone"] then P2CellPh := "P2m: " + {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contactnum};
If {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contacttype} in ["Father Email", "Parent 1 Email"] then P1Email := "P1e: " + {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contactnum};
If {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contacttype} in ["Mother Email", "Parent 2 Email", "Father #2 Email"] then P2Email := "P2e: " + {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contactnum};
These are the ones I copied and added:
If {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contacttype} in ["Mother #2 Cell"] then Pm := "Pm" + {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contactnum};
If {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contacttype} in ["Mother #2 Email"] then Pe := "Pe" + {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contactnum};
I have this report that was created by someone else before I got to this job. I am going to explain how it is set up and show you the details of the report and the formulas.
We are a school with regular couples and then we have partners (same sex). This report makes the Parent 1 - Father and Parent 2 - Mother. I added code in that allowed the Father #2 cell and email to display, but because the mother is already Parent 2, it does not read the Mother #2 contact info because Mother is already in that spot. Make sense?
I studied the setup of the report and added two new vars that would pull Mother # 2 cell and email, and it shows up on the report, but it now shows up on other families info instead of just certain ones, like the regular contact vars do.....Any help with the formula so that it only shows up for same sex couples would be much appreciated! Thanks.
WhilePrintingRecords;
StringVar HomePh;
StringVar P1CellPh;
StringVar P2CellPh;
StringVar P1Email;
StringVar P2Email;
Stringvar Pm;
StringVar Pe;
If {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contacttype} in ["Home", "Home Phone", "Father Home Phone", "Mother Home Phone"] then HomePh := {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contactnum};
If {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contacttype} in ["Father Cell Phone", "Parent 1 Cell Phone"] then P1CellPh := "P1m: " + {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contactnum};
If {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contacttype} in ["Mother Cell Phone", "Parent 2 Cell Phone", "Father #2 Cell Phone"] then P2CellPh := "P2m: " + {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contactnum};
If {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contacttype} in ["Father Email", "Parent 1 Email"] then P1Email := "P1e: " + {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contactnum};
If {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contacttype} in ["Mother Email", "Parent 2 Email", "Father #2 Email"] then P2Email := "P2e: " + {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contactnum};
These are the ones I copied and added:
If {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contacttype} in ["Mother #2 Cell"] then Pm := "Pm" + {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contactnum};
If {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contacttype} in ["Mother #2 Email"] then Pe := "Pe" + {StsRlns_1RlAdrs_1Cnts_1.StsRlns_1RlAdrs_1Cnts_1_Contactnum};