Quantcast
Channel: SQLServerCentral » Reporting Services » Reporting Services » Latest topics
Viewing all 2791 articles
Browse latest View live

sign 2 reports

$
0
0
Hi,is possible to place 2 reports to be sent in the same signature, ie, in the same email

DO not Email When there's no Data with two datasets

$
0
0
Hi All,I have a report containing two tablixes from two datasets. A standard subscription was initially created on this report but I have noticed recently that it emails out even when the report does not contain any data. How do I stop this? I have read suggestions that this can only be achieved using a data driven subscription but am little bit confused on how to define the query that will drive this data driven subscription based on the fact that the report has two datasets in it. Any help will be appreciated.

SSRS Challenge: Toggle column visibility

$
0
0
Say I have a simple table in my database. it has just four columns:[code="sql"]foo, bar, foe, fum[/code]Say that the data is grouped on foo, and that column fum is a dollar amount I want to sum. Columns bar and foe have a 1x1 correspondence with column foo and are not grouped under foe (no sense in that, given the 1x1 correspondence). Further, say that I don't want to see columns bar and foe in the initial display. that is, when I run the report at first, I see just two columns:[code]foo fumabc $100.00[/code]What I want to do is set up the report so that, when presented with the initial view, I can click on an item in the foo column (e.g. 'abc') and [i]then[/i] see all four columns:[code]foo bar foe fumabc more stuff still more stuff $100.00[/code]In other words, I want columns bar and foe to be hidden in the report until I click on a item under foo, whereupon they would be revealed, then hidden again if I again click on foo. So, in essesnce, foo acts as a toggle for the visibility of columns bar and foe. I can't figure out how do to this. So....can it be done, and if so, how?

Select all parameter does not jump to another ssrs report

$
0
0
Hello,I am using SSRS 2005 I have three parameters 1st is "Month" 2nd is "Year" and the 3rd is "CompanyID". CompanyID has 5 different companies: NNA, NTB, NGB, NBA, NSS when I run the report the report comes out fine by company or when I press the Select All. Within the detail field I can click to different report (jump to report) it works fine providing I select one company I get the correct amount, but when I Select All companies I am only getting one company, which is not giving me the total amount from all companies. The detail report has the same three parameters. I just not getting the CompanyID parameters correct when I click on Select All. Can someone tell me what can I do to get the detail report having all the CompanyID and I want to print out all the companies on the report. I just getting one company when I click on the Select All. I would really appreciate someone helping me here. Thank you in advance.

SSRS - Sending Excel attachment & Body in same email

$
0
0
Hello ,please advise ,I have 2 data sets - 1st data set result email as in excel attachment -- Detail and 2nd as Summary as HTML in Body of the email -- Summary count of the 1st result sethow can we do this in SSRS ,currently I am using the 2 result sets in one excel and in 1 Email But i want send the email as Summary Dataset 2 redult in Body of the Email and result set 1 as Excel attachment .., Please advise .., thanks

Problem while trying to sum up a column

