SSRS Detail members can only contain static inner members - matrix

I am developing an RDL in SSRS 2008 and am trying to move a subreport table directly into a main report so that I instead run this subreport in the same stored proc as my main report.
However, I'm having trouble hooking this up. I got the stored procedure to run successfully. But now when I try to copy this table into the main report I get the following error:
[rsInvalidDetailDataGrouping] The tablix 'table1' has a detail member with inner members. Detail members can only contain static inner members.
Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope
How can I do this?
I have tried moving the table into the group level and deleting the details grouping. I have removed sorting elements, etc. But the only way I got this error to disappear is to delete all of the groupings for this table and all textbox values.

If these are being returned from the same SP, then you should only have one Detail group (and one tablix).
The detail group (on your outer tablix) will be repeated once for each row returned by your dataset. A tablix contained within that row for the same dataset doesn't make sense: what would it repeat?
It sounds like you need to combine your two tablixes into one, not nest one in the other.
The easiest approach is probably to add a group to the parent tablix which will take the place of the former detail group. It will probably group by whatever field you joined to your old subreport dataset (or something similar.)
Then put your old subreport fields in the detail rows.

I was getting this error when building a report in VS2015 SSRS14.
A restart of Visual studio cleared the error.

In my case, a simple table report, Tablix4 was giving an error. This is because Tablix1 had a Rectangle as a child, and the Rectangle had Tablix4 as a child. Replacing Tablix1 with Tablix4 solved the problem.
<Tablix Name="Tablix1">
<TablixBody>
<TablixColumns>
<TablixColumn>
<Width>16.51cm</Width>
</TablixColumn>
</TablixColumns>
<TablixRows>
<TablixRow>
<Height>2.38745cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Rectangle Name="Rectangle1">
<ReportItems>
<Tablix Name="Tablix4">

Related

SSRS Static fields in groups

Good afternoon!
I have created a report with the wizard to create a matrix that is grouped and has drill down rows. I have added filters to the rows and columns and it works great! I then copied that matrix and modified the filters, so I had two matrixes.
But what I really wanted was those two rows in the same matrix, just in different row groups. So I added another group, using the adjacent below option, and then added all the child groupings. However, when I run the report it shows the values for the first row of the drill down data.
When I look at the groupings I can see the one I did manually has a 'Static' field in each row grouping but the ones that the wizard did (with the red ?), they don't have that "extra" row:
What do I need to change or how do I need to add my groups so that I don't get that "static" row and not show the data? I have the visibility set to 'Hidden' and the toggle set up for the prior grouping set data.
Assuming a few things....
the data comes from a single dataset
You are differentiating between Property and Violent crimes by filtering on a column, I'll call it IncidentGroup for the sake of illustration..
I've understood your question ! :)
Get to the point where you had just a single tablix filtered to show 'Property crime'.
Now remove or edit that filter so it shows all the data you need in the report.
Finally, right click on your Matrix1_IncidentCategory row and add a parent group, choose IncidentGroup (or whatever the column is actually called) and check the box to add a group header.
That should be it, there is no need for a second tablix.
Without knowing how you are filtering currently it's hard to give a complete answer but this should get you close, if not all the way there.
If this doesn't work for whatever reason, please post sample data from your dataset output and your current filters.

Can I use a list to repeat two tablixes on a report page?

