Is it possible to dynamically create SSRS tablix? I have a pretty complex requirement.
I have created tables in which I fill "metadata" for reports, i.e.:
column names
row names
row/column levels (parent/child)
font colours
font sizes
valid from/valid to attributes
translations
Then, I generate queries from this metadata, and join them on fact tables. So each query returns data as it should.
I generate data in levels, so you always know, in which level you're currently. So, you get data in the following form (I can change it, if that would ease creating of reports):
Row Text | Level 1 Text | Level 2 Text | Level 3 Text | Level 4 Text | Level 5 Text | Value
Basically, SSRS doesn't have to sum anything, it just shows the data. But here's where I get into trouble. I don't know, how to achieve a normal-looking report.
I have made 5 column groups (5 is the highest number of levels in any report), and every one is a child to previous one. Row groups get hidden based on the max level of current query, so if the query only has data on level 1, only 1 row is shown.
But here comes the tricky part. I have a report, that has data like this:
If some data is on level 5, and some on level 1 (others everywhere in between), the data on level 1 has 4 empty rows...
So, my report shows a lot of empty cells. Either that, or I show the same text for all 5 levels. Is there a smart way to address this issue? I can even change the whole concept, as I'm still early in development.
EDIT:
Here is one of the exact reports that has to be generated dynamically (it's a public template):
ssrs template
Related
I am trying to transform a report that I have made in sheets into the newest datastudio tool. In my sheet, I have a table where there are several columns that holds data related (this is because each row could have more than one value so I used the "split text into columns" function to represent).
What I have is something similar to:
ID
Component
Component 1
Component 2
101
wood
metal
gold
102
metal
copper
103
wood
gold
metal
In my excel, I have a formula to count the time a certain component is shown by using =COUNTIF(<range>,<string>)
Therefore, with the above formula, I have something similar to:
Component
count
wood
2
metal
3
copper
1
gold
2
I want to be able to build the same in datastudio. Turns out that since the components are divided into columns, I can only use one dimension and the result only shows the count of the first column.
I want to know if there is an easy way to accomplish this. My original data source is like this:
ID
Component
101
wood;metal;gold
102
meta;copper
103
wood;gold;metal
Maybe it's easier to work directly with the previous format but again, using the component in this case only counts for the first occurrence and not across the whole string.
For now, the only solution I can think of is splitting the text into rows instead of columns, but that is not feasible achievable using Google Sheets, or at least not that I am aware of.
Could somebody have an idea of how to accomplish this?
Thanks!
Edit
I am adding here the minimal reproducible example. This is the spreadsheet that I have (example) and the current report I am using so far (built-in sheets):
Now, I want to have the same report (plus more things) using datastudio. This is the report example I have in data studio. As you will see the record count for components is not accurate in DataStudio.
Here is a preliminary answer. I'll polish if we like it and delete it otherwise.
Consider the following sheet:
Range A2:B4 contains my data of interest. Rows 7:10 show the results I think you are looking for. The mechanism for creating this is the value of cell A6 which contains:
=ARRAYFORMULA(QUERY(FLATTEN(SPLIT(B2:B4,";")), "SELECT Col1, COUNT(Col1) WHERE Col1 is not null GROUP BY Col1"))
At the highest level, the formula splits each of the delimited text items into their own cell and then flattens all these cells into one column against which we then run a SQL query against the sheet to group and count them.
I am looking to build a report in SSRS that has 3 columns, similar to the data below.
The query behind the report returns a single row for every field in the 3 columns.
The report returns 20 rows for example, with 50 fields each pertaining to the elements outlined below.
However when I view the report I only see the first rows output. I need to create the elements in very particular positions and don't want to use tables and concatenate fields. I need a flat report 8.5 x 11 with elements in specific positions.
How do I fix the grouping so the report returns every row sent from the query.
There is no table, no groups. Only a single page with elements on it.
Please advise.
I am trying to create what I think is a simple access Database. Problem is that I am new to using access but familiar with programming and very familiar with working in Excel. I can technically and have already done the task in excel but what I really like about Access is the Forms. I would essentially like a user to use the form as they would my Excel document but since they would have limited control, there would be less room to mess up the process.
Anyways what I am trying to do is populate a field in a table with a number. However this number signifies a severity (e.g. 1 for low 10 for high). Each severity has a "map" or "gauge" that explains what the number means in severity (e.g. 1 - will not happen, 2 - rarely happens, 3 - sometimes happens, 4 - happens, 5 - always happens). What I would like to do is to have the user see from a dropdown list the number and associated severity meaning. Then what I would like to stay once selected is only the number.
Example case:
User wants to say that something sometimes happens. User clicks on the drop down list and sees this menu:
1 - will not happen
2 - rarely happens
3 - sometimes happens
4 - happens
5 - always happens
They click on the "3 - sometimes happens". Then what they see in the field that they have just edited "3".
I think this should be possible but I am unsure on how I would even go about this. I have only started with tables, I have not made queries or forms yet. I would eventually like the user to do this all on a form so that way they have limited access. For now I am simply trying to populate a table the way I think it should be made.
The best way to do something like this is to use a value list and then display two columns in the drop down but show only one in the combo box.
Step 1
Go to the Data tab of the properties. Set the combo box Row Source Type to Value List and then follow the below example for what to put into the Row Source:
1;"Will not happen";2;"Rarely";3;"Sometimes"; etc
Make sure the Bound Column is set to 1
Step 2
Then go to the Format tab and set the Column Count to 2. Set the Column Widths below it to 1,3 or whatever size suits your system the best.
If you want to use data from a table instead of a value list it's a simple matter of writing a query to select the two columns containing the number and info like below:
SELECT [Severity], [SeverityMessage] FROM TBL_SEVERITY
To use this simply replace Severity and SeverityMessage with the relevant column names in your table and TBL_SEVERITY with the name of the table. Then place this line into the Row Source and change Row Source Type to Table/Query
That should now be you set up with what you're looking for.
I'm not sure if this belongs here, so here goes.
My tsql stored procedure returns data like this, for 16 groups. This is just Group 1-3:
Group Hour Avg
1 4 99.800
1 3 96.800
1 2 100.000
1 1 99.800
1 0 100.000
2 4 97.700
2 3 99.800
2 2 98.800
2 1 99.800
2 0 99.800
3 4 99.800
3 3 97.900
3 2 99.900
3 1 100.000
3 0 99.800
Essentially, the data simply shows the Avg/hr for each group.
I need to display this graphically somehow, but I want to emphasize, at the hourly level, what group went below 99%.
From the data, we can see that Group 2/Hr 4 dropped below 99. Since there are 15 other groups, there's a possibility that for that hour, several other groups went below the 99%. But when the users see the graph/chart, they immediately know which groups went below the threshold.
So I was considering a line chart/area chart, but there are too many lines. Using SSRS, the line chart looks something like this:
So I'm looking for suggestions on how to simplify this. Granted, I can simply use a text-based report, but people here love graphs and charts.
Also, I want the graph to be historical, which means it will display the failed groups throughout the day.
We also have Kendo charts, that's why there's a tag for this.
I understand what you're trying to do, but you need to take into account assimilation of the data. You can make something as pretty and colorful as you want, but if it becomes a "Where's Waldo" hunt to find the key piece of data a user needs, then you've still failed.
With 16 groups, I would recommend staying away from all charts and graphs. Instead, I would use a table that has something graphics embedded in the cells. For instance, you could use sparklines or data bars for each group.
Additionally, you could look at using indicators inside your table.
Also, don't forget about dynamically changing text color, background colors, borders, font size, and borders to make certain groups pop. Your goal in designing a page should be to have progressively more complex displays draw the user's eyes from one part of the page to another. In doing this well, you can tell a story that is easily assimilated all while using a dynamic report. Actually mastering this skill is another issue entirely, but start working towards it, never settle for something being good enough, and before you know it, you'll have an eye-popping report.
I am new to Access programming and am trying to determine the correct way to bind unbound textbox controls for each row in a continuous form.
As an example:
Continuous Form to display a list of invoices from an Invoice table.
Table called InvoiceItems which contains equipment, rates and hours.
I need to have a form that has a row containing invoices with a column for all available equipment types.
I was planning on having unbound textboxes for each equipment type and then when each Invoice row is loaded, hook into something like an OnRowDataBound where I could dynamically populates the equipment textboxes with the appropriate data from the InvoiceItems table.
Example:
Tables:
Invoice: InvoiceID, Date
[1, 4/10/2011]
InvoiceItems: EquipmentID, Rate, Hours
[2, 40, 1]
[3, 20, 3]
Result:
InvoiceID | Date | Shovel | Plow | DumpTruck
==================================================
1 5/10/2011 3 1 0
2 2/11/2011 1 0 1
Then each textbox control would hook into the onDirty event to update the appropriate InvoiceItem line item.
You won't be able to do this in a continuous form or a datasheet view form since changing the ControlSource property on one row affects all rows.
It's unclear to my why you would even need this option but it sounds like your data/tables might not be designed properly or properly normalized. Usually I would build my tables so that EquipType is a value you can change to show what type of equipment this row is. It appears that somehow you are using different fields for each different equipment type.
Assuming that you insist on using your current design, you could possibly cobble together a solution using Union queries but your recordset will not be updateable.
Another suggestion is to make several different textboxes on your form and change the visible property on the fly. However, this is fraught with problems because you will only be showing one of them at a time on all rows. Furthermore, you'll have to show the correct one when they move to the next record but how are you going to determine which is the correct one to show?
Judging by what you've written, you must have experience programming in .Net. Access is a different beast and it works quite well if you play by its rules. Trying to get around some standard Access behavior or design will usually result in frustration for both the programmer and the user. I think this is a case where you will need to evaluate what you're trying to do and I recommend you start by making sure your table architecture is solid. Perhaps you've actually over-normalized and will need to go back and undo some of your normalization.