tablesorter not sorting properly after changing table element using content editable widget - widget

I got tablesorter working fine.
Added the content editable widget and with a bit of fiddling, got that working too.
There is an odd anomaly tho'
If I edit an element and then sort, the element sorts as if it still had its initial value.
For example value AAA initially sorts to the top, but if it is changed to ZZZ and then I sort descending it doesn't appear with the Zs. If I then sort ascending, it is back at the top of the list above the Bs!
Any ideas?

Related

Dynamically changing the bound entity of a list box on a canvas

I'm wondering if anyone has come across this issue.
I have two radio buttons on a canvas app that I am attempting to control the values displayed within a list box.
RadioButtons.Items: ["SomeValueA","SomeValueB"]
The list box control should be getting reset whenever the value of the radio button changes.
UpdateContext({resetList: !resetList});
UpdateContext({resetList: !resetList});
Reset(lbListbox);
lbListbox.Reset: resetList
For the list box itself I have the following for Items:
Switch(
RadioButtons.Selected.Value,
"SomeValueA",
Sort(
EntityA.FieldName,
Descending
),
"SomeValueB",
Sort(
EntityB.'Some other field name',
Descending
)
)
The problem is when I select 'SomeValueA' the list box properly populates with the values from EntityA.FieldName but when I then select 'SomeValueB' from the radio buttons the list box blanks out with empty records. There appears to be items in the list box that I can scroll through and select but not see.
If I put two list boxes on the screen and set their Items event to the specific entity the values show up properly in both list boxes so I know the entity naming/field is correct.
I've tried it without the reset of the list box, I've tried it using collections made out of the entity records.
Has anyone come across this who maybe has a solution. I was going to try to put two list boxes on top of one another and either hide/show or bring to front the active list but that also doesn't want to work.
thanks!
(Received this post from another source, figured I might as well post back here as well)
Got this to work, but it was a bit finicky. The catch seemed to be giving the List a value-pairing table, instead of just a list of values.
First I collected the Option Sets from CDS, and added a column to indicate the source name, for reference. This could easily be combined into a single collection, and then filtered later but I was thinking simple.
ClearCollect(colOptionSet1,AddColumns(Choices('Ownership (Accounts)'),"appSource","Ownership"));
ClearCollect(colOptionSet2,AddColumns(Choices('Preferred Method of Contact (Accounts)'),"appSource","Preferred Method"));
Next added a Radio button identical to yours.
Then added a List control with Items equal to
If( Radio1.Selected.Value = "SomeValueA", colOptionSet1, Radio1.Selected.Value = "SomeValueB", colOptionSet2 )
You may need to use the right-side property pane to toggle between Value and "appSource" (from collections above), but this did allow me to toggle between two separate Option Set fields in a single list.
Patching/writing this back is gonna be another hurdle. 😝

SSRS pre-printed form second page format issue

I've not come across anything like I am looking for so either I'm either not asking the right questions (for which I will apologize for re-asking a question) or it's not been asked.
I'm working on a report to print header information onto pre-printed carbon copy forms on a continuous form feed impact printer. The form is two pages and the header for the second page only contains part of the information that the header on the first page has.
I have the first page header working fine. I played with using rectangles and it was printing on target on every other page. The problem comes in when I try to print the page two header.
The way I am formatting the headers is that I have a single cell tablix with a rectangle in the cell. I've measured out where the 11 fields belong for page one of the form and placed them on the form. This all works correctly. Below that, I've inserted a second rectangle with the add page break before property checked. In that rectangle I have two of the fields that are repeated one just above the other (field 1 and field 2). Field 1 is in exactly the same spot as it is on page one. Field 2 is higher and to the left of where it is positioned on page one. The report body has no margins. Positioning is all done directly through the elements themselves. Field 1 sits about 1/16 to 1/8 inch lower than it does on page 1 even when position top is set to 0 (and there is no page margin). I can position field 2 exactly where I want it to be however. If I have multiple forms print out, all the page ones are perfect and page 2 field 2 is spot on but page 2 field 1 is always too low.
I tried separating the rectangles but was unable to connect the dataset to the second rectangle.
Is there a better way to do this? Is there a setting I'm missing that is adding padding to the second rectangle? Any help is appreciated.
Not quite the answer that I was looking for but it nearly fixed the problem. It turns out that the field itself had padding on it. I'm not sure how as I copied and pasted it from the first page but it moved it up to a acceptable position. It is still a bit low but close enough that the requester is happy with it.

SSRS - Adding empty cells under a tablix to fill empty spaces on the page (if any)

