What i'm trying to do here if modify the By lines to only show the author's name, which so far I have the following. I've crossed out the news paper names for privacy sake:
Global StringVar rawByline := {Story.extractedByline};
rawByline:=replace({Story.extractedByline}, "By ", "") ; rawByline:=replace(rawByline, "By ", "") ; rawByline:=replace(rawByline, "For the ", "") ; rawByline:=replace(rawByline, "FOR THE ", "") ; rawByline:=replace(rawByline, "XXXXXXXXXX XXXXXXX-XXXXXX", ""); rawByline:=replace(rawByline, "XXXXXXX-XXXXXX", ""); rawByline:=replace(rawByline, "XXXXXX XXXX XXXXXXXX", ""); rawByline:=replace(rawByline, "XXXXXX XXXXX", ""); rawByline:=replace(rawByline, "XXXXX XXXXXXXX", ""); rawByline:=replace(rawByline, "XXXXXX XXXXXXXXXXX", ""); rawByline:=replace(rawByline, "XXXXXXXXXX XXXXX XXXX", "");
This works fine, I an able to successfully clean up the line information, BUT the problem is some peoples names are in there multiple times i.e
Jim North The Review and By Jim North
So i'm getting these cleaned up, but getting multiple of the same names. What i want to do is count distinct names after my "clean up code" and group all the stories together from the multiple records of the same name.
After my code i want to be able to have "Jim North" only as one record, and getting sub reporting the records (stories) from "Jim North The Review" and "By Jim North" for instance.
I have my report using a subreport to have clickable links to personal reports for stories written by a reporter, so essentially what I want to do is make the multiple byline entries into one cleaned up name and group them together. I can't figure out the code.
Any help would be greatly appreciated!
|