Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Browse by Tags · View All
MSBI 49
#BI 39
BRH 39
SSRS 35
#MSBI 29
SQL Server 28
#SSRS 22
SSAS 22
#SQL Server 21
Reporting 19

Archive · View All
April 2010 8
May 2010 7
January 2013 6
November 2012 5
March 2012 5
July 2012 4
January 2012 4
October 2011 4
June 2010 4
February 2013 3

Some Random Thoughts

Generating QR codes in SSRS

Oct 9 2011 11:58PM by Jason Thomas   

Over the short span of my career, I have seen many people get burnt out and change their careers from technology to some other field. It is easy to get disillusioned with a job that requires you to sit on a chair the entire day and "code" the same stuff. At the same time, I have also met people who are so passionate and enthusiastic about what they do and are still coding away to glory after 15-20 years. What makes those people different, and why don't they get bored of the "same, old mundane coding stuff"? The answer is simple if you do get to observe them - their creative spirit. To quote Edward De Bono, "Creativity involves breaking out of established patterns in order to look at things in a different way." For these people, every day teaches them something new and they like to challenge their limits. They make out new things from the same stuff by looking at it from a different angle. I always make it a point to imbibe this quality in the people I mentor, and try to put across some puzzles where they have to reuse their previous learning in a new way. One of my recent questions was on how to display QR codes in SSRS.

Generating QR code in SSRS


On asking this question, most of the answers involved in getting some custom code written (but no-one knew how to write the code) or to get some plug-in from third party vendors (which involved licence costs). But the team had to put on their thinking caps when I said that the only thing they would require is access to the internet.

For demonstrating the purpose, I have made a report which will generate business cards for all the employees in my fictional company with QR codes. Follow the steps below to generate the report:-

1) Create a dataset with the following query

SELECT    'Jason Thomas' AS name, 'www.road-blogs.blogspot.com' AS URL, '00447574713732' AS mob 
UNION ALL 
SELECT    'Jay Thomas' AS name, 'www.beyondrelational.com' AS URL, '67891' AS mob 
UNION ALL 
SELECT    'Jean Elizabeth' AS name, 'http://twitter.com/de_unparagoned' AS URL, '12345' AS mob

Instead of this, you can also use information from your database tables or SSAS cubes. For the sake of simplicity, I am directly hardcoding my dataset.

2) Drag and drop a list into the layout. Then insert the name, URL and mob details into the list. Also add a company logo to make it look jazzy Winking smile

BIDS Layout - List

3) Drag and drop an image to the list and select the image properties.

Image properties

4) Go to the General tab and select the Image Source as External. Then click on the expression and enter the following expression

= "http://qrcode.kaywa.com/img.php?s=8&d=" + Fields!name.Value + Constants.vbcrlf + Fields!URL.Value + Constants.vbcrlf + Fields!mob.Value

This is shown in the image below.

How to generate QR code

(You can append any string after the URL though I am using the Name, URL and mobile here)

5) Click on preview and you should be able to get the desired results.

End Result - QR codes in SSRS

The secret of getting this done is by using the Kaywa site which will accept parameters and output the QR code for that as an image. Now there are plenty of sites online which will generate QR codes as well as barcodes in this format, and you can use any one of them for doing the same. And since you have already learned before that it is possible to display External images in SSRS, generating QR codes or barcodes is just an application of that knowledge.

Disclaimer
This report was developed just for having some fun with SSRS and for educational purposes. For people who are going to be using this for commercial purposes, I would ask them to go through the conditions of the site which generates QR code (for eg, Kaywa states it’s use should be only for non-commercial reasons).

 

Tags: SSRS, MSBI, Reporting, SQL Server, #BI, #SSRS, #MSBI, #SQLServer, BI,


Jason Thomas
19 · 9% · 2997
3
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

9  Comments  

  • Also Google Charts is a good service to build QR-Codes:

    http://code.google.com/apis/chart/infographics/docs/qr_codes.html

    commented on Oct 25 2011 2:31AM
    Vova Syd
    1258 · 0% · 19
  • This isn't really generating QR codes in SSRS at all, it's merely including an externally-generated QR code in an SSRS report. Colour me unimpressed...

    commented on Oct 28 2011 3:01AM
    jon.g.massey
    1152 · 0% · 22
  • Yes Jon, I will agree that the title is slightly misleading. We are actually displaying an externally generated QR code here.

    commented on Oct 28 2011 5:45AM
    Jason Thomas
    19 · 9% · 2997
  • Yes, but the end users don't care whether a QR code is generated inside or outside SSRS, they just want to see it in their reports. And they will be sure that qr-code is generated in SSRS :-)

    commented on Oct 28 2011 7:03AM
    Vova Syd
    1258 · 0% · 19
  • Rather than call out to an external service, you could use http://www.codeproject.com/KB/cs/qrcode.aspx in a CLR function to return the image, or perhaps modify the code to return the bit map as a grid layout which you can then fill in black and white using conditional formatting. This avoids the licensing issues of using an external service, the need for having an active internet connection and a whole host of other problems...

    commented on Oct 28 2011 7:37AM
    jon.g.massey
    1152 · 0% · 22
  • Very nice post. Yes, QR code could be easily generated by office Add-in will allow you to efficiently add linear and 2D barcode generation functions in your Microsoft Word 2003, Word 2007

    commented on Feb 6 2012 8:53PM
    Alice_
    2645 · 0% · 4
  • Why generate this each time the report is run? Would it be easier to generate the QR code, then persist it in the database or filesystem?

    commented on Mar 4 2012 3:23PM
    Marc Jellinek
    97 · 2% · 556
  • Thanks for this post and I would like to share one more qr code generator for SSRS, which also generate qr code well.

    commented on Mar 13 2013 3:14AM
    Lucately
    2903 · 0% · 2
  • The image does not appear in the report. A red X appears only. I copied and pasted the link in Internet Explorer and the image of the QR Code appears. You know what I do?

    commented on May 14 2013 12:30PM
    helsans
    2903 · 0% · 2

Your Comment


Sign Up or Login to post a comment.

"Generating QR codes in SSRS" rated 5 out of 5 by 3 readers
Generating QR codes in SSRS , 5.0 out of 5 based on 3 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]