/// <summary> /// Handles the BookmarkNavigation event of the MyReportViewer control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="Microsoft.Reporting.WebForms.BookmarkNavigationEventArgs"/> instance containing the event data.</param> protected void MyReportViewer_BookmarkNavigation(object sender, BookmarkNavigationEventArgs e) { CatalogEntryDto dto = CatalogContext.Current.GetCatalogEntryDto(e.BookmarkId); if (dto.CatalogEntry.Count > 0) { e.Cancel = true; Response.Redirect(ManagementHelper.GetEntryUrl(dto.CatalogEntry[0].CatalogEntryId, dto.CatalogEntry[0].ClassTypeId)); } e.Cancel = true; }
protected void MyReportViewer_BookmarkNavigation(object sender, BookmarkNavigationEventArgs e) { string sqlMetaWhereClause = string.Format(@"META.TrackingNumber = '{0}'", e.BookmarkId); var purchaseOrder = GetOrdersByMetaField(sqlMetaWhereClause, 1).FirstOrDefault(); if (purchaseOrder != null) { e.Cancel = true; Response.Redirect("/Apps/Shell/Pages/ContentFrame.aspx?_a=Order&_v=PurchaseOrder-ObjectView&id=" + purchaseOrder.OrderGroupId); } e.Cancel = true; }