Adding Automatic Filters to Crystal Reports Run Through the Infor CRM Web Client

Filed under “when did this get added”.

I just found that in the 8.3.09 Infor CRM system that the Crystal Report “Activities: Current Activities – Sample” when run through the web client acts differently then when run through the LAN client. In the web client it filters down the report to only show current user data, where in the LAN client it shows activities for any users.

I was digging into why this was happening for a client and found that in the Architect, under the Manage/Crystal Reports area, if you right click on a report and click Edit, there is a “new” field under the Execution tab called “Filter Conditions”. For this sample report there is XML markup in there to filter the report using a wildcard for the current user.

The XML markup looks like this:

<SLXReportConditions>
    <MainTable>ACTIVITY</MainTable>
    <SLXCondition>
        <ConditionType>Query</ConditionType>
        <Table>ACTIVITY</Table>
        <Field>USERID</Field>
        <Operator>Is</Operator>
        <Value>:UserID</Value>
        <DataType>STRING</DataType>
        <Connector>OR</Connector>
        <Tag></Tag>
        <FromRange />
        <ToRange />
    </SLXCondition>
    <SLXCondition>
        <ConditionType>Query</ConditionType>
        <Table>USER_ACTIVITY</Table>
        <Field>USERID</Field>
        <Operator>Is</Operator>
        <Value>:UserID</Value>
        <DataType>STRING</DataType>
        <Connector>AND</Connector>
        <Tag></Tag>
        <FromRange />
        <ToRange />
    </SLXCondition>
</SLXReportConditions>

Apparently adding markup here affects only the report running in the Web Client and not the LAN client. For the LAN you would use the When Open hook and a script wired up there, old school style.

In the Architect help file if you search “Example: Filter Conditions XML” you can see an example along with the topic “Report Properties”. Unfortunately zero other documentation can be found on this, but at least this report is an example of its use.

ABOUT THE AUTHOR

Kris Halsrud

Kris Halsrud is a Senior Analyst / Developer for Customer FX Corporation.

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) news and product updates!

You have Successfully Subscribed!