When creating a very simple report containing only a textbox, I am able to put an action to that textbox in SSRS to make the textbox clickable:
When previewing the report in the SSDT preview pane, the textbox is clickable as expected:
However, as soon as I upload the report to Sharepoint and view it in a browser, only the text inside the cell is clickable (instead of the entire cell):
Changing compatibility views, using different browsers doesn't change anything.
Is there any way to make the entire cell clickable when viewing my reports in Sharepoint (2013) too?
(Maybe a setting I'm missing with which to make the rendering of Sharepoint SSRS the same as SSDT or Report Viewer rendering?)
No, this is not possible in SSRS with text.
A possible work around, assuming the text is static, is to use an image in your cell and attach the action to the image.
Reason for this occurring:
On the web:
When reports are viewed on the web through SSRS in remote mode, they ultimately get converted to HTML. Textboxes get converted to a <div> tag. A textbox with an action gets rendered as a <div> tag containing an <a> tag. As a result, when viewed in the web, your browser interprets the text as regular hyperlink in a <div> instead of "textbox" object. Due to the implementation of <a> in HTML, only the text is actionable, not the entire box. This can be proven by rendering the report in your browser and inspecting the element.
One possible reason it works this way, is that in plain HTML (before v5) it isn't correct to put a complete DIV inside an anchor tag (see this discussion for more about that). Making the text inside an anchor-tag display like a block (via CSS) would be correct, but IE7 (the compatibility mode reports are rendered in by default) isn't that good at working with the CSS display: block statement :).
In SSDT:
In SSDT, the report is executing using the WinForms ReportViewer. What this means is that the Preview screen will also use WinForms controls to build the preview. As a result, a textbox in this case will be represented by the WinForms control TextBox object. This object's actionable area is not just the text but the entire bounds of the object.
Related
I have database where all documents were created by Lotus Notes client. Documents contain Rich text field with tabbed tables with text and attachments on every tab.
Now I want to show documents with XPages. But tabbed tables are not visible in XPages.
How can I display Rich text field with tabbed table in XPages?
The answer isn't as straight forwarded as you would like and involved some wizardry. There are several moving parts. The first is the quality of the RTF-HTML conversion. I superstrongly suggest you give Ben a call. In case he doesn't handle tabbed tables (which are a beast), these are the steps to get a solution (I hope the force Javascript is strong with you):
Familiarize yourself with the Table handling and rendering. To do so, open the RichText field on its own in the browser. The trick is the ?OpenField command as documented by Carl.
In that HTML you can click on the various tabs to show that content, look at the URL and the source to learn about the exact syntax (which AFAIK isn't documented - or the documentation is well hidden)
By now you should have an idea how to identify a tabbed table by its HTML markup. Try to construct a Dojo selector or a JQuery (whatever is your poison).
Now show your page without the RichText field, but place a placeholder <div id="RTPlaceholder" /> where you want to show your content (or place a dijit panel there).
Use an Ajax call to ?OpenField to get the content. With your query expression you check for tabbed tables - if none there, just render the content
If you found a tabbed table, you construct a dijit tabbed table (or a UI framework of your choice equivalent) and make one call per tab to fill them. Some clever queries are needed (you don't want the surrounding table, but only tab-label and content).
That's the general direction. So Step 1: a little chat with Ben. As usual the devil is in the details, so you need to be brave.
Memento bene:
RichText > HTML => false;
HTML > RichText => false;
HMTL != RichText => true;
Let us know how it goes!
I'm looking to find a way to hide the whole Content Search webpart (including the webpart title and border area) if there are no results coming back from the query.
What I tried
There is this property: "ShouldHideControlWhenEmpty" but it doesn't do anything when there are no results. The webpart is still visible. Webpart has a the Title and the Border around it so when there are no results the title and the border show up with no results. Like I said I want to hide the whole thing in that case.
Wrote a jQuery script that searches for the text "There are no results" message (which comes from the webpart when there are no results) and hides the webpart. However, there is a short flicker once the page loads because the webpart first gets rendered for a split second and then disappears by virtue of my jQuery script - which is not great UI experience.
So I thought I could extend the OOTB ContentBySearchWebPart and get a hold of some kind property that would get me the result count. If the results count is 0 simply I would hide the webpart server side. I looked at the documentation online - nothing I could find that I could leverage.
Help? Thanks!
The option 2 using jquery would be fine, but just flip the approach you are doing now. Instead of hiding the webpart if its empty , make the webpart hidden by default, and visible only when content is available. Here is the approach.
Add a Content Editor / Script Editor webpart with CSS code that hides(remember just mark display none / visible false, dont remove) the Content Search Webpart by default. Place the styling code above the Content search webpart to ensure when the page loads the Content search Webpart is not visible.
During pageload check if the Content search webpart contains result , if the webpart contains result , then make the webpart visible. Here you will search for the text "There are no results" message, if its present you do nothing , else you make the webpart visible as it means there are search results available.
This way you will eliminate the Flicking problem with the current approach.
limit number of characters entered in cognos search and select prompt
`The below script works for text box.
<script>
// The ASDF here comes from the Name property of the prompt
var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() :
document.forms["formWarpRequest"]);
fW._textEditBoxASDF.maxLength = 3;
</script>`
I need a similiar piece of code to work with Search and select prompt.
I don't have cognos in front of me but let me tell you how i did stuff like this with Javascript. Please read entirely as there are several approaches.
Put a uniquely named/id DIV tag around your native Cognos select and search prompt(The one your typing in. This will make it easy to reference with Java's dom model for the next steps. We will eventually make this default search prompt invisible/hidden but for now keep it visible until the following steps are coded/debugged.
Create an HTML control in the simliar style as the native Select and search with the proper max-length settings that you want. Use the text box on change event to update the native Cognos select and search prompt. for debugging troubleshooting i find it handy to have javascript alert the DIV innerHTML so you can see whats under the hood with the Cognos control. Sometimes i uses this innerHTML as the starting point for my "Cloned/Shadow" HTML prompt that i have control over.
Once you have your new HTML control effectively changing the Cognos control you can make it invisible.
On complex dashboards/scorecarding i wrote routines to clone cognos prompts and expose their HTML so i could create my own control that would quietly manipulate the actual hidden controls. This gave me complete control over presentation and functionality.
There are many variations on this once you have the controls innerhtml like replacing the innerHTML with one of your own immediately after the page loads that has the restrictions on length. Or simply seeing if you can massage the property learning from the innerhtml.
In Cognos 8.4 and 10 there is a new method to dynamically add a method to a control to be called prior to any other methods. It is tricky but it is on IBM's web site. I may be more cleanly implemented in 10 and also IBM is not shy about showing off these solutions on their web site.
I am using the XPages Extension Library mobile controls to create a mobile web interface for an existing Notes app.
When displaying a document with a large number of fields I would like to use an accordion type UI so that parts of the page can be expanded or collapsed to show or hide the fields in each pane (similar to sections in a traditional Notes client app).
Having looked at the "Accordion Outline" in the Ext Lib demo app I started to build the page using the Outline control. Within each entry (node) of the Outline I, ideally, want to place a rounded list and then put my fields & controls inside that.
But it looks like the nodes in the Outline can't contain this type of content - unless I'm missing something?
Any suggestions as to which controls I can use this type of UI?
Thanks
You can any time use an xp:panel and assign it the dijit.accordeon (look up the exact name please) dojo type. Then you can put anything inside including repeat controls etc. I would guess it might make sense to build your own CC to hold the content for each accordeon panel
I need to be able to adjust the alignment of an image in an "Enhanced Rich Text Field" in an announcements list in MOSS 2007. However, the default content editor in the edit form for the list doesn't provide a way to do that. What's the fastest way for me to make sure users can align images? My first thought was to customize the DispForm.aspx and EditForm.aspx pages, but they just have the ListForm web part in the content region and as far as I know, you can't customize the ListForm web part from the designer.
You can't customize the LisForm web part, but you can add a "custom list form" to create a custom edit form. Maybe you haven't seen this article: http://weblogs.asp.net/jan/archive/2006/11/06/Custom-Edit-Forms-for-SharePoint-2007-Lists.aspx
Then you could do some javascript hackery to insert your own button which then calls something similar to existing RTE_InsertImage function to call a pop-up window and do whatever you need (you'll find this function in 12\template\layouts\1033\form.js)
I fail to see (or understand) your issue. I created a new announcements list, created a new item, inserted an image, aligned it to the right, viewed the item and it worked.
Then I proceeded to create a new custom column, choose multiple lines,enhanced rich text field, edited my list item, added an image, centered it, viewed and it was also working.
The only thing I noticed is that the "rich" control does not appears on non-IE browsers.