Bulk export of an SSRS report and include parameter in the file name - reporting-services

I have an SSRS report that takes a person as a parameter, then generates a report for that person. I want to run the report for a list of people, and I want to end up with one file per person, with their name in the file name.
For example, if I ran this report for Bill, Sue, and John, I'd like to see output like this:
Report-Bill.pdf
Report-Sue.pdf
Report-John.pdf
Is that possible within SSRS, or via an API?

Related

SSRS Printing sub report for each record

Is there a SSRS guru that can help me please?
I have a report that generates a tabular list of Claims as follows:
The dataset contains a single table and multiple records with a RecordID, Carnet Number and Claim Number. The RecordID is not shown on the report.
I then have a different report, lets call it "LETTER", that is in a letter format:
The LETTER report prints a letter containing information for a single Claim and its content is extracted from the database by using the RecordID.
I have added the LETTER report as a sub report and it is linked to the main report via the RecordID.
Requirment
The first report must generate as normal and list all the Claims in the dataset. The subreport LETTER must then generate for EVERY claim shown on the first report. Each LETTER must be on a seperate page as it will be printed on an official company letterhead. No direct printing to a printer is allowed which means the reports must be shown as a single report for the user. The default SSRS page navigation etc functions will be available.
Problem
The subreport LETTER must be generated for each RecordID. Currently it is only generating for the first RecordID.
How do I ensure that there is a LETTER for each claim that is listed?
Thank you in advance.
It sounds like you're going to need to add all of the elements of the letter into a list item and group by the RecordID field. I did something similar for a small report in the image below. Basically, add a list item and set the dataset to match your claims dataset in the Tablix Properties. Then, open the Group Properties, group on RecordID, navigate to the Page Breaks tab and add a page break between each instance of a group. This should produce a new letter for each RecordID.

SSRS-DT 2012 Report from 2 Data Sources

I'm learning to use SSRS-DT 2012
I need to write a report about assets.
DataSource 1 - View that contains a relationship between a hierarchy number code (AB123) and the name of the hierarchy (Accounting)
DataSource 2 - View that contains the data about the assets and the hierarchy number (AB123).
I'd like the report to contain the Hierarchy Name and the Asset details.
I think this is a Lookup, have been getting confused on how to write it b/c in SSRS-DT you write a query as a property of a dataset (If I'm wording that correctly) - I don't know how to write a query that involves 2 data sources.
Am I missing something?
Use this expression:
=lookup(Fields!HierarchyCode.Value,
Fiedls!HierachyCode.Value,Fields!AssetsDescr.Value,"DataSet2")
As example I have these datasets:
Maybe you want to use a tablix for show this report, so I've added one with this data arrangement.
First column has Descr field of my DataSet1, the expression at right is used to join it to my DataSet2 and return the value that corresponds.
This is my expression:
=lookup(Fields!Month.Value,Fields!Month.Value,Fields!Total.Value,"DataSet2")
Note tablix DatasetName property was set to DataSet1
This will preview the following tablix:
Using the lookup function I am getting the corresponding total value from DataSet2 for every Month in the DataSet1.
For more information check lookup

Email SSRS Report as Excel Attachment On Demand

I have the following request from a client for feature to add to an SSRS report. I'm not sure it's possible to do what he's asking for. I haven't been able to find a way to do this after many Google searches, so I'm asking here - here's what he wants:
We would like a button added below “View Report” to send the report as an excel attachment to the CT Logistics inbox(copied here).
We would like a box added so the PM can enter their name and be CC’d to the sent report email.
The subject line of the email should be the study number “C####” plus “initiation Supplies”.
As far as I can determine, there's no way to add a "Send Email" button as he requests, I can only have the report send email every time it runs. I have no clue how to add a box for someone to enter their name to be CC'd on an email - I don't even know if that's possible. As for the subject line, the study number is part of the data set for the report, so I could put it into a data-driven subscription, but I don't see a way to add an Excel attachment of the report using that method.
Can anyone point me to the way to fulfill the user's requests, or else confirm that what he's asking for can't be done? I'm using VS 2005 and SQL Server 2008 R2 (this is what we have at work, I can't update the versions).
Thanks!
I think the closest you'll be able to do is the Data-Driven Description to e-mail an Excel report at a given time with the subject and filename (if needed) that includes the study number.
It won't be on demand nor will it be CC'd to any additional people.
Now that I think about it, you could query a table for the person to be CC'd. The table could be populated before run time.
New idea - add a CC parameter to your report with the default as null. When the report is run the first time, it won;t do anything since the parameter is null. When your report is re-run with the parameter, your dataset query populates a table with the CC address and timestamp before running the regular query. Your data-driven subscription runs every 5 minutes and sees the new record in the table and fires using the CC field.
IF ISNULL(#CCPARAMETER, '') <> ''
INSERT INTO YourCCTable
VALUES (#CCPARAMETER, GETDATE() )
... <Your query>

Print description from Report Properties to report footer.

Is it possible to use the Description Field in the Report Properties and print that on the footer? I have looked and did not find anything.
You can I think but it is a lame answer. You need to deploy the report and then check the catalog table in the ReportServer database of what you just deployed. As far as I have ever read or tried the 'Globals' and 'ReportItems' do not contain it, yet the database does. EG:
Create a variable named ReportName and have it's default be
=Globals!ReportName
Ensure the parameter is set to 'Internal' as you don't want users to see it.
Create a data set to get the name and description of your report
SELECT Name, Description
FROM ReportServer.dbo.Catalog
WHERE Name = #ReportName
Drag and drop the 'Description' of the new dataset to your Report Footer.
You must first deploy the report for the item to be in the catalog as the database is what is on the hosted server. Not what you are working on in BIDS.

Parameter missing a value

I am new to reporting services and have a reporting services 2005 report that I am working on to use as a base report template for our organization. I am trying to place the date that the report was last modified on the report server into the page header of the report. However, I keep getting a 'ParamX' parameter is missing a value error when I try to This is what I have done:
Set up a Parameter ReportName with a default value of Globals!ReportName. It is also hidden and internal.
Set up a Dataset ReportHeader that calls a stored procedure that returns the date the report was last updated or another date, if the report is not on the report server. It has a parameter #ReportName assigned to the Parameter!ReportName.Value. The Dataset returns values when run on the dataset tab in the BI tool.
Set up a Parameter ReportVersion that has a default value Query From based on the dataset ReportHeader and picking the ModDate column. It is the last parameter in the report parameters list.
I assign a textbox to the parameter.
When I preview, I get "The 'ReportVersion' parameter is missing a value whether I place it in the report body or page header (which is where I want it). I have deleted and added the parameter again, toyed with the hidden and internal settings on it.
What does this error really mean, what I am missing, and can I even do this with parameters?
Thanks In Advance
Jim
If I understand what you're doing, it sounds like you want to be using a field where you're implementing a parameter...
You are returning the ModDate from the data source, correct? If you're doing this, you can simply throw a text box in there, and use something like this: =Fields!modDate.Value to display it.
Parameters are values that go in to the query, fields are what it returns.
Hope this helps...
EDIT:: OK so are you trying to retrieve the mod-date column value from the reportserver db? If that's what we're talking about, you'll need to add a few things to the report. Add a datasource to report db, a dataset containing the date (query below), a list object in the report linked to the dataset, and a textbox in said list object to display the field. If you hit the report server with a query like this:
SELECT MAX(ModifiedDate) AS ModDate FROM catalog WHERE name='myReportName'
That will return your modifieddate from the ReportSErvices Database as a field that you can use.