Showing posts with label SSRS. Show all posts
Showing posts with label SSRS. Show all posts

Wednesday, February 27, 2013

User does not have required permissions. Verify that sufficient permissions have been granted and Windows User Account Control restrictions have been addressed

Today I spent quite some time getting rid of a common SSRS error due to a silly mistake, so here I am with it. This might save a bit of your time on a bad day

Error I faced was,
User does not have required permissions. Verify that sufficient permissions have been granted and Windows User Account Control (UAC) restrictions have been addressed
Solution,
Add desired users to administrator group on SSRS server
Mistake I did was googling problem straightaway and crying for help before I started thinking myself. With quick google, I got a few suggestions which didn't helped me as they were pointing to same error but occurring possibly due to something else. So here is what helped me, you might need to call IT team for getting this done.

Do login on your SSRS server and open edit local users and groups



 This will open a window where you can add/remove users from a group

  • Select Groups in left pane, this will give you list of groups on your server
  • Now double click Administrators, this will give you a screen like below
  • Here click on Add button and enter name of user to whom you wanna give access
  • Press ok, then apply and there you are. 
  • Problem solved :)  
  • If this doesn't solves your cause, check this nice blogpost from caleb



"swarg jaana ho to khud he marna padta hai", a hindi proverb which traversed my mind when IT guy failed to help me on this :P

Thanks,
Ravi

Monday, January 14, 2013

Hello World SSRS Report using BIDS 2008

Below is a simple step by step illustration for creating a Simple SSRS report using Buisness Intelligence Development Studio 2008

  • Create a new SSRS project on BIDS (you can find it under Business Intelligence tab under installed templates)
  • You will get something like this in a new project, I have added a couple of Shared data sources and sample report (you won't get them obviously ;)
  • Now right click on "Shared Data Source" folder icon and select add new data source
    • This will prompt you with a dialog box to enter server, userid, password, etc. Get these things filled and you will get a new shared data source ready to be used. Something similar to SampleDBDataSource.rds as in above image
    • You can skip this step if you dont wanna create a new shared data source. you can later embed this in report directly.
  • Next click on "Reports" folder and add new report, this will launch Report Wizard. At first step you need to select an existing datasource or create a new one. 

  • Next step you need to enter your query. For my sample it’s something like below:
  • Enter your desired query or stored procedure name (using query builder) and follow the wizard to reach “Design The Table” screen, as below
  • At this step you have to divide your available fields in  Group and Details section (just drag and drop), for my sample report I did like below:

  • Now follow the wizard and you will have a report ready. In my case it was something like below:

  • Press preview tab to preview how your report looks like.
  • Now if you can make any design changes needed. Lets say we want to add string "Employee Name: " before Employee Name displyed(as in preview above)
    • For this we need to add expression in place of Employee Name.
      • Right Click textbox you want expression to be added(Emp Name textbox in this case)
      • Select "Expression" from the context menu, you will get a screen as below. Enter desired expression and press OK(See below).
  • This will give you below result.

Hey we are done with this post. Enjoy!! :)


Edit 15th Jan, 2013

I wrote this post to answer one of the question on codeproject and that question wants to show employee date once per group, so here are the steps to do so:
  1. Add a new row below employee name row, as shown in below image. 

  2. Add expression for Employee date, you may just select DOB field as shown below or can add some expression as shown a couple of images above. I used below expression in my sample
    • ="DOB: " + Fields!Employee_DOB.Value

  3. and there you are!
I hope you guys won't mind some of my employee being minor DOB(1/8/2013) ;)

Thanks,
Ravi

Saturday, October 20, 2012

Disable hyperlinks/javascript when exporting SSRS report

"Disable hyperlinks/javascript when exporting SSRS report", this is a very common question and I was expecting a straight forward answer from google like enabling/disabling a property at report or server level. But I was unable to find any such thing and hence I took below turnaround to solve my problem.

Problem:
In my case I had a column where some names were coming and they were linked to some external URL, this was fine and as required when rendered through report-viewer control on my web-application's page but when I export this to report PDF/Excel I didn't want them as then these links become non-functional and show error message like invalid URL.

Solution:
I duplicated my column containing link, and removed action from newly created column. Now I set their visibility with below expressions.

Visibilty of column with action link associated:
=IIF(Globals!RenderFormat.Name = "PDF" Or Globals!RenderFormat.Name = "EXCEL", true, false) 

Visibilty of column without action link associated:
=IIF(Globals!RenderFormat.Name = "PDF" Or Globals!RenderFormat.Name = "EXCEL", false, true)

Please consider: This might not work for older versions of SSRS

Hope this will save a few minutes of someone. If you have some better approach for this issue, please add it in comments and I'll update that in this post with due credits. Thanks.

Tuesday, May 1, 2012

Report Server Model generation error: Table has a non-primary data source

A lil bit unorthodox solution!!

I faced this error (Report Server Model generation error: Table has a non-primary data source) yesterday while working on SSRS. I was trying to create a Report Model (SMDL) on SQL Server Buisness Development Studio and was getting this error repeatedly in final step of “Report Model Wizard”.

Query which I was using in Data Source View was somewhat like below:

SELECT Table1.Col1, Table1.Col2, Table2.Col2, Table2.Col3
FROM Table1
JOIN Table2
ON Table1.Col1 = Table2.col1

I googled this error a bit but found no solution and hence I adopted this lil bit unorthodox option.

My solution was to add an artificial column to my resultset and then using it as logical primary key. So I changed my query as below:

SELECT Table1.Col1, Table1.Col2, Table2.Col2, Table2.Col3 ', NEWID()AS Id
FROM Table1
JOIN Table2
ON Table1.Col1 = Table2.col1

And then I used this new column as logical primary key, as shown in below image. 



This is working like charm for me but I am yet to test this fully so use this solution for you after through testing. Hope this helps.

About Me

My photo
Delhi, India
Fun, music, travel and nature loving, always smiling, computer addict!!