Reporting Services dynamic image source URL problems - image

I have a report in SQL Reporting Services 2008 R2 that includes an image whose source is given by an expression. The image won't render though. This report was moved from a 2005 machine where it works just fine.
The image source is set to:
="http://example.com/SiteMap/Directory/EmployeePhotos/" + rtrim(Fields!employee_id.Value) + ".jpg"
Which should render out to this source in the actual report:
http://example.com/SiteMap/Directory/EmployeePhotos/275.jpg
Instead I just get an empty image spacer; when I look at the properties in IE I get a bunch of "Not Available" values.
I set up a row in my report with the exact expression above and it gives the expected value.
Again, the image works just fine on the 2005 box and it looks fine when it's rendered in VS 2010. Any ideas? Thanks as always for your help.

The reporting server grabs the image, not the browser. This means the service account, not just the user, must have access to the external resources.
The good news is you don't need to change the actual account under which SSRS runs. Reporting services allows you to assign an execution account which SSRS will use to get external resources. Set up an account that has access to the resources, then set that account as the execution account in SSRS configuration manager. Easy.

Related

How to remove SSRS credentials in Visual Studio 2008

I have a question similar to this one, but I am using VS 2008 and an Oracle database (with Oracle SQL Developer). How do I get rid of the report credentials in VS? Thank you.
One of the easiest ways to get rid of this is to supply a username and password for the database in question on the reporting server. The URL is usually something like http://localhost/reports. Usually, users created for this type of connection have minimal read-only rights needed for the specific report. The disadvantages to this type of connection is that it's a one-user-fits-all situation. But because of the error message you are getting, it appears that your wish is to supply a specific user name and password rather than use Windows security--which is just fine.
To get here, click Security from the report drop-down list on the main page. Then, click the Credentials stored securely on the report server. Then, here's an issue that get's lots of folks--click the Apply button at the bottom to save the changes. Sometimes the Apply button is not visible and you need to scroll down to click it.
Now, if you're accessing your report through ReportViewer in VS then the following link may provide some help:
http://www.sql-server-performance.com/2012/accessing-ssrs-reports-report-viewer-web-page/
Alternately, you can create or add to a web.config file:
https://msdn.microsoft.com/en-us/library/microsoft.reporting.webforms.ireportservercredentials.aspx
p.s. based on our chat, try adding the following to your web.config connection string--if you have one(with the respective user name and password)--if, indeed you're using Oracle's ODP.net:
providerName="Oracle.ManagedDataAccess.Client" connectionString="User Id=oracle_user;Password=oracle_user_password
http://www.oracle.com/technetwork/topics/dotnet/downloads/odpnet-managed-nuget-121021-2405792.txt
I have not figure out how to solve this from the database. What I did was, comment out this line of code from the XML of the report:
<Prompt>Specify a user name and password for data source XXX</Prompt>
If you have the correct credential info in the <value> tag, your report should be loaded with username and password parameters without problems.

Simple Coded UI login test on remote server

I used Microsoft Test Manager to create a test for a log on page (not locally hosted) and recorded this. All steps were executed without errors.
Then I've created a Coded UI test project in Visual Studio 2013.
I added a Coded UI Test with the existing recording.
I ran the test and I got the message below:
"FailedToPerformActionOnHiddenControlException: Cannot perform 'SetProperty of Text with value " on the username field.
I received this message when using the existing recording, but also if I record using the recording function in Visual Studio.
Has someone got experience with Coded UI Tests and maybe give me an example as to how to set it up.
If I understand correctly, you're basically trying to have Coded UI input a value into an HtmlInput control that's a text box on a web page. The error message "FailedToPerformActionOnHiddenControlException: Cannot perform 'SetProperty of Text with value" normally means that the value you're trying to submit isn't able to be taken by the control, either because a value isn't accepted (example, numeric values in a name field) or because it's more characters than can be accepted by the field. It could also be that the recording isn't defining the object properly, and that the property Text isn't an option on the control that was found.
So, confirm these three things:
1. The control you're tying to send value to is actually an HtmlInput. You can't send the Text property to, for example, an `HtmlDiv`.
2. The value you're submitting is a valid value for your control (you're not trying to submit numbers, for example, into a field that won't accept them).
3. The value you're submitting is within the length limit for the field.
If I were a betting man, I would say that you probably don't have the object defined properly. Take a look at the SearchProperties of the control in question first and make sure that it matches the HTML on the page itself.
Do I need to set a standard environment for testing on an other server.
I develop the Coded UI test project in a workspace on a development environment, but I need the tests to be run on a acceptation environment (the recorded tests are executed on the acceptation environment).
I read it's easy to setup this environment though, but what is best practise?
Is it better to execute it on the same environment?
Here's a code snippet:
[TestMethod]
public void TestLogonToAccount()
{
// To generate code for this test, select "Generate Code for Coded UI Test" from the shortcut menu and select one of the menu items.
this.UIMap.Enterusername();
this.UIMap.Enterpassword();
this.UIMap.Clickonlogin();
this.UIMap.ClickonCentral();
this.UIMap.Searchforemailaddress();
this.UIMap.Clickonlogin1();
}
I forgot an important part regarding the login recording test in MTM.
I just tried to play the steps again and got this error:
Playback of the selected sections of the action recording could not be completed The playback failed to find the control with the
given search properties. Additional Details: TechnologyName: 'MSAA'
Name: '' ClassName: 'MozillaWindowClass' ControlType: 'Window'

