fiogf49gjkf0d I have done the same as per your suggestion. But it is not working fine. Can you please help where i am doing wrong? Let me explain all what i have done so far.
I have created a crystal report using the following three tables "Opportunity", "Account" "UserInfo" tables and created a field parameter to filter the opportunity based on the status (that will be prompted with description when running the report). Till this point, it is working fine.
When I have gone through some articles, I came to know how to display only the opportunities based on the logged user id. So i have started writing the above plug-in that i mentioned earlier. I have added it to the Report by the following steps.
1. By "right-click" on the report, click "Edit" option. It will open up Crystal Report Properties window. 2. In "General" Tab, under "Filtering" options, Main Table - "Opportunity" Table, Master User Field - "AccountManagerID" and Master Date Field - "CreatedDate". 3. Under "Execution" tab, "When Open" event - "Action" - "Action Script" is selected. "Argument" - the above mentioned plug-in is selected.
Plug-in after modification ----------------------
option explicit sub Main
Dim UserID As String
Set UserID = Application.BasicFunctions.CurrentUserID
With Application.BasicFunctions .ReportClearConditions .ReportAddCondition "Opportunity:AccountManagerID", "=", UserID , "string", ""
End With end sub
But it is not working fine after the above modifications also
Thanks
|