See image below. Warehouse and Customer are dropdown lists populated via query. Year is a text field. The two tables display data from datasets driven by the report parameters. Is there a way to repeat the two tables based on each member of the Customer dropdown? Preferbly with a pagebreak after the 2nd table.
I normally do this using subreports. You could either create a single subreport that contains both tables or individual subreports. The individual approach might help with page breaks etc so that's the way I'd go.
Step 1: Create a report for your first table.
As you don't state what each table does, I'll make some up for the sake of illustration.
The key is to create a subreport that displays just the info you need in a single table. So in your case this might mean we only need to pass in a single parameter, CustomerID. You might need to pass in more such as Warehouse but I don't know...
In my made up scenario, let's assume the report shows customer contacts so we create a subreport (let's call it subCustomerConacts). It has a single parameter pCustomerID and a single dataset dsCustomerContacts. The query might looks something like SELECT * FROM CustomerContacts WHERE CustomerID = #pCustomerID. Add whatever tables/textbox etc you need to display your data.
Test this subreport works by manually typing in a CustomerID
Step 2: Create a report for your second table.
Do exactly the same again, creating a new subreport. Let call this subCustomerOrders. Repeat as above until you end up with another report that can display order details (or whatever you need).
Finally, create you main report.
This is basically what you have described in you question in terms of parameters etc.
Now to add this bit that will call you subreports.
Create a dataset (let's call it dsCustomerLoop) that contains each customer from your parameter something like SELECT DISTINCT CustomerID FROM myCustomers WHERE CustomerID IN (#myCustomerParameter)
Add a table to your report, 1 column wide and stretch it so it's wide enough to accommodate you subreports.
Set the dataset to point to dsCustomerLoop
Right-Click the cell in the detail row and do "Insert Row -> Inside Group - Below". You should not have two detail rows.
Next, right click the top detail row and do "Insert -> Subreport"
Right-Click the newly inserted subreport control and choose "properties".
Choose your first SubReport form the drop-down list
Click parameters on the left,
Click "Add" and select the CusomterID parmeter, set it's value to the CustomerID field.
Repeat this process on the seconds row, choosing your seconds subreport.
You may want to also add a 3rd row to the table, you could insert a rectangle into this with page breaks set to force a new page after each seconds subreport.
That's It. When the report runs it will produce two rows per customer, each row containing a subreport.
I hope this is clear enough, I've rushed through it a bit but if anything is unclear, let me know and I'll provide a clearer solution.

Crystal Report Groups Duplicate My Values

I'm trying create two groups from two different tables. I choose create new crystal report (As A blank report) then i create two groups like following images:
Then I'm choosing the table. I'm doing this once again with another table i want.
My Crystal report design look like this:
Now my Result is this:
But I want to take this result:(This result is painted)
Maybe it looks like easy for you, but i need a helping hand for solving this.
I choosed link options(Full inner join)
In Design Form
The grouping functionality within Crystal maintains the data relationship and makes it easier to read by not repeating the group text for each line item - if you group by "A", you will see all items, including the "group 2 duplicates" so long as they are in group A. Adding a second group will further refine the subset of results.
This is the intended and expected behavior for Crystal - SQL-level grouping is different and is used for aggregate functions, among other things.
If you are trying to create a multi-column report, look at this
Can I make a two column Crystal Report? - Under Section Expert, go to Details and click the box "format with Multiple Columns", then click Layout at the top and enter the detail size, in inches, as well as the gap between details. if you want your groups to continue in the additional columns, click the "Format groups with Multiple Column" checkbox.
If this does not satisfy your requirement, you may have to reevaluate the report requirements and the dataset limitations.

How to loop design in SSRS report

I have a report design that have been used for a while.
Now i want to create multiple pages of the same report looping with different records.
Is there any way to do this, to loop the design..
either looping it how to get the lookup-function to register as a valid function in an expression.
I use two datasets in the report
I started by making one tablix cell and putting the entire design into this one cell, which worked nice, except i have to use one tablix with "Dataset2" and it doesn't allow me to do this because if they are nested, the inner scope has to use the same dataset as the outer scope.
The report designer can't recognize the "lookup" function which i try to put in a expression of this tablix, and using a subreport for such a small task seems like too much.
Any ideas?
Here's a quick screenshot of what I'm working with:
Everything uses dataset1 except that one tablix that needs to be dataset2...
Heres a image of my lookup-function that gives an error:
ok i got this right.
If you want to loop a single page ssrs design put the whole design in a 1x1 tablix with grouping on whatever parameter you like.
If any part of your design use data from another dataset inside of this tablix, you have to use a sub report...
It isn't that much work, but to get the correct parameter in i actually had to make a report data provider and contract + design for the subreport(which just consisted of a single table) which was a pain in the ass. none the less it worked, and all is good.

Filtering Quotes by InventTable

I'm trying to build a report in AX 2009 (SP1, currently rollup 6) with a primary data source of the SalesQuotationLine table. Due to how our inventory is structured, I need to apply a filter that shows only certain categories of items (in this case, non-service items as defined in the InventTable). However, it seems that there is a problem in the link between the SalesQuotationLine and InventTable such that only two specific items will ever display.
We have tested this against the Sales Quotation Details screen as well, with the same results. Executing a query such as this:
...will only show quotes that have one of the specific items mentioned earlier. If we change the Item Type to something else (for example to Item), the result is an empty set. We are also getting this issue on one of our secondary test servers, which for all intents is a fresh install.
There doesn't seem to be any issues with the data mapping from the one table to the other, and we are not experiencing this issue with any other table set. Is this a real issue, or am I just missing something?
After analyzing the results from a SQL Profile run during the execution of the query, it seems the issue was a system bug. When selecting a table to join to the SalesQuotationLines, you have two options: 'Items' and 'Items (Item Number)'. Regardless of which table you select the query executes with, it joins the InventTable with the relation "SalesQuotationLines.ProjTransCode = InventTable.ItemId".
After comparing the table to other layers in the system, I found the following block of code removed from the createLine method (in the SYP layer):
if (this.ProjTransType == QuotationProjTransType::Item)
{
this.ProjTransCode = this.ItemId;
}
Since the ProjTransCode is no longer being populated, the join does not work except on certain quote lines that do have the ProjTransCode populated.
In addition, there is no directly defined relation to the InventTable - the link is only maintained via an Extended Data Type that is used on the SalesQuotationLine.ItemId field. Adding this relation in manually solved the problem.

Resources