The Situation
We want some photos taken from another website of ours to display in our report. These are not stored locally on the Reporting Server because other services use these photos on our Intranet and we only want one location to upload the photos. These images are provided via a website address (http) or network share (file).

Before you ask, we have several MS Sharepoint sites but we didn't go down the route of uploading 10000+ images into a Sharepoint database though we are still considering it; so this article is more about just getting external images to display when they are provided over an authenticated URL (You shouldn't be having any issues with this if the image is available to anonymous users - eg. Google Logo).

Our Setup
  1. Windows XP Workstation
  2. Business Intelligence Development Studio 2008 (BIDS)
  3. SQL Server 2008 R2 Reporting Server (SSRS) running on Windows Server 2003
  4. Team Foundation Server 2010 (TFS)

Problem #1: Image does not appear within SSRS
When previewing the report in BIDS, the photo appears fine. If we deploy the report to our Reporting Server and attempt to view it using a Web-Browser, the image does not display:
  1. Get report to see images hosted on an external URL
  2. Check if image exists to display alternative placeholding image.


So I googled this for a while and there are a lot of solutions out there, none of which applied to what we meant and lots of people in the same boat.

The Situation
We have an Excel report which summarizes for our guys at the top, all the activities and time spent by staff. There are several filters available on the report (only a few to keep it simple silly). When you click on the filter, a dropdown appears with all available values listed.

The Problem
The values are listed in alphabetical order at first. If any new values come along then they get added to the bottom of the list... This is the problem. For example, if the year dropdown has a list of 2010, 2011, 2013; then if you add an entry which has year 2012, then the dropdown list will be in the following order: 2010, 2011, 2013, 2012.

The Solution

I'm storing a note here because it took a while to figure out and googling other solutions did not answer our questions but did lead us to a workaround.

So this is regarding an error when trying to add parameters to a Stored Procedure of an Oracle database from within Microsoft SQL Server Reporting Services.

The Error
copyraw
ORA-00911: invalid character 
ORA-06512: at "SYS.DBMS_UTILITY", line 114 
ORA-06512: at line 1 (System.Data.OracleClient)
  1.  ORA-00911: invalid character 
  2.  ORA-06512: at "SYS.DBMS_UTILITY", line 114 
  3.  ORA-06512: at line 1 (System.Data.OracleClient) 

The Situation
I'm using Business Intelligence Development Studio 2008 to develop a Reporting solution on a Windows XP workstation. We are connecting to a SQL Server 2008 R2 Reporting Service (SSRS) with Team Foundation Server 2010. The database with our stored procedure is Oracle 10g.

