Hide row if it is not on the first page - reportviewer

I want to hide a row of a table if it is not rendered on the first page of a report. The table (tablix) is in the header nor in the footer area.
I have tried to set an expression for the RowVisibility-property, something like:
(hidden) =Globals!PageNumber<>1
however, this leads to an exception saying that the PageNumber can only be used from within the header or the footer area.
Is there a possibility to check (in an expression) if an element is located on the first page of a report?

Not a precise answer to my question, but maybe it helps someone with a similar issue:
For the tablix activate the repeat row header option
In the advance row group options, activate the option RepeatOnNewPage
For the rows that should not be shown on the next page, disable the option KeepWithGroup
I don't understand why I can not set RepeatOnNewPage only for some but not for all rows, but with the KeepWithGroup option, it seems to work like I desired.
If someone has a more precise answer to my original question, please post it. I will the change the accept to your answer!

Set this in the visibility property and the row will rendered or not depeding of the YourDatasetField value.
=IIF(True = Fields!YourDatasetField.Value, False, True)

Related

PageNumber / TotalPages on group header in report .rdlc

I have a .rdlc report where I have no header (I have group headers)
I want to put the PageNumber on the group header.
If I use Globals!PageNumber I get this error:
The Value expression for the textrun 'Textbox12.Paragraphs[0].TextRuns[3]' refers to the global variable PageNumber or TotalPages. These global variables can be used only in the page header and page footer
Is there any way I could do this?
If there is no possibility to put this data on a group header...is there any possibility of overlap a header with the group header on a same line?
Global variables can't be used outside of the header/footer, as there is no relationship between the header/footer and body areas. Therefore, there is no easy and precise way to display the page number in the body area.
However, as suggested by user Raymond-Lee in the second link, you can try to calculate it yourself by dividing a given row number by the total number of rows per page (and adding one if the page number will always be the first row). Nonetheless, this would take a bit of effort.
First you need to have the Page Header/Footer showing, then you can add items to it. To show it, right click in the pale yellow area of the Layout view. Then select Page Header and/or Page Footer, this will create another section on your report where you can add items. Or, you can go to the Report menu option and enable the Page Header/Footer from there.
link

selenium ide : click button with class on specific row in table

I have an html table wich contain multiple lines.
At the end of each line, the last row contain multiple button. I would like to click on the remove button of the first line.
I tried this Xpath code but the element in not located :
There is a mistake somewhere in my xpath query :
//table[#id='tableTest']/tbody/tr[8]/td[8]/a[#class="remove"]
Your query looks pretty OK, but there is no HTML code so we can just guess what happen. What about the number 8?
Try to use XPath axes. For example locator could look like this:
//table[#id='tableTest']/tbody/tr[1]/descendant::a[#class="remove"]
This should find the remove button in the 1st row whenewer it is.
Click the button of the first line... which I think you mean first row?
//table[#id='tableTest']/tbody/tr//a[#class="remove"]
That SHOULD find the first tr (row) of your table and select the href with the class remove. But it's not going to ensure it's the last cell, which if that's vital you'll need to use something like //table[#id='tableTest']/tbody/tr/td[last()]/a[#class="remove"]
Also, if you attach the html snippet this becomes much easier for many of us to answer.

BIRT result set values in specific cells

