Generating Report Doesn't Include All Expected Items

My Study Group Roster report is not properly including all groups expected.

My GenerateReports form lets you specify which Study Groups and which Portfolios are included in the report. Once all groups and portfolios are chosen, clicking the Generate Report button causes the report to be printed with the chosen parameters.

This is accomplished by saving the selected groups and portfolios in the Selected… tables, and those tables are included in the rqStudyGroupRoster report query.

This query properly returns the expected records including all study groups and all portfolios. You can run the query in design mode to verify the results. If you do this, you need to temporarily edit the query to use your actual UserKey instead of the parameters. Please don’t save the query if you do this!

In any case, the query returns all expected records, but the report only returns the firs 3-4 study groups instead of all study groups. Note: in the GenerateReports form, make sure you select all study groups and all portfolios before clicking the Generate Report button.

I’ve uploaded the latest FDF file to OneDrive. Thanks…

Hi guys,

It’s been over 3 weeks. Is there anything that you can do to help me with this? My application won’t work if I can’t generate reliable reports. thanks…

Hi,

Please try on this code, it mostly a cleanup and small restructure, also uses @root to make sure all data is accessed correctly. Minor adjusted the group and loop structure, so every row shows up.

<style>
    @page {
        size: A4 landscape;
        margin-top: 10;
        margin-left: 10;
        margin-bottom: 10;
        margin-right: 10;
    }
    .page {
        color: #000000;
        background-color: #ffffff;
    }
</style>

