Example #1
0
///////////////// Report Builder ///////////////////
// Primary call
void MediationProcess::BuildReport()
{
    _report = new QTextDocument();
    _report->begin();

    QTextCursor cursor(_report);

    // Header - User entered data
    BuildHeaderSection(cursor);

    // 1. General Information:  Inquiry, Mediation and Session information
    BuildGeneralInfoSection(cursor);

    // 2.  Party Information:  Party member address, phone and attorney information
    BuildPartyInfoSection(cursor);

    // 3.  Session Information:  Schedule, client and mediation information
    BuildSessionInfoSection(cursor);

    // 4.  Notes Information:  Just Notes.
    BuildNotesSesction(cursor);

    _report->end();    

    OpenReportPDF();
}
///////////////// Report Builder ///////////////////
// Primary call
void ResWaReport::BuildReport()
{
    _report = new QTextDocument();
    _report->begin();

    QPrinter printer(QPrinter::HighResolution);
    printer.setOutputFormat(QPrinter::PdfFormat);
    printer.setPageOrientation(QPageLayout::Landscape);
    printer.setOutputFileName(DEF_PDF_PATH);
    printer.setPageMargins(12, 8, 12, 12, QPrinter::Millimeter);

    QTextCursor cursor(_report);

    // Header - User entered data
    BuildHeaderSection(cursor);

    // 1. Cases and number of settled cases
    BuildCasesSection(cursor);

    // 2. CALLS (Information, Intake and referral calls)
    BuildCallsSection(cursor);

    // 3. CONTACTS (proactive outreach events)
    BuildContactsSection(cursor);

    // 4. TRAINING & IN-SERVICES
    BuildTrainingSection(cursor);

    // 5. PEOPLE SERVED
    BuildPeopleServedSection(cursor);

    // 6. PEOPLE REACHED VIA OUTREACH EFFORTS
    BuildOutreachSection(cursor);

    // 7. VOLUNTEER STAFF
    BuildStaffSection(cursor);

    // 8. CLIENT EVALUATIONS
    BuildEvaluationSection(cursor);

    _report->end();

    _report->print(&printer);

    OpenReportPDF();
}