Setting out SQL Server Report Services not in Gridview form - sql-server

I am trying to create a SQL Server Reporting Services report to display all the records in a table.
However I don't want it to be in gridview form as one of the fields is very long.
The only way I seem to make all the records display (and not just the last record) is to use a Table.
So this way all my fields are listed just like an excel table.
Is it possible to display it more like a C# Repeater?
The format would be something like this:
Name - Truck Number - Trailer Number
Notes
Name - Truck Number - Trailer Number
Notes
As opposed to
Name - Truck Number - Trailer Number - Notes

Right-click on the detail row handle on the far left (a grey box with three horizontal lines) and insert a row below. Put your Notes field in that inserted row.
You may want to merge some cells to have it take up the entire row. Highlight the cells you want to merge and use Merge Cells from the right-click menu or the main toolbar.
You may want to hide the Notes row if there are no notes for that entry. Click the row handle to select the row (if SSRS 2005) or right-click it and choose Row Group->Group Properties and go to the Visibility section (if SSRS 2008) and set the Visibility-Hidden property to something like:
=Fields!Notes.Value = Nothing

Related

Drill down SSRS: hide columns based on drill down in ssrs

Before drill down summary report:
After drill down :
I have tried this and not able to hide project Name column,it should show only when I drill down the human resource fields.
I can suggest an workaround for this. However ProjectName Column heading will not be visible in this case.
The following is the process.
1) Remove the column heading of ProjectName (only text keep column as it is).
2) Merge 1st and 2nd column headings and for the group as well.
Now it looks as follows in design mode:
It will show as no column visible for Project name but data is visible once we expand the group.
output will be shown as follows:

Render multiple pages in SSRS report into single page

I have a SSRS report to show values from a stored procedure in SQL Server Business Intelligence Studio. The stored procedure will return 120 rows, each row will be displayed as a table format in my report.
So now I have 120 pages, each page having one table equivalent to a row in the stored procedure. I want 4 tables on every single page, so that there should be 30 pages in the SSRS report, with each page having 4 tables that is 4 rows from the stored procedure.
I have added grouping and page breaks but it did not help. Can you please help me.?
Currently I have
Actually I want like this
Add this to the code of your report. Inside <Page></Page>.
It should be like this:
<Page>
<InteractiveHeight>0in</InteractiveHeight>
<InteractiveWidth>8.5in</InteractiveWidth>
</Page>
Change the InteractiveHeight value. You can notice that I just put 0in on it. That means, there will be no height limit. The report will just always show in just 1 page. Measure/Estimate the report's Height by inches to show only 4 tables per page of your report.
In case you're not familiar how to view the code of you report, Just follow the below steps.
1. Go to Solution Explorer.
2. Right Click the report.
3. Click View Code
you can change your proc to add a grouping column, and a table column, something like this
*group, table,row columns*
group1, table1,row1
group1, table2,row2
group1, table3,row3
group1, table4,row4
group2, table1,row5
group2, table2,row6
group2, table3,row7
group2, table4,row8
..
you will need some manipulating the sql to achieve this, but doable.
Then in your ssrs report, put a list object, the list will group on the group column defined above. Add 4 tables in 2 x 2 format into a rectangle object (rectangle is to keep the tables together), each table will have a filter (in properties) (table 1: table = table, table 2: table = table etc), then add the rectangle into the list. In the group properties of the list, check break between groups. Now your page will be based on the groups you defined. And each table in the same group(page) will only show data based on the filter.

Inserting a column at the end in a database diagram and repositioning existing columns

I like working on my schema directly within a database diagram. From there, you can set table properties, column properties, add columns, remove, etc. (in addition to, of course, being able to easily define relationships).
However, it doesn't seem to be possible to insert a column at the end of a table's columns or to reposition existing columns. I can insert a column by selecting an existing column and right-clicking > "Insert Column", but that column always appears above the selected column. When I do this and create the column, I cannot drag it to reposition the column despite the drag cursor appearing.
Is there a workaround?
I like to use database diagrams too. If you right click on the header of the table and select Table View -> Standard you will be presented with an editable grid which allows you to add a column to the end of the table.
I should also say that you can also use Table View -> Modify Custom to allow you to modify all attributes of a column such identity etc. Once you have done this you can use Table View -> Custom to be able to update these.
Step 1: User right click on table
Step 2: User left click on "Standard (menu item)"
Step 3: User left click
Step 4: User keyboard input to enter new column
Thank You

Creating a Batch Report