Hide Parameters in web.show_document() when passing from ORACLE FORM to REPORT

I am new to racle forms and report generation, I have successfully created a report by using the following syntax
web.show_document('http://URL/reports/rwservlet?KEY1&report=reportpage.rdf&destype=cache&desformat=pdf&paramform=no&server=rsnic'||'&transid='|| FS_TEMP || '&user_parameter=' || 'User_data','_blank');
The issue is that when I generate the Report the above link comes in the Browser URL so if anyone changes the "User_data" the report gets changed.
Is there anyway I can hide the User Parameter and its value
To secure the call to web.show_document you first need to make use of the RUN_REPORT_OBJECT.
The Oracle White Paper Integrating Oracle Reports in Oracle Forms Services applications states:
The most secure approach for calling Reports from Forms on theWeb is
to use the Oracle Application Server 10g reports Services in
combination with RUN_ REPORT_OBJECT. Because the user’s database
connection is implicitly passed from Forms to Reports on the server,
there is no risk of interception as if it were passed in a URL.
From page 10 this same document explains with an example on how to use RUN_REPORT_OBJECT.

SSRS data-driven subscriptions saving pdf file on the parameter value passed

I have a SSRS 2008 R2 report, with a parameter employeeID. When we do the data driven subscription I am exporting the report into a PDF file.
The PDF is saved/generated as reportname.pdf by default.Can we save the pdf as reportparameter.pdf.
Example:If we have an employeeID as 223,can the PDF generated for that emoloyeeID be saved as 223.pdf.
Does SSRS support this scenario when the method of delivery is through email ?
The only way save the filename as you indicate would be using the ssrs api. You can't save to another filename using the subscription service as it will use the report name as the filename :(
you might want to check out Boomerang Notification Services for SQL server from Fuel9. The framework is easy to use and you can among other things control each file name. I think I have some sample code (tsql) doing just this so let me know if you interested and I'll see if I can dig it up for you.
Cheers,
/M

Crystal Reports/Windows 7: Crystal reports asks for a default email client, and posts an error

Crystal Reports 11 (craxdrt.dll 11.5.7.1048)
Windows 7
I'm using Crystal Reports to export to a PDF document, using CRYSTALCRAXDRT::IReport::Export, and am getting an error, Windows 7 only.
"There is no email program associated to perform the requested action. Please install an email program or, if one is already installed, create an association in the Default Programs control panel."
Again, I'm not trying to send email, just create a document.
I've put forth a little debugging effort into this, and what seems to be happening is this:
I call into craxdrt.dll via the IReport interface, function Export(...), and then, monitoring with procmon, I find that there are several hundred registry queries for default mailer, contacts, etc.
It would seem that craxdrt.dll is building a large-ish data structure ahead of the task with whatever info it might need for a family of functions.
There's an error posted when the program can't find a default email client
Problems with this:
Windows 7 does not ship with a default email client, and early investigation seems to indicate that installing one does not necessarily ameliorate the problem. In any case, I do not expect all of our clients to have one installed, nor do our clients expect to have one installed by us.
Absent the actual need for an email client (i.e., in the above case), we're still getting this error message pop-up.
Note:
Interestingly, this doesn't actually prevent the user from pressing the export button again, and in fact if the user does this, the error does not show up, as the registry queries are apparently done only once per load or use of craxdrt.dll.
I think you are missing setting the ExportOptions before exporting:
Dim crxReport As Report
Set crxReport = Prepare()
crxReport.ExportOptions.FormatType = crEFTPortableDocFormat
crxReport.ExportOptions.DestinationType = crEDTDiskFile
crxReport.ExportOptions.DiskFileName = "C:\temp\Report.PDF"
crxReport.Export (False)

Resources