Restricting table row in SQL Reporting 2008 - sql

I need to restrict the number of rows in my tablix, and have the left overs go to another page and also be restricted to the same amount and so on....
So my sample dataset has 2 records, to test I added a Grouping Expression as described here http://msdn.microsoft.com/en-us/library/ms157328.aspx
=int((RowNumber(Nothing)-1)/1)
...and set page breaks
this worked successfully, with the first record displayed on its own page and subsequent record displayed on a new page...
Howver when I choose to restrict the no of records to 12 e.g.
=int((RowNumber(Nothing)-1)/12)
I'd expect to see those 2 records displayed on the first page, though i only see one of them...
Any thoughts? Thanks

Thought Id come back and let others know what I had done wrong here, it might help someone.
I was incorreclty applying the expression to the details row... you have to right click the details row then Click Add Group -> Parent Group and apply the expression there.

Related

How to group a text row in multiple data rows in Microsoft Report Builder

Basically I'd like to from this :
What I have
To this :
What I Want
Case in Orange are data that I pick up with an sql request while "This e-learning phase..." is just a plain text.
Does anybody knows how to do that ?
You could add a Parent Row Group and Group by the Information field.
Unfortunately, this would place the Information on the Left side of the table. Fortunately, there is a Layout Direction property for the table that can be switched from LTR to RTL so that the table is created from Right to Left instead of the default Left to Right.
This way the grouped information field on the right would only have one cell while there may be multiple Activities.
I'm not sure you'll be able to do this exactly how you want. This is because you cannot add rowgroup columns after non-grouped columns.
The only way you could get close is to not show the text if it's not the first row in the dataset (or rowgroup if the report is grouped somewhere)
You could use something like this in the Value expression.
=IIF(
ROWNUMBER("myDataSet_Namehere") =1,
"This e-learning phase must be completed before the start of the classroom part indicated below.",
Nothing
)
You could use a similar check to then set the vertical alignment property.
It looks like this...
The other option would be to move the test to the top of the table on it's own row in above the column headers, it would probably look neater..
Or you can wait for somebody else to come up with a better solution :)

My recordset returns only one record even though there are more one record in Microsoft Access

I am creating a form that loads all the information from the Activity_Table into the form. So basically when the user chooses the name of the Company from the Company_Name drop down, and selects the site from the Site_Name combo box, it is supposed to return the values from that site and put them into the form.
Basically one site can appear more than once in the Activity_Table. Yet, whenever the user selects the name of the site, it only returns one record. To make sure of this, I used the .Recordcount method to check how many records that will be retrieved.
So when you check the Activity table, the Site "Accra Mall - 630kva Gen 2 " appears 4 times, yet when you check the recordcount, it only says it appears Once. So because of this, I cannot move either forward or backwards to either the next or previous record.
To make sure that there was nothing wrong with my sql, I run the query in the Query Design and it produced all 4 records of "Accra Mall - 630kva Gen 2".
So there is nothing wrong with the sql statement. Can anyone help me out please?
This is when I choose the name of the site
We can see that it returns only One record here
Yet this is the amount of records it's supposed to produce(This was when I tried the sql code in the query design tab. It returns 4 records, Not 1). So the recordcount is supposed to be 4. Not One.
this is when I tried the sql to in the previous picture.
If I replicated your problem correctly then the answer is to set Data-Entry to no. Check your form properties. Under the data tab there is a data-entry property. set data-entry to no. From microsoft at https://support.microsoft.com/en-us/office/dataentry-property-f4236759-27f6-4fcd-abb0-4aa4acd8fe87 we get an explanation:
You can use the DataEntry property to specify whether a bound form opens to allow data entry only. The Data Entry property doesn't determine whether records can be added; it only determines whether existing records are displayed. Read/write Boolean.

Breaking the SSRS report depending on the Multi Value Parameter

I am working on a SSRS report with a Multi Value Parameter which contains list of names. I have written an expression for the title that works like "Result for SELECTED NAME". It also have an option of (Select All) which displays all the results with title as "Result for MULTIPLE NAME". It is working fine up to this part.
Now I have to modify the report like, If i select multiple values, the report should break into pages with each selected name on different page with title for that individual parameter value(name) as "Result for SELECTED NAME".
Please help me. Thank you.
You can place the entirety of your current report (excluding headers/footers) into a List object. I assume youa re returning the selected values from the parameter (like Manager Name) as part of your DataSet. Assuming this is the case
Create a new list
Insert the contents of your report into the rectangle of this List
Right click the List Row Header and Select Row Group -> Group Properties
Set the Group to Group on
=Fields!ManagerName.Value
This approach will take a simple table like this
And break it into a list like this
Then you can just set the Tablix Properties of the List to Add a Page Break After to checked
Hopefully this is helpful. If you have further questions on this then please let me know
I worked on it and found a way to make it happen. I first created the row group for Names. Then applied the page break for each instance option. Then deleted that group column (Only deleted column but not group). Then added that group in a static column on the top, and wrote an expressions to show that group itself as a title using concatenation.
But here I faced another problem, when there is no data for the selected name, the title row isn't displayed in the preview as it also a column in the table.

MS Access - Query bringing in "new record" row

I have a query that will be populating a form and then the form will allow the data set to be edited. The issue I am having is that the query is pulling the last row that is normally used to add a new record. This results in having a row that looks shows all fields as blank, but leaves one field with "null".
I played around with the query and was able to find a workaround by selecting "distinct" records, problem is that when you select with distinct, you cannot edit the data set. Is there any other way around this?
I can upload an example of the database if needed.
Thanks!
edit: picture to show the issue: https://imgbomb.com/i/?rO1sp

Linking index of two or more listboxes in VB.NET

I'm doing an project and there is an requirment that i haven't come up with the solution yet.
I'm asked to create a result storing system for a long jump competion. I have to create three listboxes to store attempt numbers, results (in metters) and the corresponding points to each results. However, i can only give them one textbox to enter the results, attempt numbers and points must be calculated automatically and each athlete must have 4 results.
There are two things i would like to ask you guys:
If the user has entered something wrong, he/she should be allowed to delete one or all results. And when a result is deleted, all attempt number and point related to that result should be deleted as well. Clearing all is fine with me but only delete one from the list is not really. So how can i solve this problem.
The listbox containing attempt numbers should be in order (1, 2, 3, and 4). I can make the listbox to generate those numbers if the user enters all results in numerical order. HOwever, the problem is that he/she can delete ramdomly selected item. If he/she deleted attempt number 3 for instance, the next result added should have the attempt 3 back instead of attempt 5. And the new added result should move to position between 2 and 4 rather staying at the bottom.
I hope you can understand what i'm trying to say. Sorry about my explaination, English is not my native language.
All of your ansers are appreciated
You could select the item to delete with the listbox, and then remove as Farhan Sabir has said. You could then force the user to re-enter the distance for the attempt they have just deleted as the next value.
If you only have one textbox to enter the results, you could use a label to indicate which attempt they are entering (set it to automatically change to the number of items in the list +1 after entering a ditance). This would Indicate to the user that they have to re-enter a deleted distance straight after they have deleted one. A messagebox could help prompt this as well.
I am not sure how you would change competitor, but you have not mentioned that at all within your question.
something like this ?
ListBox1.Items.Remove(ListBox1.SelectedItem)
I think when you got the index of the selected item (as Farhan Sabir suggestion above), you can delete the item of the other 2 listbox base on that index. Then you may try the listbox1.Items.Insert to insert the item to specific index of the listbox. however, i think you would have to ask the user the input of the attempt number along with the attempt result in order to add it back to the list with right order