Custom CSHTML Report Page Creation

Possible Custom Page Locations

Root\UI\Web Sites\EmpowerID.Web\EmpowerID.Web.PortableAreas.Common\Views\CustomViews\Authenticated

Root\UI\Web Sites\EmpowerID.Web\EmpowerID.Web.PortableAreas.Common\Views\Reports

Root\UI\Web Sites\EmpowerID.Web\EmpowerID.Web.PortableAreas.Common\Views\ObjectTypeSearch

 

Grids not inline on a page but loaded as partials should be created here

Root\UI\Web Sites\EmpowerID.Web\EmpowerID.Web.PortableAreas.Common\Views\ViewOne

and Loaded Like this as tabs

<div data-bind="eidTab: { Title: '@EidResx("ApprovalFlowPoliciesGrid", true)', Url: '@Url.Action("LoadPartial", "ViewOne", new { area = "Common", partial = "ApprovalFlowPoliciesGrid" } )' }"></div>

and loaded like this when used on ViewOne pages

@{ Html.RenderPartial("Accordion", new LocalizedDataModel() { Text = EidResx("RbacAssigneeAssignmentGridTargetassigneeGroup").ToString(), Value = Url.HashedAction("LoadPartial", "ViewOne", "Common", new { partial = "RbacAssigneeAssignmentGrid", TargetAssigneeID = Model.GetProperty("GroupGUID") }, removeArea: false) });                             }

 

Basic Page Skeleton

@{ Layout = "_Layout.cshtml"; ViewBag.UINounID = new Guid("ABB34C92-B418-4734-B5EE-F27D094008BF"); //ViewBag.SearchTitle = "Risk Management"; } @if (EidAuthenticationHandler.HasAccessToPage(new Guid("d0dd4ac2-e166-4d72-ba65-e841b2fd3319"))) { <div id="@ViewBag.UniqueID-tabstrip" data-bind="eidTabStrip: {}"> @if (EidAuthenticationHandler.HasAccessToPage(new Guid("db2c77de-600a-4ee8-9e3f-69f0381467bd"))) { <div data-bind="eidTab: { Title: '@EidResx("TabName", true)' }"></div> <div data-bind="eidTabPanel: {}"> <div data-bind='eidGrid: { IsImplicit: true, grid: { //Grid properties here } }'> //Columns here </div> } </div> } else { <div> <br> <br> <h1>@EidResx("AccessToPageDenied")</h1> </div> }

Header Section

Complex Header Example - Loading a Component to Retrieve a Property for Use as Parameter Value

Complex Header Example - isEditEnabled Property for Enabling Grid and URL for Create New

 

Load Tooltips Templates (Optional)

Typical Breadcrumb

Basic Search Template - One Defined Per Grid on Page or in CSHTML if Grid is not inline

Property on Grid Object that Specifies its Search Template

Wrap Tabs in HasAccess Checks

Grids Can Be Inline in the Page or Loaded from another CSHTML - Example Loading from a File

Example of Adding a Location Tree to a Grid (Add after last grid column)

Example of an Action Panel for Grid (Add after Location Tree Panel or last grid column)

 

Grid Columns and Formatters

Example Link to Viewone Page by GUID

Example Link to Viewone Page by ID (Int)

Examples of Grid Column Templates

Example of Usage of a Grid Column Template

Grid Column Formatter: DateTime

Grid Column Formatter: Force to String

Grid Column Formatter: CheckBox

Example of a Non-Sortable Column with a Template

Example of a Grid Column that Links to MyTasks

Add this to the header section

Example Grid Column with link to MyTasks Item

Example Grid Link to Old Workflow Tasks View One Page

Example Grid Column Formatter Changing a Number to a Text Value

 

Advanced Search Templates

Typically styled using fourcol, fourcol, fourcol last

On the Grid itself, specify only SearchTerms for simple search if the view has SearchTerms on it

Example of Advanced Search on a text field that is not a parameter

Example of Advanced Search on a Boolean field that is not a parameter

Example of Advanced Search on a Boolean field that is a parameter

Example Date Range Search on a Single Column that is not a Parameter

Example Date Range Search with Calculated Default Values

Autocomplete Search for Person Sending PersonGUID as a Parameter Value to Method

More Up to Date threecol Style Example Person Autocomplete with PersonGUID as a Parameter

AccountStoreGUID AutoComplete as a Parameter Example

Example Searching by an Enum Where the Component Doesn’t Have a View (Getall)

Non-Localized Example of Searching by location Tree as a Method Parameter

Another Location Tree Example

Example of Searching by OrgRole Tree as a Method Parameter

Example Searching by Business Role and Location (OROZ)

Example: Hard Coding a Default Value for a Search Field

Example: Loading a Default Search Field Value from a Resource System Config Setting

Add this line to the header code section to retrieve the value and does some parsing in this example

Example Usage of the Advanced Search Field

Example AutoComplete Where Method Has Large # of Parameters

ResourceSystem AutoComplete with Default Value Set to 1 = EmpowerID

Auto-Complete Example Where it Looks Like the Default Value is Being Passed into the Page (i.e. ViewBag)

Grids

Searcher Section Properties

DataSource Section

Example method with lots of parameters and the values can be passed into the page using the ViewBag

Report Options Settings

Creating Custom Pages Using the WF Studio Page Designer

See the following topic:

URL for Page Designer Pages - https://yourserver/UI/#common/pages/view/RBACViewID

 



Â