I work with ssrs with a dynamic row data in matrix/tablix. There is possibility when I have more than one page (say it two pages) where the data just fill half of the second page and leave a blank space below (half page blank space on the second page). How is the way to fill this blank space with empty rows? (whether rendering empty rows in the tablix, or inserting background image, or anything. I don't have any solution yet as it is dynamic data with many possibilities of the blank space size on the page)
Unfortunately there aren't any settings in the reporter that support this behavior. There are however several workarounds you could use to get the wanted result.
[1]
You could determine the amount of rows that fit on the first page and on the second page, just in case you have items above the
table on the first page. Before you send the datasource to the
reporter count the total rows and check if it exceeds the first page.
Then calculate the number of rows missing to fill an entire second
page (or third/fourth... if you ever get more data). Finally you add
empty rows/objects at the end of your datasource, which will of cource
cause the pages to be filled to the end.
As was pointed out before, this solution is only possible when working
with fixed row heights. If certain columns can have multi-line cells
then these could be checked as well and taken in account when
calculating the number of rows being displayed on the page. This makes
it slightly more complicated but is still a valid solution if you can
predict which columns might be troublesome.
[2]
A second solution would be to hide the table borders and place the table inside a rectangle that spans the maximum size of the
page. The borders of this rectangle can be used to display the table
outer borders and columns can be displayed by adding lines inside the
rectangle. This will cause the columns to fill the last page of the
report automatically. Unfortunately this isn't a solution to display
horizontal grid lines.
[3]
A third approach is adding an extra table directly below your table
with the same size of columns. Using the same method as from the first
solution you could fill the second table to represent the empty rows.
You'll probably have the same issue as with the first solution when
dealing with multi-line rows though.
I believe solution [1] and [3] will offer the most exact solution, if you're willing to do the math. If you don't want any horizontal lines then I suggest using approach [2].
Using an image to overlay the borders is of course another option but then you'll have the same issues when dealing with the multi-line rows. If you plan on working with fixed row heights, where you leave space for multi-line cells then this is becomes a valid approach but so does solutions [1] and [3].
Update:
If you only need the filled pages for printing you could make sure you add enough empty rows to fill at least the entire last page, these may go to a new page (1 new page, not 2... you can use a simple calculated guess for this) and exclude the last page when printing.

How can I make a simple flow chart in SSRS?

I come to you with a question on how I can create a simple flow chart like in the pictures below in SSRS. I have a query that returns rows with events, and a date column that I can use to organize these events in chronological order.
I have it all basically set up but I am running into a design problem. I have a tablix with two columns in a group for the box+arrow combination, with column visibility set up to hide the arrow if it reaches the last event. What I would like to happen is for the boxes to reach the end of the page (the rightmost side of the page, and then come down a short distance below that row of boxes and continue on the same page (Ex. B). What it's doing is reaching the end of the side of the page, and breaking to the next page, effectively creating a bunch of pages with only one row of boxes on each page. (Ex. A)
Ex. A: What it does:
Ex. B: What I want it to do (accidentally forgot to include the arrow on the middle rightmost box in the picture, the second and third rows are just continuations of the first obviously):
I would almost call it row wrapping but it's not exactly the same. To bring the problem away from my specific flow chart design, I want to make tablix columns wrap down directly below the table (not the content inside the columns, the actual columns themselves).
I've done some reading on column groupings and interactive page size. I don't really understand the column grouping manipulation, especially when trying to apply it to my situation, and the interactive page size doesn't seem to be what I am looking for either. Any help on this would be really appreciated!
I suggest you use a multi-column layout, e.g.
http://nederveld.wordpress.com/2010/02/15/how-to-do-a-column-layout-in-sql-reporting-services/
Each of your Box + Arrow pairs would go into each cell.
I'm a bit confused about your arrow requirement, you might need to use an expression based on RowNumber to hide the arrow in the last column.

how to make a form designer

The Problem in Hand:
I want to make a form designer where user can drag and drop fields of different type and design the layout too, some what similar to wufoo form builder but here the layout is limited to single column whereas I want to make something where user can make the layout as they want.
I understand how to do in single column view, but could not understand how to achieve multiple column layout eg: row 1 there could be 3 elements, row 2 one element stretched to full length, row 3 there could be just 2 elements etc.
What I tried:
I have tried with jquery UI sortable to make a single column layout with using div where new elements can be dragged and repositioned.
Any suggestion on how to proceed further will be helpful
I have tried searching StackOverFlow and google but could not find any link on a similar topic. If anyone could point me to the same, it will be also helpful.
When you reorder elements on wufoo form builder, you can only drag'n'drop up or down. Remove that restriction and as soon as one element is dragged across a certain threshold, it "belongs" to the next column. If the "old" column was the first or last one and the line that the element was moved over was to the "outside" of the form, add a new column there, until the maximal number of columns is reached.
If the used drags the last element of a column into another column, remove the now empty column on element-drop.
You could also remove the dynamic adding/removing of columns and juist have a button ("remove column" & "add column") to do it by code.
An example for the dropping in another column can be found here: http://jqueryui.com/sortable/#connect-lists
Hope this helped!
Edit:
http://jqueryui.com/sortable/#portlets and http://jqueryui.com/sortable/#empty-lists also have elements that you could look into. Good luck! Sounds like a nice project. Can we see any progress or beta?