I have a very simple report that I have created in Visual Studio 2015 that only contains 2 columns.....The issue that I am having is that when I print this, I have several pages with lots of unused space(The columns aren't that wide), and I would like to cut my page count in half by having my table wrap on the same page.
For example, I currently have something like this.
And I would like to have both columns on one page, like this.
You can set Columns property of your report:
display Property window
click on Report (grey area outside your page)
set Columns property to 2
you can also set ColumnSpacing property to something different from 0
Then simply put your 2-columns Tablix in the Column 1.
Please note that to see the desired output you need to preview/print/export the report; normal view only display one column.
Related
I have an RDLC Report Table which retrieves data from a SQL Server.
I've embedded this report into an ASP.NET Web for (.aspx file) using the ReportViewer Control.
When I run the application the Data is retrieved from the SQL Server.
However, I need to have a column where the user has the ability to place a tick mark in the cells of that column.
Obviously I'm able to add a column to the Report itself in the .RDLC file but I'm not able to figure out how to get the tick mark for the user working.
Any ideas how this could be achieved?
Not 100% sure what you mean by:
Obviously I'm able to add a column to the Report itself in the .RDLC file but I'm not able to figure out how to get the tick mark for the user working.
I mean, we don't have a check box control for RDL reports.
And RDL seems to struggle with boolean values.
However, for given columns?
Add a column to the data source/query - cast the boolean column to number - it will still spit out 0 (false) and 1 (true).
Then in the RDL report, you have two choices:
You can add/drop in a check box image, and display it based on the value of the colum above.
But if you want a check box, and un-checked?
You can drop in a indicator. There are a few built in ones. Pick the one with a check box and a "x" for un-checked. it has a seperator also built in - remove that.
So, you get this:
So, using that indicator - 0 to 0, it will display the X, and for 1 to 1, the check box.
You get this effect:
So, it not sure if you ONLY want a check box for true rows, or you want a check box, and a un-check box as per above. You not limited to using a "indicator" on the report, but it for sure the easy road if you need both check and X.
You also are free to input a image, and only show it as true for the column in question that has true values. However, you can't stuff two images into a single column, so indicator becomes the better choice.
Edit: this is only for display - user can't change these while viewing report.
So to be clear, this gets you display, but does not get or give you ability to check or uncheck the boxes in the report.
If you need that ability I'm afraid you are out of luck.
You might be able to present data in a grid view or better yet a listview, allow users to check/ uncheck and then have a view report button.
This also suggests that the data has an extra column for this purpose.
I don't believe that rdl reports have this interactive ability
I have two reports the first one to show general information and the second one to show details and I need to show each one in a different page in report viewer
can you help me to do that
thanks
like the image
Hopefully, the following can help guide you into what you are looking for. First, you will need THREE reports and TWO datatables (or other lists as you have to build your report).
First, On the 3 reports I describe, I would not worry about any of the report final formatting to be perfectly aligned, bold, spacing... get it to work, then you can make it pretty after all is functional.
Next, create a bogus datatable "MyTable" for the sole purpose of creating two records. Even if a single column of "MyGroup" and having it as an int (just for sample purposes).
Now, create two records and set the values in each row to 1 and 2 respectively so your table has
MyGroup
1
2
Now, for the other two reports. It is my understanding that you want the first report to show a summary of each department's totals with a grand-total. The second report is showing the details of all the activity per department. So this is basically using the same dataset returned from whatever query. For this example, I will refer to the datatable as "SalesData".
CREATING THE REPORTS
Create your first report, put a table control on the report, full width you will have for your current reports as landscape or portrait as long as both the same size, you want this report to be the same. Ex: ALL will be portrait. Add your Report Data source to show the "MyTable" and assign that to the table control. Also add the "SalesData" table to the report as well so it is available to the future sub-reports.
On the table control, below where it shows the "Row Groups", add a "Group By" for the "MyGroup" column. This is so we can force a page-break between each group. Once added, right-click on the parent group "MyGroup" and select "Group Properties". This will show an option on the left side to allow you to set page breaks, click the checkbox for "Between each instance of a group". For now, just have the one column in the table control as the "MyGroup" column. Save the report ex: "MySalesRpt.rdlc". Then compile and run the report. You should get this simple report with 2 pages, each showing just the number 1 and 2 respectively. NOTE: You will also want to add the datatable reference for your secondary reports to this main report as well so they are available as sub-reports of the first.
Create a new report ex: "MySalesDetail.rdlc", add the "SalesData" to it. Add a table control to the report and set its source to the "SalesData" table. Include whatever for your detail columns you want to show of the sales activity. Add a data group based on the department, get your sum( salesDollarColumn ). Add a new row outside/below the group footer so you can have the report grand totals as a sum of all ex: SalesDollarColumn. You can test and run this report on its own until it looks correct.
Now, your third report. Copy/paste the MySalesDetail.rdlc report and change it to MySalesSummary.rdlc. So you don't this summary report showing every row that builds the grand total sum() per each department, right-click on the row that represents the details of the group and delete. It will ask if you want to delete rows and associated groups? Reply yes as it will just remove the details row, but keep the group footer that will retain your sum() total per department. Save, test / run this report.
Once all 3 reports work individually, now we can go back to the "MySalesRpt". Add an additional DETAIL row in this otherwise simple 1-detail report. Right-click on the existing detail row and then pick "Insert Row" -> "Inside Group - Below". This will now show as two rows.
Now, in the first row of the report where it did have just a simple textbox, go to your report Toolbox and pick Subreport and put one instance into each row.
On the first row, subreport, right-click and set properties. Set both the Name and "Use this report as a subreport" to the summary report "MySalesSummary". On the second row subreport, do the same but with "MySalesDetail".
Final step. Click on the Subreport representing the "MySalesSummary". Go to the properties of that and scroll down to the "Hidden" property. You want to have this value set to the expression: ex: "=Fields!MyGroup.Value = 2". This way the report will ONLY be generate when it is on the first record where MyGroup = 1.
Similarly, on the second subreport representing the detail, set the hidden equal to the opposite.. "=Fields!MyGroup.Value = 1". Hide when the MyGroup = 1. This way you can have each report on their own page, but only one will show up per group.
I know is sounds deep, but do it slowly and it should work for you. I already did and confirmed this process works. Sorry so many steps, but it has to be broken into multiple parts to tie them all together as you are requesting.
One rdlc in main local report and the other in subreport. Then set InteractiveSize in the main local report to break it to show each one in a different page in report viewer.
I have a problem regarding rdlc reports. I need 2 different reports whose contents are exactly same, they differ only in the number of columns. I want to make only one rdlc report for it. Then will hide some of the columns according to user input and will generate the report accordingly.
The problem is while exporting to PDF one report size is fine but the report with all columns breaks. Is this possible or I need to make 2 different rdlc reports?
Make your reportbody's ConsumeContainerWhitespace is set to True.
I hope your using visibility property to hide columns.
The page might be breaking because the table width with all columns might be exceeding the Entire Page Width.
Column width cannot be changed dynamically changed using Expression.
But if you are using tablix and the maximum number of columns is fixed
then you can create a workaround for it else if the columns are
dynamic i.e if your using Matrix then you cannot change column width
dynamically based on number of columns.
Please take a look at the screenshot below.
I am trying to create the page with a gridview. The number of column are so many. There are two issues that I am facing here.
1 ) I am using Databale js to provide paging, searching and other facilities. As shown in the screenshot due to large number of columns the search box and paging box are not getting applied on proper place.
2 ) If the column is having a large string , Is there any way we can achieve excel like facility. Where default the overflowed text is hidden and when we click on column to re size it can show the whole value. I am using colresizable plugin for re sizable columns but it is not working as expected.
IdeaSparks ASP.NET CoolControls will work for your problem.
Given a data set containing multiple rows, from within a .NET console application I need to generate a report on a single page for each row, sending those pages directly to the printer.
I am attempting to use Microsoft Report for this by attaching it to a data set and placing TextBoxes where I wish. Generating the report and sending it to the printer are not a problem. Unfortunately, the data only seems to be available in aggregates -- First, Sum, Last, Max, etc. I cannot latch the text box to a bare field.
Some poking around here and other sites seems to address this, but only when the data is presented in a table. One post even said without elaboration, "My mistake was using Text Boxes"
Am I using the wrong tool for what I am attempting to accomplish?
I ran into the same problem and managed to solve it. The solution seems a little convoluted to me so don't quote me on the "right" way to do this, but here is what I did:
Make sure you have a Dataset defined for your report.
Add a "Table" control to the report. This seems to be needed in order to iterate the rows in your Dataset.
Delete the header row and two of the default columns from the table so that you are left with a single row with a single column.
Expand the table to the width of your layout and make it as tall as you will need for your "free form" layout.
By default, there is a TextBox inside the table cell. Right-click the empty table cell and choose "delete" to remove that TextBox.
Drag a "Rectangle" control into the empty table cell. It seems to automatically "dock" to the width/height of the table cell.
Now you should be able to drag the fields from your DataSet (TextBoxes, etc) into the Rectangle to produce the desired layout.
Note that I am in the early stages of using this approach so I'm not sure if I am going to hit any walls... but for a basic report that uses TextBoxes and a page break after each "row" it seems to be working ok.
Or you try to use a list.
In the list you can arange textboxes (and other controls) as you want and they will be filled for each record in the recordset.
This work for me. :-)