Changing the tooltip dynamically for each record - oracle11g

In forms I have a block that contains name of tables.
The column is narrow so I want to add a tooltip that contains the value for each row.
I tried to put this code in post_query
:set_item_property('block1.value',tooltip_text, :block1.value);
but the tooltip always contains the last row's value and shows
it for all the rows. What could be the problem here?

set_item_instance_property is the ideal way to affect a column for just specific rows of data. But, tooltip_text is not available for setting via set_item_instance_property.
What you could do, though, is put your call to set_item_property into a when-new-record-instance trigger on the block. That way it should change the tooltip each time a new record becomes the focus.

Related

How to make a row in a grid not appear if it's value is 0?

I only have two fields in my grid. Just need the entire row to not appear, if the value in one of the fields is 0.
There are multiple solutions for your need, but this one is working for me in a similar setup.
Following code is in the PostBuild event of the component:
Local Rowset &rs;
&rs = GetLevel0()(1).GetRowset(Scroll.MainRecordOfTheGrid);
&rs.Flush();
&rs.Select(Record.MainRecordOfTheGrid, "WHERE FieldA<>0 and FieldB<>0");

RDLC report footer with value from "Current Record"

I don't know if its possible or not, but thought I'd ask. Many times reports need data grouping to have anchored to the bottom of the report some summary information, such as invoices. You don't want the totals shifting UPwards based on only 2 detail lines vs another with 20. I've tried working with using the Tablix bound to the data source for the output but couldn't get it quite right... It would either shift up, or force break and appear at top of following page.
So, if anyone has some ideas to help resolve that, that too would be great.
My second approach was to just use a simple report page footer. However, the overall "Report" page is not technically "BOUND" to any datasource. So, if I put a textbox in the footer and want it to show something, I can't pick "the most recent row from the datasource associated with the Tablix", it always requires an aggregate, such as
=First(Fields!SomeField.Value, "SomeDataSource" )
=Sum( ...
=Last( ...
etc...
I just want it to have whatever was the most recent... so I tried to use report variables to create one and was thinking to have it get updated per row being processed, so it always had whatever the "latest" value was and I could just dump that value at the bottom of the report.
Any suggestions to either would be great. Thanks.
I know this is an old question, but I had a very similar problem and came up with a unique solution. I had a statement that needed to have the payment slip print at the bottom of the page even if the statement line items wrapped over to another page. I solved it by:
Making all rows in the report a uniform height.
Calculating how many rows were required to fill the page (minus the height of my payment slip.
Getting the number of line items in the statement.
Calculating the remaining number of rows needed to push my payment slip to the bottom of the page.
Adding a sub-report with the calculated number of blank rows to pad out the necessary space between the line items and the payment slip.
The advantage of that approach was that I could generate bills for multiple customers, and since the padding is part of the group it would be customized for each customer's bill and bottom-justify the pay slip for each of them.
You can use a similar approach to push your "footer" info to the bottom of your page. Since it is still inside of your data group you'll have access to the data values you need as well.
In the footer you can refer to report item from report body, like this:
=ReportItems!myFooterValueTextBox.Value
The catch is that you can refer to only one report item in your footer, so you may need to add invisible footer row in your table and concatenate all your totals into one cell (myFooterValueTextBox) in that row:
=First(Fields!SomeField.Value, "SomeDataSource") + "|" +
Sum(...) + "|" + .... +
Last(...)
I used pipe as deliminator in my example, so then in the footer, I would split the string and place values in appropriate containers, like this:
=Split(ReportItems!myFooterValueTextBox.Value,"|")(0)

InfoPath Repeating Tables: Force all rows to have same value for one column

Does anyone know a way to have all the rows of one column of a repeating table to always have the same value?
Say the user changes the value in the first row for that column, then all the other cells in that column change to have the new value. (Preferably this will happen if a user changes any cell in the column, not just the one in the first row, but just the first row would be fine if that's all that's possible).
I have access to both InfoPath 2007 and InfoPath 2010 so can use either. The form submits data to and receives data from an SQL Server database. Code is fine if this requires it.
You basically want to change the field from a repeating field to just multiple copies of the same field (since you want it to always be the same there is no point in storing multiple versions).
On the data source tab, all the fields that you put in the repeating section are in a group folder with the little repeating icon on it. Right click on the field you want to be non repeating and choose move. Put it anywhere outside the repeating group folder (the encompassing folder is usually a good choice but it can be anywhere). The field on the design surface will now show a little info box that says "this item can't be repeated" (or similar).
Now you just have multiple copies of the same field - so if you change any one of them they will all update to reflect the value.

Edit first column of GridView

I've got very dynamic GridView and I need to allow to user to edit first column of it. After he edit first column of grid it must be updated on DataBase.
Is there any ways to handle it ?
My only idea is to put some changeable element to first cell of each Row so it must be able to set / get my values for each row but can't find yet any examples of it ...
Additional info :
GridView takes data from Object data source and all columns are dynamic (yes, maybe except first, but I add it in dynamic way) and load complete DataTable... \
Currently Using jQuery+Ajax methode on dynamic button but can't disable button's PostBack so with a PostBack it just disappears and dont make the event it must to make...
Since you have dymanic columns, for each column, specify the read-only property (If a column is read-only, it may only be looked at, and not edited when in the GridView's Edit-Mode).
So, the first column of would be readonly="false" (or omit it entirely) and the other columns read-only="true".

ASP.NET Datagrid - hiding a specific row/column

I am using a Datagrid with several columns of data (call it myDG) and one of these columns is a DateTime bound to a datasource. Its value is dependent on a "job" object completing a job and assigning the date time value. Since this normally takes up to a minute the value is left unassigned at the beginning.
The column's asp.net definition is:
<asp:boundcolumn
DataField="CompletedDate"
HeaderText="Date Completed"
DataFormatString="{0:dd-MMM-yyyy <br> hh:mm:ss tt}" />
So the functionality works fine when the "job" has completed and it sets the time. But before that, while the row is being displayed, it shows as
01-Jan-0001
12:00:00 AM
I am wanting to hide this and determined that the best way would be to mask that particular row and column with a blank, or override the value temporarily. I am having problems doing this and finding a way to access that specific row and column.
It is the [3] column of the datagrid and always in the first row (since new rows are added at the top).
Is there a way to directly access this cell and temporarily 'hide' its contents, or mask them? Ideally it would be great if there was a way to blank out all rows that had a value equal to this in their column, but a way to manipulate the specific cell would work as well.
-thanks in advance!
I would probably hook OnItemDataBound, check the value, and replace/reformat if required.
I asked a similar question about hiding columns here.
I had to use the RowCreated event to hide certain columns from the user (PK columns) and this may help you out as well (especially with hiding databound columns).
I have done similar things in the past and here is what I have done.
Bind the data to a column that is not visible at all. Add a visible column for the data you wish to display. At the time you populate your grid, loop through the records and for any that have a value that isn't 01-Jan-0001 12:00:00 AM, set your visible row to that value. If it does equal 01-Jan-0001 12:00:00 AM, then set the value of your visible row to an empty string or some value of your choice. (You could even set the text color to the same as the background color so it wouldn't appear to the user)

Resources