I am trying to create a batch report of multiple invoices using SSRS 2008 R2.
I have created the initial invoice report and have it set up with a parameter; the parameter uses an InvoiceID to populate the data within the invoice report.
I have created another report using lists, inside the list contains the information that was in my original invoice report but using a different parameter (BatchID). The problem I am running into with this is that instead of creating a single invoice for each invoiceID it is creating an invoice for each line item within each invoice. i.e.~ Instead of incorporating multiple items based on the InvoiceID (as the original report did) it is creating a report for each of the items.
What would be the best way of running a batch of these invoices? Am I going about this the wrong way or am I on the right track but missing something?
Thanks in advance!
SELECT i.InvoiceId, i.InvoiceNumber, i.BillTo_Line1, i.BillTo_Line2, i.BillTo_City, i.BillTo_StateOrProvince, i.BillTo_PostalCode, i.CustomerIdName,
i.ce_OutstandingBalance, i.ce_BillToDate, i.ce_BillFromDate, i.TotalAmount, id.ProductIdName, id.ce_customeridName, id.ce_CustomerProductName,
id.InvoiceDetailId, id.BaseAmount, id.PricePerUnit, id.ce_rate
FROM
Invoice AS i RIGHT OUTER JOIN
InvoiceDetail AS id ON i.InvoiceId = id.InvoiceId
Once I enter the invoiceID I get my report
My intent is to be able to run the report against multiple invoicesid numbers without having to select the invoice number itself. I have another table that collects the invoiceid's based on a batchid that they are run in.
So far I have attempted to create a subreport with the original report and Create a separate report that uses a list and attempt to group by InvoiceID for each batchid. Though with each of these I have so far been unsuccessful.
I am new to SSRS and have been pouring over documentation from MSDN about SSRS and the different abilities.
For this sort of repeating list, it's a matter of understanding how a list/grouping works.
Lists, Tables and Matrixes are all the same underlying object - the Tablix.
A List is a Tablix with one detail row (i.e. one Tablix row for each row in the Dataset), one textbox in that row, and a Rectangle in that textbox. The Rectangle can have various embedded elements like more textboxes and as such provides a repeating free-form item for each row in the Dataset.
You can see this when you create a List in the designer:
I assume your report query takes a BatchID and returns a number of invoices and their invoice details. I've taken some liberties with your data and created a simplified sample Dataset:
You want the Rectangle to repeat for every InvoiceNo. Currently the Row Group has no grouping item - change this to InvoiceNo under the Group properties and expand the Rectangle as required.
You can start adding in elements such as textboxes for the Invoice level items, something like:
Note that the left side of the Tablix has changed from lines to a bracket - this is because a grouping item was added to the Row Group.
This will repeat once for each InvoiceNo. Now we want to add the line items - you can do this by dragging a new Table into the Rectangle. Since we have a Row Group in place this table will only display items in that group:
When run for the sample data, this gives an ugly but functional repeating invoice report:
This could be tidied up as required, and page groups inserted between Group items in the Group properties as required.
Hopefully this at least gives you a rough idea of how you might go about your task.

Values not showing in Access form combo box

I have an application in Access 2003 that I am working on. In it, I have an employee table, which is connected to two other tables. The two connected tables are tables that hold a few fixed KeyWords. In my main employee table, I just have the ID from the other table, rather than having the whole word.
I wanted to make a form for entering data into these tables, so I made a query from the three tables that shows the all the regular fields of the employee table except instead of those two ID's, I showed the words themselves.
I then made the form and set the query as the RecordSource. The fields that have keywords are Combo boxes on my form, and their ControlSource is the keyword field from the query (like I mentioned earlier, the value can only be one keyword out of a list). Now, the problem I face is this: When I want to see a single record, it shows the correct value in the ComboBox, but when dropdown the menu, it doesnt show any of the other values.
What is the best way to do this? Am I doing this in the wrong way?
Thank you
I'd approach this slightly differently, set the combo box Row Sources to include both the id and text fields (you can hide the ID column if required by setting it's width to zero). Now add the ID fields to the employee query; you shouldn't need to join the other tables to the Employee table in this query, these fields are foreign keys and the combo boxes should show the text for you automatically. Set the form Record Source to this query, now set the combo box Control Source to the appropriate ID value from the form Record Source.
If you let the wizard build a form for you based on the Employee table you will see this approach in action.
ControlSource is the column name of the table where any user entry will be saved.
RowSource is where you type the name of the saved query or manual query typed directly into that field, which is used to provide a list of available drop down options for the combo box.
RowSourceType should be set to Table/Query, which is based on aforementioned RowSource method.
Now to correct the problem of only displaying what you begin to type (i.e. "Allow AutoCorrect" in Property Sheet > Other) or already have saved for that record without other options appearing after clicking the drop down is the following:
In Design View, click the combobox in question.
Property Sheet > Format > Column Count = set the desired number of columns to display in drop down.
Property Sheet > Format > Column Widths = set the desired width of column in the drop down.
Property Sheet > Format > List Width = set the desired width of the drop down itself.
Property Sheet > Data > Bound Column = set to the column of query table (i.e. 1 for ID and 2 for list options, if you only have two entries)
Note: If your desired drop down options are column two and not column one (makes things easier btw) then do the following change from above:
Property Sheet > Format > Column Count = set the desired number of columns to two.
Property Sheet > Format > Column Widths = add two entries 0",1" which means the ID field is not visible (0") and the options field is one-inch.
The easiest way to sort this out in the beginning is to view the column header names to know what you are looking at in the meantime by doing the following:
Property Sheet > Format > Column Heads = set to yes. At least you will know what is showing and whether or not you are on the right track.
I had this same issue in access 2016 and the issue was with my datatype. The combo box didnt accept 'Longtext' so i just changed datatype to 'shorttext' instead and all the values appeared.
You have set the query as the recordsource for the form. A form only shows (and ties to) ONE record at a time.
Since you want the combo box to show all the values, you should set the RecordSource of the ComboBox to your query.

Resources