<div>
    <div>{{#_GroupBy @root.[rqStudyGroupRoster].[Records] 'GroupName' as | rqStudyGroupRoster |}}
            <div class="fiveReportHelper">{{#_Each rqStudyGroupRoster}}</div>
            <div class="fiveGroupByHeader">
                <div style="border: 1px dashed black; display: flex; justify-content: center; width: 100%;" contenteditable="false" class="fiveReportBreakAfter">&lt;--- Page Break ---&gt;</div>

                <!--<div>-->
                <!--    <table class="fiveReportHeader-everyPage" style="width: 100%;">-->
                <!--        <tbody>-->
                <!--            <tr>-->
                <!--                <td>-->
                <div>
                    <table style="width: 100%; background-color: rgb(207, 226, 243); border-collapse: collapse;">
                        <tbody>
                            <tr style="width: 100%">
                                <td rowspan="4">
                                    <div style="margin: 5px 0 0 5px;">{{five.variable.logo}}</div><br>
                                </td>
                            </tr>

                            <tr>
                                <!--<td style="width: 18%; text-align: left;"><br></td>-->
                                <td style="width: 64%; text-align: center; font-size: 16px;"><strong>{{GroupName}} Roster</strong></td>
                                <td style="width: 17.5%; text-align: right;"><span style="font-size: 12px;">{{five.variable.CurrentDate}}</span></td>
                                <td style="width: .5%" ;=""><br></td>
                            </tr>
                            <tr>
                                <!--<td style="width: 18%; text-align: left;"><br></td>-->
                                <td style="width: 64%; text-align: center; font-size: 14px;"><span style="color: rgb(102, 102, 102);">Category: </span><span>{{Category}}</span></td>
                                <td style="width: 17.5%; text-align: right; font-size: 12px;"><span style="color: rgb(102, 102, 102);">Portfolio: </span><span>{{Portfolio}}</span></td>
                                <td style="width: .5%;"><br></td>
                            </tr>
                            <tr style="height: 3mm;">
                                <!--<td style="width: 18%; text-align: left;"><br></td>-->
                                <td style="width: 64%; text-align: center; font-size: 14px;"><span style="color: rgb(102, 102, 102);">Meets: </span><span>{{DayOfWeek}}</span><span style="color: rgb(102, 102, 102);"> of Week </span><span>{{Weeks}}</span></td>
                                <td style="width: 17.5%; text-align: right; font-size: 12px;"><span>{{MemberCount}}</span><span style="color: rgb(102, 102, 102);"> members of </span><span>{{MaxMembers}}</span><span style="color: rgb(102, 102, 102);"> Max</span></td>
                                <td style="width: .5%;"><br></td>
                            </tr>
                        </tbody>
                    </table>
                </div>


                <div style="background-color: #FFFFFF;">
                    <table style="width: 100%;">
                        <tbody>
                            <tr style="font-size: 12px;">
                                <td style="width: 11%; color: rgb(183, 183, 183);">Vice President</td>
                                <td style="width: 22%;">{{Vp}}</td>
                                <td style="width: 13%;">{{VpPhone}}</td>
                                <td style="width: 20%;">{{VpEmail}}</td>
                                <td style="width: 34%;">&nbsp;</td>
                            </tr>
                            <tr style="font-size: 12px;">
                                <td style="width: 11%; color: rgb(183, 183, 183);">Registrar</td>
                                <td style="width: 22%;">{{Registrar}}</td>
                                <td style="width: 13%;">{{RegistrarPhone}}</td>
                                <td style="width: 20%;">{{RegistrarEmail}}</td>
                                <td style="width: 34%;">{{RegistrarAddress}}</td>
                            </tr>
                        </tbody>
                    </table>
                </div>

                <div style="height: 8px; background-color: #FFFFFF;">&nbsp;</div>
                <div style="background-color: #FFFFFF;">
                    <table style="width: 100%;">
                        <tbody>
                            <tr style="font-size: 12px; color: rgb(183, 183, 183); text-decoration: underline;">
                                <td style="width: 30%; text-decoration: underline;">Name / Address</td>
                                <td style="width: 10%; text-align: center; text-decoration: underline;">Position(s)</td>
                                <td style="width: 30%; text-decoration: underline;">Email / Primary Phone / Secondary Phone</td>
                                <td style="width: 10%; text-decoration: underline;">Member to</td>
                                <td style="width: 10%; text-decoration: underline;">SG Paid</td>
                                <td style="width: 10%; text-decoration: underline;">Check No.</td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <!--                </td>-->
                <!--            </tr>-->
                <!--        </tbody>-->
                <!--    </table>-->
                <!--</div>-->

            </div>



            <div>
                <div class="fiveReportHelper">{{#_Each GroupedRecords}}</div>
                <div style="background-color: {{#if (IsEvenRow MemberSeq)}}#EFEFEF{{else}}#FFFFFF{{/if}};">
                    <table style="width: 100%;">
                        <tbody>
                            <tr style="font-size: 12px;">
                                <td style="width: 30%;"><strong>{{MemberSeq}} {{MemberName}}</strong></td>
                                <td style="width: 10%; text-align: center; font-size: 10px;">{{Position}}</td>
                                <td style="width: 30%;" colspan="2">{{MemberEmail}}</td>
                                <td style="width: 10%;">
                                    <div style="color: {{#if (IsDuesPastDue ValidTo)}}blue{{else}}black{{/if}};">
                                        {{USDate ValidTo}}
                                    </div>
                                </td>
                                <td style="width: 10%;">
                                    <div style="color: {{#if (IsSGFeePastDue Paid)}}blue{{else}}black{{/if}};">
                                        {{USDate Paid}}
                                    </div>
                                </td>
                                <td style="width: 10%;">{{CkNo}}</td>
                            </tr>
                            <tr style="font-size: 12px;">
                                <td style="width: 30%;">{{MemberAddress}}</td>
                                <td style="width: 10%;"><br></td>
                                <td style="width: 15%;">{{PrimaryPhone}}<span style="color: rgb(17, 85, 204);"> {{PrimaryPhoneType}}</span></td>
                                <td style="width: 15%;">{{SecondaryPhone}}<span style="color: rgb(17, 85, 204);"> {{SecondaryPhoneType}}</span></td>
                                <td style="width: 10%;"><br></td>
                                <td style="width: 10%;"><br></td>
                                <td style="width: 10%;"><br></td>
                            </tr>
                        </tbody>
                    </table>
                </div>


                <!--<div style="height: 10px;">&nbsp;</div>-->

                <div class="fiveReportHelper">{{/_Each}}</div>

                <div class="fiveGroupByFooter">
                    <div>Group By Footer {{GroupName}}</div>
                </div>
                <div class="fiveReportHelper">{{/_Each}}</div>
                <div class="fiveGroupByFinal">
                    <div>Group By Final rqStudyGroupRoster</div>
                </div>

        {{/_GroupBy}}</div>
</div>
</div>

Thanks!

Thanks Vin! This seems to have solved this issue AND the other issue with data being truncated. I really appreciate it. I think I have another small issue with the header. Please see the snippet below. It seems the logo area is causing the entire header table to have issues. The “Meets: xxxxx” line should be right below the “Category: xxxxx” line.

Could this be an issue with the table itself being expanded vertically because of the logo?

I believe I properly tweaked the template code to have the logo indented slightly from the top and left. Yay! But is there a proper way to define the table so the logo itself doesn’t cause the table rows to expand? This is really 2 questions I guess:

Is the table cell and its width, height and row-span correct?
Is there a way to define the cell size and/or the logo image itself so it only fills a finite cell without expanding it?

Thanks again!!!

UPDATE:
I believe I fixed the missing week number in the header. But this brings up another question:

I already know how to use IF in css style, but don’t know how to do it in a field display itself. Please consider this snippet:

<tr style="height: 3mm;">
    <!--<td style="width: 18%; text-align: left;"><br></td>-->
    <td style="width: 64%; text-align: center; font-size: 14px;"><span style="color: rgb(102, 102, 102);">Meets: </span><span>{{DayOfWeek}}</span><span style="color: rgb(102, 102, 102);"> of Week </span><span>{{Weeks}}</span></td>
    <td style="width: 17.5%; text-align: right; font-size: 12px;"><span>{{MemberCount}}</span><span style="color: rgb(102, 102, 102);"> members of </span><span>{{MaxMembers}}</span><span style="color: rgb(102, 102, 102);"> Max</span></td>
    <td style="width: .5%;"><br></td>
</tr>

Since the Weeks field is text, and may include “1” or “1, 2”, etc., how do I change the first td element where it says “of week” to say “of weeks” in case the Weeks field contains multiple week numbers?

I could use length(Weeks) or I could insert another boolean field in the query called MultipleWeeks, which would be false if Weeks=“” or Weeks=“1” and true if Weeks=“1, 3” or another combination.

Still need to know how to construct the IF statement around the “s” of “of Weeks”.

Any ideas?

I appreciate you folks reading my posts.

Since the documentation isn’t extremely verbose, I was unaware of using the root option. I guess I should always use that, right?

Also, in addition to the above questions, could you explain the changes you made in the grouping and looping commands, so I know how to do this myself for other reports?