$
0
0
I have created a report (for sales Order as well as Purchase Order) which contain a lot of fields from many different tables. Every field has an expression in order to get the correct values in front of sales/purchase order e.g:iif(isNothing(Fields!VendorInvoiceAmount.Value), Fields!CustomerInvoiceAmount.Value, Fields!VendorInvoiceAmount.Value)The problem is if a vendor/customer have 2 different Invoices and different types of tax are applied on them.I have the following table (just 3-4 fields to make you understand).[b]SourceInvoiceNo - InvoiceAmount - SalesTaxAmount - Total[/b]INV-000001 ----- - ----- 1000 ----- - ------- 200 ------ - -------- 1200INV-000002 ----- - ----- 2000 ----- - ------- 100 ------ - -------- 2300INV-000002 ----- - ----- 2000 ----- - ------- 200 ------ - -------- 2300AP-0001 -------- - ------ 3000 ----- - ------- 100 ------ ---- ----- 3100[b]GRAND TOTAL-------------------------------------------------------8600[/b]Like in INV-000002 on the same invoice amount 2 different type of taxes are applied.the total should be 2000+100+200 = 2300. but here grand total is creating the problem.i tried to solve this but putting this expression in Total.Iif(Fields!SourceInvoiceNo.value = Previous(Fields!SourceInvoiceNo.value), 0 , iif(isNothing(Fields!VendorInvoiceAmount.Value), (Fields!CustomerInvoiceAmount.Value + Fields!SourceRegulateAmount), (Fields!VendorInvoiceAmount.Value + Fields!SourceRegulateAmount))Note: Source Regulate Amount is Sales Tax Amount.this gives the following output (which i wanted) but grand total is still the same.[b]SourceInvoiceNo - InvoiceAmount - SalesTaxAmount - Total[/b]INV-000001 ----- - ----- 1000 ----- - ------- 200 ------ - -------- 1200INV-000002 ----- - ----- 2000 ----- - ------- 100 ------ - -------- 2300INV-000002 ----- - ----- 2000 ----- - ------- 200 ------ - -------- 0AP-0001 -------- - ------ 3000 ----- - ------- 100 ------ ---- ----- 3100[b]GRAND TOTAL-------------------------------------------------------8600[/b]Grand total should be 6600.In grand total i have this expression.iif(isNothing(Fields!VendorInvoiceAmount.Value), (Fields!CustomerInvoiceAmount.Value + Fields!SourceRegulateAmount), (Fields!VendorInvoiceAmount.Value + Fields!SourceRegulateAmount)

Lookup with Twist

$
0
0
I have a different requirement here...I have two data sets .First one brings the Location , Department 2nd one brings in another table (Joined).I need to check if Devicename in Dataset2 is in Dataset1 and bring the EmpTenure from Dataset2.something like - =LOOKUP(Dataset1.DeviceName ,Datset2.deviceName,datset2.Emptenure,"Dataset2")This brings everything that matches but at the same time I also need the rows where DeviceName in 2 has no match for devicename in Datset 1 and bring the EmpTenure) I know it will be Null But thats the requirement.... So basicallyt I need both Devices that match from Dataset2 to Dataset1 and Devices that do not match...

Export to Excel

$
0
0
Hi All,we have an SSRS report which is developed on 2008R2 version. It has round 53 columns and it will generate 15,000 records. We are able to generate the report but when we try to export the report to excel, it is failing. Some times we are getting an error as attached and sometimes we are getting a blank screen after it is trying to download for sometime.Can you please let us know why we are not able to save the generated report?Thanks and Regards,Prasanna.

How to make tablix visible based on parameters in SSRS

$
0
0
I have a Report which has 3 parameters ABC,BBC,CBC and i have three tablix TAB1,TAB2,TAB3 .my requirement is toDisplay tablix TAB1 when parameter is set to ABC.Display TAB2 when parameter is set to BBC.display Tab3 when patrameter is set to CBC.what is the expression i need to write in visibility property of each tablix.Thanks in advance

How to connect to SAP HANA using SSRS Datasource

$
0
0
Hi,Can any one help.. how can i connect to SAP HANA using SSRS Datasource.Please guide me with Step by Step connection values.

SSRS Hash tag delimited table for export

$
0
0
Hi,I have created an export type as followed[code="other"]<Extension Name="HASH" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering"> <OverrideNames> <Name Language="en-US">Hash Tag (# Delimited Text File)</Name> </OverrideNames> <Configuration> <DeviceInfo> <FieldDelimiter xml:space="preserve">#</FieldDelimiter> <RecordDelimiter>#</RecordDelimiter> <UseFormattedValues>False</UseFormattedValues> <NoHeader>True</NoHeader> <SuppressLineBreaks>True</SuppressLineBreaks> <FileExtension>TXT</FileExtension> </DeviceInfo> </Configuration> </Extension>[/code]Now the problem resides in[code="plain"]<RecordDelimiter>#</RecordDelimiter>[/code]wich should allow to have a # char at the end of the record but this makes my report server crash when I try to export is as such.As usual Microsoft is being very vague abouit what to put between[code="plain"]<RecordDelimiter>&</RecordDelimiter>[/code]If I leave it out it works fine but that is not what I want.My lines should look like [code="plain"]xxx#yyyy#zzz#[/code] instead of [code="plain"]xxx#yyyy#zzz[/code]Any ideas ???Greetz

SSRS 2005 report: Cannot bulk load Operating system error code 5(Access is denied.)

$
0
0
I built a SSRS 2005 report, which calls a stored proc on SQL Server 2005. The proc contains following code: CREATE TABLE #promo (promo VARCHAR(1000)) BULK INSERT #promo FROM '\\aseposretail\c$z\promo_names.txt' WITH ( --FIELDTERMINATOR = '', ROWTERMINATOR = '' ) SELECT * from #promoIt's ok when I manually execute the proc in SSMS.When I try to run the report from BIDS I got following error:*Cannot bulk load because the file "\aseposretail\c$z\promo_names.txt" could not be opened. Operating system error code 5(Access is denied.).*Note: I have gooled a bit and saw many questions on this but they are not relevant because I [b]CAN [/b]run the code no problem in [b]SSMS[/b]. It's the SSRS having the issue. I am gussing it's related to the security of SSRS but know little about this.

SSL Certificate for SSRS

$
0
0
Hi, I need some help on getting an SSL certificate for SQL Server Reporting Services. I've been trying to get it working but I find that the certificates that I import into the certificate store do not have a private key and therefor will not bind in Reporting Services. I have scoured the Internet in every which way and to my surprise, there seems to be no up to date directions for requesting and loading a certificate for an encrypted connection in the modern (post IIS) SSRS. I have been using the below process to create a csr which the security team uses to create a certificate.Is the below process missing a step? If so what, if not, how do I bring the certificate that is issued to me into the certificate store so that it includes a private key?I just can't seem to grap the process in any of the available documentation. Appreciate any help.1. Open the management console (click Start > Search programs and files > mmc.msc).2. Open your Local Computer certificates (click File > Add/Remove Snap-in... > Certificates > Computer account > Next > Local computer > Finish).3. Select Certificates (Local Computer) > Personal > Certificates.4. With the Certificates folder for the Local Computer highlighted, click Action > All Tasks > Advanced Operations > Create Custom Request. This will open the Certificate Enrollment wizard.5. In the Certificate Enrollment wizard:6. On the Select Enrollment Policy screen, under Custom Request, select Proceed without enrollment policy and click Next.7. On the Custom request screen, for template, choose "(No template) Legacy key" from the drop-down menu, and leave "Suppress default extensions" unchecked.8. For Request format, select PKCS#10.9. Click Next.10. On the Certificate Enrollment screen, click Details, then click Properties. This will open a Certificate Properties dialog box.11. On the General tab, enter a Friendly name and Description for your certificate.12. On the Subject tab13. Select Common Name from the Type menu, enter your fully qualified DNS name for the value, and click "Add >".14. Optionally, add Subject Alternative name values, if you need them.15. On the Extensions tab16. Expand "Key usage" and add "Digital signature" to the selected options, and verify that "Make these key usages critical" is checked.17. Expand "Extended Key Usage (application policies)" and add "Server Authentication" and "Client Authentication" to the selected options, and verify that "Make the Extended Key Usage critical" is checked.18. On the Private Key tab19. Expand Cryptographic Service provider and uncheck "Microsoft Strong Cryptographic Provider (Signature)". 20. Check box for "Microsoft RSA Schannel Cryptographic Provider"21. Expand Key Options and select "2048" from the Key size drop-down menu.22. PK use: Exchange23. If you will need to export the certificate to use on another host, select "Make private key exportable".24. Click OK.25. On the Certificate Enrollment screen, click Next.26. Enter a file name for your CSR (e.g. certname.req), click Enter27. Select "Base 64" as the File Format.28. Click Finish.

Apparent Contradiction in SSRS Authentication

$
0
0
Hi,I think I've found an apparent contradiction in the SSRS authentication document for SQL Server 2012. Can anybody tell me whether I've misunderstood something or if this, indeed, is a mistake.On the RSReportServer Configuration File page (http://msdn.microsoft.com/en-us/library/ms157273.aspx), you get the following descriptions:[b]RSWindowsBasic[/b] - The server accepts Basic credentials and issues a [b]challenge/response when a connection is made without credentials[/b]. Basic authentication passes credentials in the HTTP requests in clear text. If you use Basic authentication, use SSL to encrypt network traffic to and from the report server. To view example configuration syntax for Basic authentication in Reporting Services.RSWindowsNTLM - The server accepts NTLM security tokens. If you remove this setting, browser support will be limited for some of the supported browser types.However on the Authentication with the Report Server page (http://msdn.microsoft.com/en-us/library/bb283249.aspx), you get the following:RSWindowsBasic - Basic authentication is defined in the HTTP protocol and can only be used to authenticate HTTP requests to the report server. Credentials are passed in the HTTP request in base64 encoding. If you use Basic authentication, use Secure Sockets Layer (SSL) to encrypt user account information before it is sent across the network. SSL provides an encrypted channel for sending a connection request from the client to the report server over an HTTP TCP/IP connection.[b]RSWindowsNTLM[/b] - Uses NTLM for Windows Integrated authentication.The credentials will not be delegated or impersonated on other requests. Subsequent requests will follow a [b]new challenge-response sequence[/b]. Depending on network security settings, a user might be prompted for credentials or the authentication request will be handled transparently.Why does one page say that it's RSWindowsBasic that issues a challenge/response while the other one says that it's RSWindowsNTLM who does that. Am I missing something or is this a Microsoft documentation blunder?Any help would be greatly appreciated.

MS Access vs SSRS - impact on SQL Server

$
0
0
HiMy current employer has a slew of homemade reporting using MS Access. At times, these reports place a great deal of load on SQL Server, and I'm looking for ways to reduce resource usage. The Access database is set up with several linked table, and queries are then run off these linked tables.I'm wondering if there would be any performance benefit to switching these reports over to SSRS. Will the reports run faster in SSRS? Will the CPU/IO/Memory be reduced on SQL?I will be running some tests on a per-query basis to try to find out the difference, but in the meantime if anyone has any experience with this, I'd be greatful for your insights. :-D

SSRS Report slow

$
0
0
I have one ssrs report, when we run th report, its loading page opens very late, once it start showing loading page then data comes very fast. I executed the same proc which we are using in the rdl, that proc is taking very less time. After loading the page when i chnaged the parameter and give maximum input , still the output comes in seconds. I am attaching the screen shot, which shows the pre and post loading page. Pl suggest why the laoding page come very late.Thanks

ssrs 2012 - send email failure

$
0
0
Hi,I have scheduled a report but this is the error it shows:Failure sending mail: Failure sending mail.Do you know where I can get detailed information on the error?Any suggestions please?

Data Driven Subscriptions without SQL Enterprise

$
0
0

Introduction

Do you have SQL Reports that need to go to different people but each person's report has different parameters? Don't have the resources to purchase the Enterprise edition of SQL 2000? The only solution available in Standard edition, besides writing your own front end in .NET was to create a subscription for each unique report, person and parameter. After only a short amount of time, you've got a ton of subscriptions to manage.

Well, that's the situation I was in, and it was quickly becoming a nightmare managing all of the subscription change requests. I started thinking "Reporting Services is just a regular ol' database with an ASP.NET front end. There's got to be a way to do it..."

Well, EURIKA! It seems the subscription information is stored in a table named, of all things "Subscriptions" and the parameter information is stored in, Yep, "Parameters". ... Those tricky Microsoft guys!

Anyway I wrote a stored procedure that will look for predefined text in the subscription and replace it with what you supply. It may not be as pretty as the version in SQL Enterprise, but this one gets the job done, and it is very useful!

I have not included any error checking and currently this SP only allows for one parameter. Feel free to modify the code as you see fit. Any suggestions or comments are welcome, email me.

Thank you and I hope this helps or at least gives you ideas on where to go next.

Instructions

  1. Create the stored procedure. Shown below.
  2. Create a new subscription for the report that you want to set up the data driven subscription for. Use the following settings:
  3. To Address: |TO| (pipe + TO + pipe)Carbon Copy Address: |CC|Blind Copy Address: |BC|Reply To Address: |RT|Comment / Body: |BD|Parameter 1: |P1|
  4. Now set the schedule of the report to run once.
  5. Set the beginning date and ending date to a date prior to today to keep the report from running unless you call it.
  6. In Enterprise Manager find the job you just created. It will have a Last Run Status of “Unknown” and the Next Run Date will be “Date and time are not available”. This job's name is what you’ll need to pass to the stored procedure as the Schedule ID. You can also run the query below to list the Job Names directly from the Report Server Database. Your job should be the first one listed.

  7. SELECT ReportSchedule.ScheduleID, Subscriptions.ModifiedDate FROM Subscriptions INNER JOIN ReportSchedule ON Subscriptions.SubscriptionID = ReportSchedule.SubscriptionID WHERE (Subscriptions.Description LIKE N'%|TO|%') ORDER BY Subscriptions.ModifiedDate DESC

  8. To execute the subscription, simply call the stored procedure passing the parameter values.

Conclusion

Now you are ready to call your procedure from within your code.

Again, any comments, suggestions or improvements are welcome, email me.


Stored Procedure
SET QUOTED_IDENTIFIER OFF GOSET ANSI_NULLS OFF GO/* PROCEDURE DESCRIPTION: This procedure will replace the predefined fields for a SQL Reporting Services Subscription allowing a "DATA DRIVEN SUBSCRIPTION" INPUT: @scheduleID The Job Name in SQL Server 2000 @emailTO The TO address of the email @emailCC The Carbon Copy address of the email @emailBCC The Blind Copy address of the email @emailReplyTO The Reply TO address of the email @emailBODY Any text that you want in the email body @param1 The value of the parameter defined as P1 in the subscription OUTPUT: None WRITTEN BY: Jason L. Selburg HeroTheCat@indy.rr.com NOTES: This procedure does not have error checking or return codes included. Feel free to modify this code as you see fit.*/ CREATE procedure dbo.usp_data_driven_subscription ( @scheduleID uniqueidentifier, @emailTO varchar (2000) = '', @emailCC varchar (2000) = '', @emailBCC varchar (2000) = '', @emailReplyTO varchar (2000) = '', @emailBODY varchar (8000) = '', @param1 varchar (256) = '' )asDECLARE @ptrval binary(16), @PARAMptrval binary(16), @TOpos int, @CCpos int, @BCCpos int, @RTpos int, @BODYpos int, @PARAM1Pos int, @length int, @subscriptionID uniqueidentifier -- set the subscription ID SELECT @subscriptionID = SubscriptionID FROM ReportSchedule WHERE ScheduleID = @scheduleID -- set the text point for this record SELECT @ptrval = TEXTPTR(ExtensionSettings) FROM Subscriptions WHERE SubscriptionID = @subscriptionID -- set the text point for this record SELECT @PARAMptrval = TEXTPTR(Parameters) FROM Subscriptions WHERE SubscriptionID = @subscriptionID -- set the start position for the TO Address SELECT @TOpos = patindex('%|TO|%', ExtensionSettings) - 1 FROM Subscriptions WHERE SubscriptionID = @subscriptionID IF isnull(@TOpos, '') <> '' and @TOpos > 0 and len(@emailTo) > 0 -- change the TO address UPDATETEXT Subscriptions.ExtensionSettings @ptrval @TOpos 4 @emailTo -- set the start position for the CC Address SELECT @CCpos = patindex('%|CC|%', ExtensionSettings) - 1 FROM Subscriptions WHERE SubscriptionID = @subscriptionID IF isnull(@CCpos, '') <> '' and @CCpos > 0 and len(@emailCC) > 0 -- change the TO address UPDATETEXT Subscriptions.ExtensionSettings @ptrval @CCpos 4 @emailCC -- set the start position for the BCC Address SELECT @BCCpos = patindex('%|BC|%', ExtensionSettings) - 1 FROM Subscriptions WHERE SubscriptionID = @subscriptionID IF isnull(@BCCpos, '') <> '' and @BCCpos > 0 and len(@emailBCC) > 0 -- change the TO address UPDATETEXT Subscriptions.ExtensionSettings @ptrval @BCCpos 4 @emailBCC -- set the start position for the REPLY TO Address SELECT @RTpos = patindex('%|RT|%', ExtensionSettings) - 1 FROM Subscriptions WHERE SubscriptionID = @subscriptionID IF isnull(@RTpos, '') <> '' and @RTpos > 0 and len(@emailReplyTO) > 0 -- change the REPLY TO address UPDATETEXT Subscriptions.ExtensionSettings @ptrval @RTpos 4 @emailReplyTO -- set the start position for the BODY Text SELECT @BODYpos = patindex('%|BD|%', ExtensionSettings) - 1 FROM Subscriptions WHERE SubscriptionID = @subscriptionID IF isnull(@BODYpos, '') <> '' and @BODYpos > 0 and len(@emailBODY) > 0 -- change the REPLY TO address UPDATETEXT Subscriptions.ExtensionSettings @ptrval @BODYpos 4 @emailBODY -- set the start position for the Parameter 1 SELECT @PARAM1Pos = patindex('%|P1|%', Parameters) - 1 FROM Subscriptions WHERE SubscriptionID = @subscriptionID IF isnull(@PARAM1Pos, '') <> '' and @PARAM1Pos > 0 and len(@param1) > 0 -- change the Parameter 1 value UPDATETEXT Subscriptions.Parameters @PARAMptrval @PARAM1Pos 4 @param1 -- run the job exec msdb..sp_start_job @job_name = @scheduleID -- this give the report server time to execute the job WAITFOR DELAY '00:00:10' -- set the start position for the TO Address SELECT @TOpos = patindex('%' + @emailTO + '%', ExtensionSettings) - 1 FROM Subscriptions WHERE SubscriptionID = @subscriptionID SELECT @length = len(@emailTO) IF @length > 0 -- replace the addresses with the original |TO| UPDATETEXT Subscriptions.ExtensionSettings @ptrval @TOpos @length '|TO|' -- set the start position for the TO Address SELECT @CCpos = patindex('%' + @emailCC + '%', ExtensionSettings) - 1 FROM Subscriptions WHERE SubscriptionID = @subscriptionID SELECT @length = len(@emailCC) IF @length > 0 -- replace the addresses with the original |CC| UPDATETEXT Subscriptions.ExtensionSettings @ptrval @CCpos @length '|CC|' -- set the start position for the TO Address SELECT @BCCpos = patindex('%' + @emailBCC + '%', ExtensionSettings) - 1 FROM Subscriptions WHERE SubscriptionID = @subscriptionID SELECT @length = len(@emailBCC) IF @length > 0 -- replace the addresses with the original |BC| UPDATETEXT Subscriptions.ExtensionSettings @ptrval @BCCpos @length '|BC|' -- set the start position for the REPLY TO Address SELECT @RTpos = patindex('%' + @emailReplyTO + '%', ExtensionSettings) - 1 FROM Subscriptions WHERE SubscriptionID = @subscriptionID SELECT @length = len(@emailReplyTO) IF @length > 0 -- replace the addresses with the original |RT| UPDATETEXT Subscriptions.ExtensionSettings @ptrval @RTpos @length '|RT|' -- set the start position for the BODY Text SELECT @BODYpos = patindex('%' + @emailBODY + '%', ExtensionSettings) - 1 FROM Subscriptions WHERE SubscriptionID = @subscriptionID SELECT @length = len(@emailBODY) IF @length > 0 -- replace the addresses with the original |RT| UPDATETEXT Subscriptions.ExtensionSettings @ptrval @BODYpos @length '|BD|' -- set the start position for the Parameter SELECT @PARAM1Pos = patindex('%' + @param1 + '%', Parameters) - 1 FROM Subscriptions WHERE SubscriptionID = @subscriptionID SELECT @length = len(@param1) IF @length > 0 -- replace the addresses with the original |P1| UPDATETEXT Subscriptions.Parameters @PARAMptrval @PARAM1Pos @length '|P1|'GOSET QUOTED_IDENTIFIER OFF GOSET ANSI_NULLS ON GO

SSRS - show reports like slideshow

$
0
0
Hi,I have a requirement to show reports (two reports)one after the other like a slide show. The first one already is set like a dashboard with auto refresh property on for 120 seconds. How do I include the other report here ?Report A - Refreshes every 120 secondsAfter that I want Report B to be displayed for 120 secondsThen Report A should be displayed..Thanks,PSB

Dual value axis in line chart

$
0
0
Is there a way to display a value (vertical) axis on both the left and right of a line chart? I output a chart in PDF format. The Blackberry users need to zoom in to view the chart. By the time they reach the right side of the chart, it is not easy to remember what the value is. I would like to have another value axis on the right. If it matters, I am using 2008 to create the chart.
Viewing all 2791 articles
Browse latest View live


Latest Images