The Stored Procedure
Rather than a returned dataset, our Stored Procedure updates a field in one of our Oracle tables and returns nothing. It accepts 3 parameters: The StudentID (reference) varchar2, Username (who's running the report) varchar2 and a JobID (request reference) number.
Category: SQL Server Reporting Services :: Article: 380

Hopefully the title doesn't put you off but after much Googling and Bing-ing, I still couldn't figure out how to do this. Hopefully this article will help you more than my search engine skills do.

My Setup
Windows XP Workstation
      ...needs to open...
Excel 2007 SP2
      ...with ODBC to...
MySQL v5+
      ...hosting database...
ActivityLog
      ...contains activity, staffID, resourceID, start time, end time...


Report Specification
PivotTable Report
      ...resources in row (along the side)...
      ...staff in columns (along the top)...
      ...persondays in values (the number my bosses want - 7h 24m or 26640s is 1 person day)...
With date range as parameters
      ...ouch...
      ...and it was so easy up to here...


Migrating the articles:
  1. Change database name my_joomla_db to your joomla database and my_wordpress_db to your Wordpress database
  2. Change http://demo.joellipman.com/wordpress/ to the full URL of your WordPress site.
  3. If post_type is to be post then append with ?p= otherwise use ?page_id=.
Articles:
------ MIGRATING JOOMLA v1.5.# CONTENT TO WORDPRESS v3.2.# ------
-----------------------------------------------------------------

INSERT INTO my_wordpress_db.wp_posts
SELECT
	id 'ID',
	1 'post_author',
	created 'post_date',
	created 'post_date_gmt',
	CONCAT(introtext, ' ', `fulltext`) 'post_content',
	title 'post_title',
	'' post_excerpt,
	CASE state WHEN '1' THEN 'publish' ELSE 'draft' END 'post_status',
	'open' comment_status,
	'open' ping_status,
	'' post_password,
	alias 'post_name',
	'' to_ping,
	'' pinged,
	modified 'post_modified',
	modified 'post_modified_gmt',
	'' post_content_filtered,
	'0' post_parent,
	CONCAT('http://demo.joellipman.com/wordpress/', '?p=', id) AS guid,
	'0' menu_order,
	'post' AS 'post_type',
	'' post_mime_type,
	0 comment_count
FROM
	my_joomla_db.jos_content
ORDER BY
	id


What?
This article serves to describe several workarounds or proofs of concept.

Why?
We have a first report which acts like a search page. You enter the student you are looking for by reference or name and if there is only 1 result in the results page, then we want it to redirect to the details report for that student automatically.

How?
So there are various solutions out there, here's an overview of some:

Method #1
  1. Create one report with all selectable reports as subreports - toggle visibilty based on parameter.

Method #2
  1. Add a button below "View Report" linked to some script code (requires change to ASP pages on the ReportingServer, ie. affects all reports on that server).

Method #3
  1. Use ASP instead of SSRS.

Method #4
  1. Use a TimeInterval refreshing the page after a certain time.

Conclusion
In the end, this came down to a design decision. Time spent on trying to find a solution was not considered to be warranted. My reports use a parameter for the connection string to specify which server and database to connect to and the follow on link was enough as a solution. My seniors advised that if we had time in the future we could expand on this further.


Google Searches that got me nowhere:
  • ssrs process parameter after report execution
  • auto-redirect after are a report is run
  • ssrs vbscript post report processing
  • ssrs auto redirect based on a dataset value

Amazing, I have just spent all morning on Microsoft websites to determine what number is the TimeDataRetrieval column displaying. Thank you I know it's an INT. There is just a serious lack of documentation as to what this database is and how it populates its data.

View: ExecutionLog
InstanceNamenvarchar(38)NOT NULLName of the report server instance that handled the request. Usually YOURSERVERNAME\MSSQLSERVER
ReportIDuniqueidentifierNULLThe ID of the report (looks like a hexadecimal SSID). It's the unique ID of the report but not unique in the table (can be referenced many times).
UserNamenvarchar(260)NULLWindows authenticated username and domain of the person running the report (eg. MYDOMAIN\myusername)
RequestTypebitNOT NULLUser or System. Can be 1 or 0. This was zero "0" when I would run a report as a user.
Formatnvarchar(26)NULLThis is the rendering format. Mostly RPL if viewed in MS Internet Explorer.
ParametersntextNULLParameters and the values they were submitted with.
TimeStartdatetimeNOT NULLTime report started to run.
TimeEnddatetimeNOT NULLTime report finished running? Need to check what finished?
TimeDataRetrievalintNOT NULLMilliseconds spent retrieving the data.
TimeProcessingintNOT NULLMilliseconds spent processing the report.
TimeRenderingintNOT NULLMilliseconds spent rendering the report.
SourceintNOT NULLSource of the report exection (1=Live, 2=Cache, 3=Snapshot, 4=History)
Statusnvarchar(32)NOT NULLeither rsSuccess or an error code; if multiple errors occur, only the first error is recorded
ByteCountbigintNOT NULLSize of rendered reports in bytes.
RowCountbigintNOT NULLNumber of rows returned from queries.


So I'm looking for a SQL query that could do this all in one go and return all the results in one table.

With PHP & MySQL it's pretty simple: use individual SQL queries to get the count of yesterday, yesterweek, yestermonth, yesteryear and do the layout in PHP.

Now let's say I have one RDL or SSRS Solution. I could do a dataset per SQL query but it doesn't seem that ideal.

In Theory:

So I find myself using date ranges endlessly as I've been working in SSRS. The below is derived from a collection of various sources across the web as well as some of my own. These are what worked in my environment: WinXP, BIDS (vs2008), TFS (vs2010), SSRS 2008 R2. The following examples assume today's date is Wednesday 03 August 2011 @ 11:46:

This Week:
copyraw
-- Start Date (US format - mm/dd/yyyy)
=DateAdd("d", -(WeekDay(Today(),2))+1, Today()) // yields: 8/1/2011

-- End Date (US format - mm/dd/yyyy)
=DateAdd("d", -1, DateAdd("d", 7-(WeekDay(Today(),2))+1, Today())) // yields: 8/7/2011

-------------------------------------------------------------------------

-- Start Date (european format - dd/mm/yyyy)
=Format(DateAdd("d", -(WeekDay(Today(),2))+1, Today()), "dd/MM/yyyy") //yields 01/08/2011

-- End Date (european format - dd/mm/yyyy)
=Format(DateAdd("d", -1, DateAdd("d", 7-(WeekDay(Today(),2))+1, Today())), "dd/MM/yyyy") // yields: 07/08/2011
  1.  -- Start Date (US format - mm/dd/yyyy) 
  2.  =DateAdd("d", -(WeekDay(Today(),2))+1, Today()) // yields: 8/1/2011 
  3.   
  4.  -- End Date (US format - mm/dd/yyyy) 
  5.  =DateAdd("d", -1, DateAdd("d", 7-(WeekDay(Today(),2))+1, Today())) // yields: 8/7/2011 
  6.   
  7.  ------------------------------------------------------------------------- 
  8.   
  9.  -- Start Date (european format - dd/mm/yyyy) 
  10.  =Format(DateAdd("d", -(WeekDay(Today(),2))+1, Today()), "dd/MM/yyyy") //yields 01/08/2011 
  11.   
  12.  -- End Date (european format - dd/mm/yyyy) 
  13.  =Format(DateAdd("d", -1, DateAdd("d", 7-(WeekDay(Today(),2))+1, Today())), "dd/MM/yyyy") // yields: 07/08/2011 

This Month:
Category: SQL Server Reporting Services :: Article: 373

Just a quick note here. This is an article based on the REG file from Kelly's Korner (@www.kellys-korner-xp.com/xp_tweaks.htm). I'm not fond of downloading REG files and running them even if I have checked what it's doing. I'm putting a note here just for me:

  1. Start > Run > Regedit > OK
  2. Browse to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
  3. Create New DWORD Value
  4. Name it "MaxRecentDocs"
  5. Double-click on the new DWORD
  6. Set value data to "19" ( equals 25 )
  7. Leave Base as "Hexadecimal"
  8. OK
  9. Restart your computer

So this is for Microsoft Office Infopath 2007 (SharePoint 2007).

The situation is that I started creating a SharePoint List (datasheet) and when I made my form dropdown read from the list, it just put elements in the order that I entered them in the datasheet.

Googling this led me to browse MSDN for an hour before I realised all those experts were using programming solutions that seemed a bit over the top for something that should be so simple.

Hey presto, I found a cheat/workaround:

  1. Click on the list to see your datasheet (has a MS Access icon in the top left to remind you what you're getting yourself into)
  2. Go to Settings
  3. Select Create View
  4. Select Datasheet View (you could probably use a "Standard View", I just used the Datasheet one)
  5. Give the view a name, select what columns you want the form to have (I included the IDs for functional purposes)
  6. Further down the "Create View" page, there should be a Sort section, specify the column to sort by.
  7. Save the view by clicking the OK button.
You'll be returned to your datasheet and it's possible it isn't in any different order. I re-checked out my InfoPath form, looked at the dropdown that was already configured to read off the sharepoint list, and it had re-ordered to what I set in the view!!! I don't really understand how it works only that it does. I think this could get complicated if you had two dropdowns reading off the same list but needed to list elements in different orders.


Credit where Credit is Due:


Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman
www.joellipman.com

RSS Feed

Related Articles

Joes Revolver Map

Joes Word Cloud

page   first   find   list   added   case   error   google   table   need   order   license   note   mysql   source   using   website   function   data   joomla   report   creator   form   date   code   database   parameter   server   create   display   file   used   windows   uploaded   version   work   name   script   following   time   field   system   deluge   user   client   zoho   would   value   files   where   JoelLipman.Com

Accreditation

Badge - Certified Zoho Creator Associate
Badge - Certified Zoho Creator Associate

Donate & Support

If you like my content, and would like to support this sharing site, feel free to donate using a method below:

Paypal:
Donate to Joel Lipman via PayPal

Bitcoin:
Donate to Joel Lipman with Bitcoin bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4

Ethereum:
Donate to Joel Lipman with Ethereum 0xb038962F3809b425D661EF5D22294Cf45E02FebF
© 2024 Joel Lipman .com. All Rights Reserved.