SSRS: Excel-Rendering always created an empty Column - excel

I have a strange problem with the SSRS-Excel Renderer:
As soon as I create a Table, it can be empty, with more than one Column, at the most right column, an empty Excel-Column shows up:
In the example, I just putted a plain Table into the RDLC, added the hardcoded values 1 to 4, and you can see, there is the 'C`Column pretty small, but without any values anywhere in it.

As per my understanding this is possible only if Report width is greater than tablix width,
Just Make sure you have same width for both Report & Tablix, Report width is in pt but tablix Size.width in inch.. so use any conversion and set same width for both.
Roughly 1 inch= 72 pt

Related

Retrieve top 10 results from a data set by category

The data set I have is for example and the actual data will have upwards of 100 people. I need to retrieve the top 10 scores from each category in the picture below:
I think the answer is really quite simple.
In each of the corresponding cells, use the "large" forumla.
In cell for vertical 1 it would read large(column vertical, 1) - Returning the largest value in the set.
In cell for vertical 2 it would reage large(colum vertical, 2) - Returning the 2nd largest value in the set.

How do I limit the number of columns of a basic table field?

I have a basic table field.
I only need three columns but it displays more.
How do I limit it to three?
And how do I set the width of the columns?
If you have a 600 pixel wide field named "Data" with tab delimited data;
set the tabStops of field "Data" to "200,400,600"
will set the column widths. The last tab stop at 600 throws any content beyond the third column outside of the visible area of the field.
set the tabStops of fld "Data" to 100,0,150,0,0
will hide column 2 and 4, 5, 6, ..., n.
If you want to hide the column, set it's width to 0. If the last parameter is 0 then the rest of columns will be not visible, and it'll be missing vertical line of last visible column. If you want vertical line after last field, add additional 0 [set ... to 100,0,200,0,0]

How to resize the widget that hold a QTableView?

I have a QTableView inside a layout itself inside a Widget.
How I can set the Widget size after the call of tableView.resizeColumnsToContents() in order to have the same size of the table (and does not need a scrollbar )
Thanks
If I understand properly what you want is to adjust the horizontal size of the container widget to the size of the table contents (which is not necessarily the table size). The following method works for me with a small table of 20 rows and 3 columns:
ask the table model for the total number of columns (it should be returned by your implementation of the columnCount method)
ask the view for the width of every column using the columnWidth method and compute the total width of the columns
finally resize your container widget taking into account the total width of columns, the width of the table vertical header and the autoscroll margin
So the code would look like:
my_table_view.resizeColumnsToContents()
w = 0
for c in range(my_table_model.columnCount()):
w = w + my_table_view.columnWidth(c)
container_widget.resize(w + my_table_view.verticalHeader().width() + my_table_view.autoScrollMargin()*1.5, container_widget.size().height())
As I said, I'm assuming that you want to resize your widget horizontally.

How to draw a "Line with Markers" graph like this?

Please view this image (focus to red around area):
I cannot get it to work with the letters, but I can get it to work with numbers (=CODE(A1)-CODE("a")+1):
UPDATE after reading Jean-François's answer (but on another computer):
Added a second series just for the custom labels
Show data labels for the new series
Explicitly set the Y axis minimum at 0
Deleted the original X axis labels
Deleted the legend entry of the second series
A few more steps and we're there:
multiplied the X axis values by 10, to adjust granularity for positioning stuff
subtracted 5 for series1 values, to get the data in the middle between major tick marks
played with series2 values, to get the labels also in the middle between major tick marks
Here's an easier way.
Set up the data like this:
Select the first two columns (blue) and insert a column chart (zero value columns do not appear):
Select and copy third and fourth columns (red), select the chart, Paste Special as new series, check first column and first row boxes (it's added as another column):
Right click new column series, choose Change Series Chart Type, and select the XY with Lines style:
Right click XY series, choose Format Data Series, change to Primary Axis:

Setting column width in RTF

I have what I hope is a simple question !
I am generating a simple RTF table that is subsequently opened in MS Word. The table is generating fine but the column widths are a little small and causing some word wrapping (not what I want).
The RTF code I generate is for a two line, three column table and is of the form:
\trowd \trautofit1
\intbl
\cellx1
\cellx2
\cellx3
{a\cell b\cell c\cell }{\trowd \trautofit1
\intbl
\cellx1
\cellx2
\cellx3
\row}
\trowd \trautofit1
\intbl
\cellx1
\cellx2
\cellx3
{d\cell e\cell f\cell }{\trowd \trautofit1
\intbl
\cellx1
\cellx2
\cellx3
\row}
What do I need to add to set a column width ? I have tried altering the column width in word and then examining the output but it is a little obscure to say the least !
The control words you are looking for are \clwWidthN and \clftsWidthN
Microsoft RTF Specification v1.9.1:
- \clwWidthN
Preferred cell width. Overrides \trautofitN.
- \clftsWidthN
Units for \clwWidthN:
- 0 : Null. Ignore \clwWidthN in favor of \cellxN (Word 97 style of determining cell and row width).
- 1 : Auto, no preferred cell width, ignores \clwWidthN if present; \clwWidthN will generally not be written, giving precedence to row defaults.
- 2 : Percentage (in 50ths of a percent).
- 3 : Twips.
So, in your case, you could just use \clftsWidth1 (automatically set width) or set the preferred percentages yourself e.g. \clwWidth2\clwWidth2500 (2500 = 50%)
Auto width
\trowd \trautofit1
\intbl
\clftsWidth1\cellx1
\clftsWidth1\cellx2
\clftsWidth1\cellx3
{a\cell b\cell c\cell }
40% - 30% - 30%
\trowd \trautofit1
\intbl
\clftsWidth2\clwWidth2000\cellx1
\clftsWidth2\clwWidth1500\cellx2
\clftsWidth2\clwWidth1500\cellx3
{a\cell b\cell c\cell }
The problem is in that you have set very small width for column:
\cellx1
\cellx2
\cellx3
To set width for column in RTF there is a keyword '\cellxN', where N - is column width in twips.
15 twips is 1px.
So if you want to create a simple RTF table with 1 row and 3 columns, 100px each, use this syntax:
\trowd\cellx1500\cellx3000\cellx4500
\intbl A\cell B\cell C\cell\row
You will get a simple table by 300px, 3 columns - 100px each, with invisible borders.
Cheers,
Max
You need to either use cellx0, so that autofit tag applies, or explicity set the number to the number of twips from the left border. In your example, you use 1 2 and 3 which is explicity setting the column widths to be very skinny. For example, something like:
\cellx5125
\Cellx6000
\Cellx8000
Note that these numbers are offsets from the left margin.
If you are going to do any RTF, I highly recomend the RTF Pocket Guide from O'Rielly
Check this link
http://joseluisbz.wordpress.com/2014/04/26/working-rtf-html-css-and-script-files-with-my-own-packages-java-and-php/
you can to make your own file.
TblData = new RTFTable(4,4); //4 Columns, 4 Rows
TblData.setWideCols(1000); //Width of 2000 to put all columns
TblData.setWideCol(0,3000); //Width of 3000 to Column 0

Resources