RDLC autofill body of report - visual-studio-2013

I have a problem with RDLC report that I can not solve.
I have a Tablix with inside the data to display in the report.
The data within it are a list of products with the relative sizes, which are dynamic and vary from product to product.
So some products may have more or less sizes
This is my Tablix:
In this case, the product has many cuts and then the table is extended and reaches almost half report:
In this rather sizes are few and then only arrive at the beginning of the report:
How can I make sure that the table is properly sized and arrive always until the end of report?
This is the full report:

I think you should try something like:
Add empty columns to the Tablix so you can reach the end of the page
Set columns order visibility so that you have a fixed number of columns (20 columns max = 3 Columns with data + 17 without data for example)
Every columns should have a condition based on his number :
Column 1 condition:
=iif(YourMaxNumberOfColumnsWithData.Value > 1,true,false)
Column 2 condition:
=iif(YourMaxNumberOfColumnsWithData.Value > 2,true,false)
Column 3 condition:
=iif(YourMaxNumberOfColumnsWithData.Value > 3,true,false)
and so on...

Related

Oracle Reports (6i): Get difference of two items from two different queries (Multi Query Report)

I have an Oracle 6i report with Two Complex Queries (Q1 and Q2) connected by Data Link. The report was developed by some other developer who is not available now. Multiple columns are being displayed in report.
Q1 has a column Total_Issuance and Q2 has a column Total_Consumption. I have to display their difference on report. I am using a formula column to get the difference and then binding a display field to this formula column to show on report.
But since the formula column is outside both the queries, I am getting following errors.
REP-1517: Coloumn 'CF_1' references column 'Total_Issuance', which has incompatible frequency.
REP-1517: Coloumn 'CF_1' references column 'Total_Consumption', which has incompatible frequency.
Just like the formula column is outside both queries, create two additional summary columns (outside of both queries):
cs_tot_iss, which will sum total_issuance
cs_tot_con, which will sum total_consumption
Now modify formula column so that its source are newly created summary columns, e.g. let it
return :cs_tot_iss + :cs_tot_con;
As of paper layout: you don't have to display cs_tot_iss nor cs_tot_con (as you already have those values via total_issuance and total_consumption), just add formula column.
Create a new calculated field to the query that is the detail query (I asume it's Q2).
In this calculated field you can simply use:
return :Total_Issuance - :Total_Consumption;
to calculate the difference.

I have two tablix in ssrs report.I am using the same dataset for first tablix which shows details second shows

There are two tablix in ssrs report. I am using the same dataset for both tablix. First tablix which shows JOB details and $amnt BY Date (5 month worth of data) and second tablix shows records Grouped by Job and total of $amonts from tablix1.
Tablix 2 shows correct $Sum but for some records there are duplicate rows- if Tablix#1 has more than 1 $amnt.
Example Tablix1: ProjectABC - 1/1/2019 =$2 ; 1/5/2019=$5
ProjectHTG -1/1/2019 =$3
Exampl Tablix2: ProjectABC -$7
ProjectABC -$7
ProjectHTG -$3
how do i modify my expression "=sum(Fields!units.Value,"project2")"
to print "ProjectABC -$7" as one line?
Assuming that your field name if JOB for the project, you would add the field along with the dash to your current expression.
You should NOT group by amount if you want to SUM the amount. You are getting a separate line for each different amount for the same JOB. Only JOBs with the same amounts will be SUMmed as one.
=Fields!JOB.Value & " - " & sum(Fields!units.Value)
A few other issues:
Why are you using the Dataset name in your SUM? It sounds like you have a simple table that groups by JOB and Amount. The table is associated to the Dataset that you want to use. You should only use the dataset name in a table when you're referring to a different dataset than the table is using.
Why do you need two datasets if they have the same info? The second table can do the grouping and summing (and already is) from the same dataset as the first table.

Report Builder - Datediff between 2 columns

I have created a report with Report Builder 3.0 using columns groups.
The columns retrieve a datetime field. I would like to calculate the date difference between two columns.
For each individual the report should display 1 row and 2 columns. One of the columns can have null values. In this case, no calculation needs to be performed.
I cannot perform any calculation at the dataset level because I am using a stored procedure that I cannot modify.
I have tried to perform a calculation but the values are not correct. Moreover, the results are also changing if the Sort values change.
Random sort
Basically, I need to calculate the different between the 2 columns at the row level.
Any ideas?
Desired Output

SSRS - Create sparkline from a dataset with multiple fields in columns

I am trying to create a single sparkline from a dataset which contains multiple fields in different columns of tablix. To explain in details:
I have a tablix with 12 columns. Each column gets value from a different field in the dataset. It means that I have 12 fields in dataset and each goes to one of those 12 columns. The problem is, I am trying to create a sparkline in the 13 column for each row, however, when I create a sparkline it create 12 sparklines. However, I want one sparkline with field values from 1 to 12 months, one after the other.
I am stuck with this since 2 days. Can anyone help with this?
If processing time is not of an issue, try building a second data set and do a lookup for the sparkline.
Second, you may be able to un-pivot your data and use matrix to build sparkline.
Table on Top, Matrix below

How can I get the values in the Matrix on my SSRS report to repeat?

I know there must be a simple answer to this, but I can't find it.
I have added a couple of textboxes to a Matrix in a BIDS/SSRS report. I've given these textboxes values such as:
=Fields!WEEK1USAGE.Value
It works (after a fashion); when I run the report (either on the Preview tab, or on the Report Server site) I see the first corresponding data value on the report - but only one.
I would think that once a value has been assigned via expressions such as "=Fields!WEEK1USAGE.Value", each value would display (rows would automatically be added).
There must be some property on the Matrix or the textbox that specified this, but I can't see what it might be.
Here is how my report looks (very minimalistic, so far) in the Layout pane:
...and after running, on the Preview tab:
Obviously, I want the report to display as many rows as necessary, not just one. The textboxes do have a "RepeatWith" property, but there description doesn't sound interesting/useful/promising.
I don't see any property on the Matrix control that looks right, either.
I thought maybe the designer was only showing one row of values, and ran the report on the server, too, but there also it just shows the two values.
So what do I need to do to get all the data for a provided field?
Matrices are for display of grouped data and summary information, usually in a horizontally expanding pivot table type of format. Is a matrix really what you are after? Looking at your expression you have =Fields!Week1Usage.Value but in a matrix what I expect to see would be at least =Sum(Fields!Week1Usage.Value) or even better just =Sum(Fields!Usage.Value). Then you would have ProactDescription as your row group and the week as your column group and it would all just work out everything for you, grouping and summing by Proact vertically and expanding the weeks out horizontally.
What seems to be happening is that you have no grouping on rows or columns and no aggregation so it is falling back to the default display which is effectively the First function - it displays the first row of data and as far as the matrix is concerned it has done its job because there is no grouping.
Without knowing your problem or data, I'll make up a scenario that might be what you are doing and discuss how the matrix does the heavy lifting to solve that problem. Let's say you have usage data for multiple Proacts. Each time one is used you record the usage amount and the date and time it is used. It could be used multiple times per day but certainly multiple times in a week. So you might be able to get the times each Proact is used from a table like so:
SELECT ProactDescription, TimeUsed, Usage
FROM ProactUsage
ORDER BY ProactDescription, TimeUsed
In your report you want to show the total weekly usage for each Proact over multiple weeks. Something like this:
Proact Week1 Week2 Week3 ...
Description Usage Usage Usage ...
--------------------------------------------
Anise, Fennel 1 CT 20.00 22.50 16.35 ...
St John's Wort 15.20 33.90 28.25 ...
...
and so on. Using a dataset based on the SQL above we create a matrix and in the row group properties we group on =Fields!ProactDescription.Value and in the column group properties we group on a week expression like =DateDiff(DateInterval.Week, Fields!TimeUsed.Value, Today) and then in the intersection of the row and column we put =Sum(Fields!Usage.Value). To display the header of the column nicely put an expression like
="Week " & DateDiff(DateInterval.Week, Fields!TimeUsed.Value, Today)
The matrix automatically does all the summing by week and product and expands the weeks horizontally for as many as you are reporting. For bonus points you can also put totaling at the end of the columns and the rows to show the total use of that Proact for the period (row total) and total use of all Proacts in that week (column total).

Resources