I'm designing a SSRS report in Visual Studio for use as a local report (so a SQL Server is not involved).
I have a table with customers/addresses that has the following columns:
AddressID
Firstname
Lastname
Street
Another table keeps orders and looks like this
OrderID
CustomerAddressID
ShopAddressID
So two columns from my order table link to datasets in the address table. I want to display both addresses in my report. The datasource for the report is a xsd dataset.
What's the best way to do this in SSRS? I'm pretty new to SSRS and kind of lost with the dataregions, lists, etc.
You should edit the source for the second dataset to include a parameterized query based on the first one. Something like:
SELECT * FROM other_table
WHERE CustomerAddressID = #adress
OR ShopAddressID = #address
Of course you should create the address parameter as report parameter(pointing to the first dataset)
Hope this makes sense.
Look at subreports.
To be a bit more specific, you need to define multiple data sources in your report that these other regions, tables, or whatever, obtain their data from. You then need callback handlers in your app that can provide that data for each datasource (quoting: "your application must handle the SubreportProcessing event of the LocalReport object.". The article explains this in detail.
Just curious (because I am going to through the same thing right now) - are you really designing SSRS reports (2008), or VS reports (2005)? Because the 2008 ReportViewer control cannot render SSRS 2008 reports ....
Related
Requirement: We are trying to build PowerBI report using SSAS Cube as a source.
Currently we already have the same report in SSRS which is using the same cube as source.
so we are upgrading to Power BI as per the user's need and the SSRS report will be decommissioned after successful implementation of this.
The SSAS cube also has some complex calculations (calculations tab of the Cube) which are used in the SSRS report.
There are many columns which have been hidden too but are called into the SSRS Dataset.
The current SSRS report dataset has an MDX query(including some of the hidden columns) which serves as the Main query for report (Matrix type report with row groups and column groups), along with other smaller datasets which supply values to parameters
The MDX query in the SSRS report has around 6 parameters(which user can choose the values from the SSRS parameters prompts)
We are trying to find all the possible ways so that we can build the report in PowerBI
Our findings and what we have tried so far :
1)We have tried live connection after unhiding the columns (only those ones which are called in the MDX query) but we could not perform any transformations or calculations due to Live connection limitation. We thought about creating possible calculations with in the Cube level but don't know if it would actually give us the desired results correctly which would match with existing SSRS report as a comparison.
2)We tried Import mode using the same MDX query which is used in SSRS report by supplying values to the parameters(for example we passed [Report ID].[Report ID].&['a specific City name'] replaced with [Report ID].[Report ID].Children, so that we get data for all the cities instead of just 1 city) but the results are coming out incorrect.
Please if someone can provide us a valid approach on the architecture part, it would be really helpful as it will help us to get started.
Please let me know if something is not clear, so I can add more to this
I have a bear of a problem here. The user wants a report that shows the earnings, deductions and liabilities (EDL) code of each employee or null/blank if an EDL code doesn't apply to that employee. I needed one row for each employee name and columns for each possible EDL code combination. I got that answer fixed from my previous question here:
Struggling with a dynamic pivot on multiple columns with one being concatenated
I ran into a problem where there are a potential 270 column headings (EDL code combination with "subj", "elig" or "amt" appended) but not every employee will have a value for every column and security settings lock me out of seeing 1 of the 3 payroll groups. This made my report very limited in that when I ran it I could only show on the Crystal Report the data for what columns I had at the time I created the Crystal Report. Well, the user who requested this report has access to payroll group 1 and if even one of those employees had an EDL code that I didn't have in my data when I created the Crystal Reports file then the report wasn't useful to the user. We figured a way for her to get the info she needed by her logging into SQL Server and executing the stored procedure and she did what she needed to do with the data.
Fast forwarding to today I have to create this as a report in SSRS or give detailed instructions on how she can do this in the future if need be since my contract is coming to an end. I'm not familiar with SSRS but I thought maybe that would meet her needs over Crystal Reports. However, I'm running into the same problem. When I add the stored procedure as a dataset (adding it in as text to execute, not clicking the stored procedure radio button) I only see the EDL codes from that particular query not all potential combinations. I need a way to maybe dynamically add columns to the SSRS report, does such a thing exist?
I have 5 reports that all have 2 parameters: startdate and enddate.
select * from table where date between startdate and enddate
This is a simplified version of what I have, but for this problem, it should work.
I need to have all of the tables in 1 compiled report and link all of their parameters. I think I might be approaching this problem incorrectly. First of all, the server that I'm publishing the report to is SQL Server 2008, not SQL Server 2008 R2, so I don't think I can use report parts (correct me if I'm wrong). Because of this, I thought that the best way to approach this would be to use subreports. I created a new report that will contain the other reports as subreports. In the subreport properties, I set startdate equal to:
=Parameters!startdate.Value
Startdate exists in the new final report and it has a default value. I did the same thing with enddate. However, when I run it, I get the error "One or more parameters were not specified for the subreport, 'Subreport', located at :/Subreport."
I'd really appreciate any help with this, and I apologize for the length of this post. I tried to find this online, but I couldn't, so I finally made an account so that I could ask this question.
Edit: I never found the solution to this problem, but I achieved the result I wanted by just copy and pasting the tables and adding the respective datasets to the main report.
First, you have to define startDate and endDate in your main report as well as all reports that will be used as a SubReport. I don't think you are mapping the paremeters. SSRS will not auto-map same named parameters.
Add a SubReport component from the toolbox onto your main report
Right click on the SubReport and select sub-report properties
Select the Parameters list view item from the left hand list view
NOTE : If the SubReport is contained in the same vs project as your main report you should see the available SubReport parameters.
Map the name of the SubReport parameter to the value of your main report's associated parameter.
I have a specific type report that I need to generate multiple copies of. What I want to do is pass a string of report IDs to SSRS and generate all of the individual reports (let call them subreports) with those IDs in one master report with each subreport on a new page. I've already tried making a subreport and placing it in a table with grouping. This worked the closest so far. It gave me all the pages I needed, but it generated the report for the first ID number over and over. Is there anyway to do this or am I gonna have to jump through a lot of hoops?
If you are passing the string of report IDs to a parameter on the master report, I think using a table and subreport should work. You'll need a way to split out the report IDs using a dataset on the master report and return them one per row (so you can pass each report ID individually to the subreport via the details row of the table).
I was going to recommend a table-valued parameter for this, but since they don't exist in SQL Server 2005 check out Arrays and Lists in SQL Server 2005 by Erland Sommarskog for a few other options.
I'm developing report in RS that show top N customers based on some criteria. It also allows to select number of customers and period of time.
Is it possible to do it by using report model? Thing that it seems to be difficult is how to pass parameters determined by user.
Another thing that in my oppinion is very disappointing is that i cannot use SQL query as dataset query, because it uses odd and elaborate XML. Although report model items seem to map its fields to query or table fields.
I m concerning using report models because i need to provide uniform data model (the same tables and fields) for more or less different database schemas.
It would be very nice if somebody would explain what can be done with report models and what can not.
Maybe what you're looking for is to use the result of a Stored Procedure as the data source for your report. You would need to define parameters at a Dataset level to pass to the SP
You can create report model based paramaterized filters through the query designer by adding a filter, drag the field you want to filter on into the filter area, then right click on it and select "Prompt". This will automatically create a report parameter which you can then edit via the parameter properties dialog to set the data type, allow multiple values, etc.