My query returns location_cd(string) and item_count(int). I only need certain rows from the result however and I need them to display in specific places in my layout so I don't think the table solution is going to work. Can I determine where I place the value for a particular row of the result set?
I am using a grid to display values for a number of fields. I cannot seem to be able to get the values from the results to show. The grid is bound to the result set. I even tried binding the cells to the result set but that didn't work either.
I checked in the query editor and there is a result set shown in the Preview so I know the query works. The complete and correct result set shows if I put a table on the page.
I tried inserting a Dynamic Text or Data object in a cell and used the expression:
dataSetRow["location_cd"]=="3SD"?dataSetRow["item_count"]:""
This returns a blank and does not seem to evaluate. I tested it with :
dataSetRow["location_cd"]=="3SD"?dataSetRow["item_count"]:"BLANK"
and got 'BLANK' to appear in that cell.
dataSetRow["location_cd"] and dataSetRow["item_count"] will display the location_cd and item_count from the first row of the result set. row.outer[] did the same thing. Obviously I am just hacking at this report at this point.
A co-worker suggested that she uses a JAVA if-statement in places like this but I could not get that to work either.
Any ideas or suggestions that will get me on the right road??
Thanks
An elegant option would be to use a HashMap storing the result of the dataset.
Declare a report variable named "values", with a new hashmap as default value (see image below)
Fill values in the onFetch script of the dataset: vars["values"].put(row["location_cd"],row["item_count"]);
Insert new data elements at any place of the report with expressions such: vars["values"].get("myFavoriteLocationCD");
Though it is important to note the dataset should be triggered by the report before these data elements.
The particular row you want to display you specify in a "Text" field inside your grid. Just drag and drop a "Text" field inside your grid. If you bound the fields you want to display to your grid, the "Text" field inside the grid inherits the bindings of its parent (the grid), so you can access the bindings automatically in the "Text" field.
You could try following steps, maybe that works.
Don't use "Dynamic Text" field, instead use a regular "Text" field
Ensure the fields of your query which you use, are bound to the grid (you sayed you already did)
Open the "Text" field
Change preselected pull-down entry "Auto" into "HTML"
Change preselected pull-down entry "Formatting" into "Dynamic Text"
Wrap your code in <value-of format="HTML"> your code goes here... </value-of>
Note: You should check in the "Expression Builder" of your "Text" field if you are able to access the fields you bound to the grid. If they are not available sth. went wrong with your binding. Avoid binding query records to cells this will drive you crazy.
If you want to display a list, ensure you didn't set a constant height in the row of your grid. Set the height to 100% than the row takes its height dynamically.
What about the idea to optimize your query, that only get the results you want are displayed, than you don’t need to filter them with java script? If you don’t need the filtered results in another place this would be the cleaner solution in my opinion.

SSRS Report Builder - Only Show Header On First Page (With Page Numbers)

So I am running into the problem where my report header is being displayed on every page, but I only want to display it on the first page. The solution that people on this forum have given is to just put the header in the main content. The problem with this is that my header shows the page number + total pages (i.e. Page 1 of 3 pages). I cannot move my header to the body because I will lose access the page numbers. For some reason, Report Builder will only allow you to have access to the page numbers via the header. Does anyone have any solution to this problem?
Write an expression to hide the textboxes that hold the header information.
The expression would look like this:
=iif(Globals!PageNumber = 1, FALSE, TRUE)
To get to the expression property:
right-click text box >> text box properties >> visibility >> select "Show or hide based on expression" >> insert expression above
cheers
I had the same issue, where I only wanted the header to show on the first page. The solution I came up with was to stick all of my objects from the header into a rectangle, so it was now acting as a container. I then placed that container into the body. In the report properties, in the code section, I borrowed from this post Access Page number in report body In SSRS to create functions, which would allow me to pull the page numbers into the body section. Then in my rectangle/container, I set the visibility property to =code.PageNumber>1. I hope this helps!
I did this, just to make it easier the two functions you want to add to the Report that were linked above are,...
Function PageNumber() As String
Return Me.Report.Globals!PageNumber
End Function
Function TotalPages() As String
Return Me.Report.Globals!TotalPages
End Function

Can we hide VB.NET first selection column?

I hope I state my problem correctly. Kindly please look at the screenclip below :'
I prefer that the first column shown above is not displayed. Is there any design/programmatic way of achieving this?
Thank you!
Edited :
Using this link http://www.andreavb.com/forum/viewtopic_7951.html, I am able to remove the triangle from the selection column
This is using a DataGridView I assume? Just use the visible property for the row headers.
dgv.RowHeadersVisible = false;
Alternatively, you can set it to false using the Properties window.