It would seem that the missing Duplicate link is a minor oversight. You can add the following to the grdMySaved grid.
<
If you are unable to edit the code, you can also manually edit the URL, changing the ID to DuplicateID. For example, after clicking on the edit link, the web browser address bar would look like http://localhost/SplendidCRM/Reports/edit.aspx?id=00000-0000-0000-0000000. Change it to http://localhost/SplendidCRM/Reports/edit.aspx?DuplicateID=00000-0000-0000-0000000 and when you save, a new report will be created. This DuplicateID tip works across all modules of SplendidCRM, but most modules provide a Duplicate button in their detail view.
On a similar note, we probably should allow you to select the "Current User" as one of the Assigned To. This is not easy to do, but it sounds very useful.
Also, it may be useful to note that the Role Management already gives you the ability to restrict records to only those that the logged-in user owns.
I set this up a few months ago. I will try to show how I did this but I am still on version 1.2 and have made quite a few edits to the Reports.EditView so my line numbers will mean nothing.
Change Reports.EditView Method lblFILTER_OPERATOR_BIND as follows (The two lines that are bold are the lines that I added):
private
{
lstFILTER_OPERATOR.DataSource =
lstFILTER_OPERATOR.Items.Clear();
sColumnName = arrColumn[1];
vwColumns.RowFilter =
lblFILTER_OPERATOR_TYPE.Text = sCsType.ToLower();
txtFILTER_SEARCH_DATA_TYPE.Value = sCsType.ToLower();
lstFILTER_OPERATOR.DataBind();
lstFILTER_OPERATOR.Items.Add(
lblFILTER_OPERATOR.Text = lstFILTER_OPERATOR.SelectedValue;
}
BindSearchText();
THEN you need to adjust BuildReportSql to handle this new type of filter.
you should be able to search for the following text within BuildReportSql:
foreach
within this control structure, get to switch statement sDATA_TYPE > case "string" > switch sOPERATOR > and add this as the last case statement for this switch:
case
string sDATA_FIELD_ADJUSTED = sDATA_FIELD.Substring(0, sDATA_FIELD.IndexOf(".")) + ".ASSIGNED_USER_ID";
sb.Append(" and " + sDATA_FIELD_ADJUSTED + " = " + sPARAMETER_NAME + ControlChars.CrLf);
rdl.AddQueryParameter(xQueryParameters, sPARAMETER_NAME, "Guid", Security.USER_ID.ToString());
break;
Hope that helps. If someone knows of a better way, please let me know.
I believe that I lift this edit out.
You must edit the file RdlUtil.cs method public void AddQueryParameter(XmlNode xQueryParameters, string sPARAMETER_NAME, string sDATA_TYPE, string sVALUE) to (again bold line is the edit):
public
xQueryParameters.AppendChild(xQueryParameter);
SetSingleNodeAttribute(xQueryParameter,
SetSingleNode(xQueryParameter,