Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
ReportCenter - example of a LIKE statement
Amanda_J_0204
I have a report that uses the following statement:
Global DateTimeVar Report_Range_Start;
Global DateTimeVar Report_Range_End;
{Reviewers_ALL_BE.TimeStamp} >= Report_Range_Start and
{Reviewers_ALL_BE.TimeStamp} <= Report_Range_End and
{Reviewers_ALL_BE.WorkflowName} in {?Workflow Names} and
{Reviewers_ALL_BE.TaskName} = "Webmaster Review" and (({Reviewers_ALL_BE.FilePath} like "*NewsAndEvents*") or ({Reviewers_ALL_BE.FilePath} like "*News*") or ({Reviewers_ALL_BE.FilePath} like "*Events*"))
The report previously ran fine; however, there were problems with how records were being stored in our WFEVENTSUMMARY table. Job descriptions, job owners, and other information in records was getting scrambled with data from other workflow tasks being submitted at the same time. We needed to modify iw-home/tsreport/conf/spring-config.xml according to a fix supplied by Autonomy. But now, after the fix has been applied, the report with the statement above does not work. We have another report that uses ALL BUT:
and (({Reviewers_ALL_BE.FilePath} like "*NewsAndEvents*") or ({Reviewers_ALL_BE.FilePath} like "*News*") or ({Reviewers_ALL_BE.FilePath} like "*Events*"))
And it works. Would anyone happen to have an example of a statment containing LIKE that is being used in a report?
Find more posts tagged with
Comments
Amanda_J_0204
UPDATE:
I've tried modifying a default out-of-the-box report - Completed Workflows, so that it pulls the information I need. So the info in the Select Expert is now:
Global DateTimeVar Report_Range_Start;
Global DateTimeVar Report_Range_End;
{WFEventsSummary.TimeStamp} >= Report_Range_Start and
{WFEventsSummary.TimeStamp} <= Report_Range_End and
{WFEventsSummary.TaskName} = "Webmaster Review" and (("News" in {WFEventsSummary.FilePath}) OR ("\PR\" in {WFEventsSummary.FilePath}))
This seemed to work - It pulled up 200+ records for April, which, as far as I knew, seemed appropriate.
However, when I run the report from May 1 to today, only two records are returned. These two records have the appropriate info in their file path. But when I look in the DB, there are many other workflows, for which there is one record with "Webmaster Review" as the TaskName and another record with the appropriate info in the filepath. So I'm guessing I need to be using a nested select statement in order to return the appropriate records, but every example I can find of a nested statement in Crystal Reports either requires an earlier version of Crystal Reports, or it requires an external SQL editor that was meant for CR version 9. Would anyone know of a qood resource that includes examples of nested statements?
Also, is there any kind of standard for which WFEVENTSSUMMARY records should be including the filepath? I've noticed the JobDescription (a required field) is missing from lots of our records (it's NULL in the DB), and I'm wondering if somehow the filepath has also mistakenly been removed.