Lookupset in ssrs
H i All;
I have a Table in SSRS which uses the dataset ProgrammeProfile where I have Statrt date and End date parameter
and dataset called ProgrammeProfile1 exactly same as dataset Programme Profile but dont have Start Date and End date parameter
Using Dataset ProgrammeProfile I can calculate totals say =Sum(Fields!new_profilenumberValue.Value)
But using dataset ProgrammeProfile1 i need to calculate total between the dates in the report parameter
i am trying to it but didnt succeed
I used the following expression
=Sum(LookupSet( Fields!new_mainprogrammeid.Value & "," & Fields!new_subprogrammeid.Value & "," &
Fields!new_outputs.Value & "," &
Fields!new_claimmonthid.Value,
Fields!new_mainprogrammeid.Value & "," & Fields!new_subprogrammeid.Value & "," &
Fields!new_outputs.Value & "," &
Fields!new_claimmonthid.Value, Fields!new_profilenumberValue.Value, "ProgrammeProfile").length())
but gives the value as 16 which is the count of dates between the report parameter
for e.g
01/02/2014
01/03/2014
01/04/2014
01/05/2014
01/06/2014
01/07/2014
01/08/2014
01/09/2014
01/02/2014
01/03/2014
01/04/2014
01/05/2014
01/06/2014
01/07/2014
01/08/2014
01/09/2014
but i need the sum of the values of these dates
Any help on this much appreciated
Thanks
Pradnya07
Hi Wendy Fu
Thanks for your reply
I have two dataset which are exactly the same ProgrammeProfile and PogrammeProfile1
except for Date filters
In Dataset ProgrammeProfile I am using the filter for Start Date(Search) and End Date(Search1)
<condition attribute="new_claimstartdate" operator="ge" value="@Search" />
<condition attribute="new_claimstartdate" operator="lt" value="@Search1" />
In Dataset ProgrammeProfile1 I am not using the above Date filters
as i need the total of all the vales which i do get it from ProgrammeProfile Dataset
But need the total of the selected date parameter as well
so was trying to use lookupSet
Any help much appreciated
Thanks
Pradnya07
Similar Messages
-
Hi Friends,
I have one requirement where i have to combine all the classcodes for a day , staff , Period & time table conditions
Please find the sample data as follows :
Report Groupings are :
StaffSurname
DefinitionTimeFrom
PeriodNumber
PeriodNUmberseq
TimetableGroup
FileType
Requirement : Crystal logic need to be converted into ssrs. Please find the crystal logic below
Shared StringVar ClassD1;
If {vStaffTimetableFull.TimetableGroup} <> {vStaffTimetableFull.StaffDefaultTimetableGroup} then
Class := {vStaffTimetableFull.DefinitionTimeFrom} + ' ' + {vStaffTimetableFull.ClassCode}
else
Class := {vStaffTimetableFull.ClassCode};
if ({vStaffTimetableFull.DayNumber} = 1) then (
if (ClassD1 = '') then
ClassD1 := Class
else
ClassD1 := ClassD1 + CHR(13) + Class)
I have tried to use lookupset & join to combine the values in ssrs but it is combining all the values from the dataset and failing to check the condition {vStaffTimetableFull.TimetableGroup} <> {vStaffTimetableFull.StaffDefaultTimetableGroup}
Required output :
Please let me know if u need any other details.
Thanks,
SamHi Sam,
According to your description, you want to display corresponding values based on the condition that when the [Timetablegroup] value is equal to the [StaffDefaultTimetableGroup] value.
In Reporting Services, we can use IIF() function to return corresponding values depending on whether the expression is true or not. In your scenario, you can refer to steps below to achieve your requirement:
1. Design the report like below:
Expression: =IIF(Fields!Timetablegroup.Value <> Fields!StaffDefaultTimetableGroup.Value,Fields!DefinitionTimeFrom.Value & " " & Fields!Classcode.Value & chr(10) & Fields!DefinitionTimeFrom.Value & " " &
Fields!Classcode.Value & chr(10) & chr(10) & Int(Left(Fields!Classcode.Value,2)) & " " & right(Fields!Classcode.Value,4),Fields!Classcode.Value & chr(10) & Fields!Classcode.Value & chr(10) & chr(10)
& Int(Left(Fields!Classcode.Value,2)) & " " & right(Fields!Classcode.Value,4))
2. Preview the report:
If you have any question, please feel free to ask.
Best regards,
Qiuyun Yu
Qiuyun Yu
TechNet Community Support -
LookUpSet is Not working for multiple columns in SSRS 2008 R2
Hi Friends,
I have a problem when i use more than one LookUpSet in SSRS to display more than one value based on Day Number & other fields..Please find the below details and please suggest me a solution for this.
Crystal :
Day1 Day2
Period 4 Arts,Maths Arts,Maths
For this in SSRS i am using LookUpSet as below based on StaffID,PeriodNumber & DayNumber like this:
= (IIF(Fields!DayNumber.Value=1,Join(LookupSet(Fields!StaffID.Value & Fields!PeriodNumber.Value & Fields!DayNumber.Value
, Fields!StaffID.Value & Fields!PeriodNumber.Value & Fields!DayNumber.Value
, Fields!ClassCode.Value
, "TIMSTF5"), "," ),""))
which is displaying correct in SSRS,But when i use the same expression to display Day 2 classes it is returning empty even though i have values on Day 2.Please have a look at the SSRS output below:
Day1 Day2
Period 4 Arts,Maths
Day 2 Expression is :
= (IIF(Fields!DayNumber.Value=2,Join(LookupSet(Fields!StaffID.Value & Fields!PeriodNumber.Value & Fields!DayNumber.Value
, Fields!StaffID.Value & Fields!PeriodNumber.Value & Fields!DayNumber.Value
, Fields!ClassCode.Value
, "TIMSTF5"), "," ),""))
I am not sure why it is not liking to use more than LookUpSet in the same report,Please suggest me with a work around for this.
Thanks in advance,
Sam.Hi Guys,
I have sorted out the problem.Solution for the above problem is use Max before the expression like below, since it has multiple days and periods in the Dataset.
= Max((IIF(Fields!DayNumber.Value=2,Join(LookupSet(Fields!StaffID.Value & Fields!PeriodNumber.Value & ields!DayNumber.Value
, Fields!StaffID.Value & Fields!PeriodNumber.Value & Fields!DayNumber.Value
, Fields!ClassCode.Value
, "TIMSTF5"), "," + vbcrlf),"")))
Thanks,
Sam -
Issues after sharepoint 2010 sp2 upgrade
Hi,
I am using Lookupset in SSRS report to connect multiple datasets.
=Join(Lookupset(Fields!ows_SNO.Value,Fields!Serial_No.Value,Fields!Name.Value, "Dateset1"))
I have renamed the Title column as serial_No.
When i am opening the report, "Name" is not populated in the report.
Dataset Query:
<ViewFields>
<FieldRef Name="Title" />
<FieldRef Name="Name" />
</ViewFields>
Thank you.Hi Selvarasu,
Is the Serial_No field is included in the DataSet1?
If not, then you need to change DataSet1 to the dataset where the Serial_No exists.
And for the DataSet query, it is like the format below:
<RSSharePointList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ListName>Test2</ListName>
<ViewFields>
<FieldRef Name="Title" />
<FieldRef Name="code" />
<FieldRef Name="ID" />
</ViewFields>
</RSSharePointList>
If above cannot work, could you please provide more details and screenshots about the datasets?
Best regards.
Thanks
Victoria Xia
TechNet Community Support -
Why SUM is not working in SSRS
Hi,
I'm new to SSRS and am having a problem. I am trying to replicate the value of sum(sum(field)) using lookupsets and custom code function. I have this little function which works fine.
PUBLIC SHARED FUNCTION CalcPTD2(LookupArray AS OBJECT) AS INTEGER
DIM i,Total AS INTEGER
Total = 0
FOR i = 0 to UBOUND(LookupArray)
Total = Total + CINT(LookupArray(i))
NEXT i
RETURN Total
END FUNCTION
I call this function with the following call:
Code.CalcPTD2(Lookupset(FORMAT(Fields!REALDATE.Value,"Long Date"),FORMAT(Fields!CallbackDate.Value,"Long Date"),Fields!DailyHours.Value,"DataSet4"))
The output of this function is a row of data consisting of 28, 47, 35, 43, 41
If I use COUNT on the output of the function like this COUNT(Code.CalcPTD2(Lookupset(FORMAT(Fields!REALDATE.Value,"Long Date"),FORMAT(Fields!CallbackDate.Value,"Long Date"),Fields!DailyHours.Value,"DataSet4"))) I get the
result of 9
If I use SUM on the output of the function like this SUM(Code.CalcPTD2(Lookupset(FORMAT(Fields!REALDATE.Value,"Long Date"),FORMAT(Fields!CallbackDate.Value,"Long Date"),Fields!DailyHours.Value,"DataSet4"))) I get the result
of 353
I set up a global counter and it showed it was only entering the function 5 times as expected. So where is the extra data coming from? Is this an invalid use of SUM or COUNT? What is a replacement? Earlier in my report I reference SUM(SUM(Fields!DailyHours.Value)
which is the result I am looking for. I can't reference it here because the matrix is associated with another dataset. And splitting it out into another matrix is not an option.
Thanks in Advance
AnnHere is a copy of my expressions and a copy of my data. The expressions match up going from left to right
Code.CalcPTD2(Lookupset(FORMAT(Fields!REALDATE.Value,"Long Date"),FORMAT(Fields!CallbackDate.Value,"Long Date"),Fields!DailyHours.Value,"DataSet4"))
sum(Code.CalcPTD2(Lookupset(FORMAT(Fields!REALDATE.Value,"Long Date"),FORMAT(Fields!CallbackDate.Value,"Long Date"),Fields!DailyHours.Value,"DataSet4")))
count(Code.CalcPTD2(Lookupset(FORMAT(Fields!REALDATE.Value,"Long Date"),FORMAT(Fields!CallbackDate.Value,"Long Date"),Fields!DailyHours.Value,"DataSet4")))
PUBLIC SHARED FUNCTION CalcPTD2(LookupArray AS OBJECT) AS INTEGER
DIM i,Total AS INTEGER
Total = 0
FOR i = 0 to UBOUND(LookupArray)
Total = Total + CINT(LookupArray(i))
NEXT i
NumberTimes = NumberTimes +1
RETURN Total
END FUNCTION -
How can I use two database in Dataset in SSRS?
Hi,
I am using one query to generate my SSRS report. In that query I am using subquery. Now I am pulling data from multiple tales.
DB used in sub query is different than the rest of the tables DB.(So total I am using 2 DB(Database))
So I see that in SSRS, I can connect query(In DataSet Properties) to one DATA_SOURCE only, how can I use other database which is I used in sub-query?
I have to move this SSRS into PROD and I can't hard code that sub-query's DB name in my query.
Please give me suggestion. Thanks!!
VickyIn SSRS 2008 R2 you can use the Lookup function (http://technet.microsoft.com/en-us/library/ee210531.aspx ) and LookupSet function (http://technet.microsoft.com/en-us/library/ee240819.aspx
Depending on your security set up, you can reference a table in a second database on the same server using a three part name: database.schema.table. This is more likely to work for you if you wrap your SQL command in a stored procedure.
Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com -
SSRS TechNet Guru News: October Winners Announced
All the votes are in!
And below are the results for the TechNet Guru Awards, October 2014 !!!!
For a full list of winners,
see the full blog post, as runners up had to be removed from this post to fit the forum max length restrictions.
BizTalk Technical Guru - October 2014
Agustín Mántaras
Visual Basic script to deal with BizTalk Suspended Messages
Mandi Ohlinger: "A quick and easy way to handle suspended messages. I'm a fan!"
Ed Price: "Great article! Thanks for including an MSDN Gallery link, a See Also section that links to the Wiki portal, and some great example snippets!"
Sandro Pereira: "Nice script, in my opinion it will be best to write this in PowerShell script. Well written, well formatted (some minor improvements can be made)"
Johns-305 [boatseller]
BizTalk: EDI Features Not Just For HIPAA
Mandi Ohlinger: "A great walkthrough including the screen shots. Nice addition to the Wiki. "
Ed Price: "Good use of images and color in the code snippets!"
Sandro Pereira: "Nice start be this article should be explained better. Article format can be improved."
Steef-Jan Wiggers
Securing BizTalk endpoints leveraging Sentinet API Management Part 3
Sandro Pereira: "Another excellent article in this series on Sentinet API Management. Well written, well formatted with nice pictures, great article and I love the topic."
Ed Price: "Fantastic depth on this article!"
Forefront Identity Manager Technical Guru - October 2014
Wim Beck
Event Driven Scheduling of Forefront Identity Manager (FIM) using a Windows Service
Ed Price: "Fantastic job on formatting, the code, and all the explanations! The TOC and References are a nice touch!"
PG: "Nice innovative solution, that is a nice add-on to existing solutions. "
Microsoft Azure Technical Guru - October 2014
Chervine
Creating and Querying Microsoft Azure DocumentDB
JH: "DocumentDB is one of my favorite new services on Azure. It's cool to see that someone seems to be excited as I am. Hope that this article is just the beginning of a whole series about Azure DocumentDB."
Ed Price: "Great use of images and code snippets. Good conclusion! Great topic!"
Chilbeto
Publishing Multiple Azure Environments
TN: "Great "
JH: "This topic is normally forgotten when talking about Cloud development. I had a hard time to find an appropriate mechanism myself. This article provides one of the better ways how you can deploy multiple environments to Azure."
Ed Price: "Great overview article. Good diagram at the top! Could benefit from a TOC and References. Good job on the conclusion!"
saramgsilva
Microsoft's Windows AppStudio: Add Support For Push Notification
Ed Price: "Great introduction and incredibly thorough. Great job!"
JH: "A new article about AppStudio focusing on push notifications. Push notifications in my opinion, when done right, makes an app alive. Would love to see a complete example with all features mentioned in the related articles published
on GitHub."
Microsoft Visio Technical Guru - October 2014
Mr X
Unattended installation of Visio 2013
Ed Price: "Great job, Mr X! Good use of images!"
AH: "It gives good instructions with the help of the pictures but its still missing detailed information if some user needs it. Need to provide a wiki/msdn references that are available something like http://technet.microsoft.com/en-us/library/cc179097.aspx.
Overall decent article"
Miscellaneous Technical Guru - October 2014
Brian Nadjiwon
How to Create and Use Classes in PowerShell
Richard Mueller: "Very interesting concepts. It would help to name the objects something like "Jim" rather than "Person", for example. There should be a See Also section, and more links to references."
Ed Price: "Great topic and explanations of the classes!"
Andy ONeill
Visual Studio: Snippetty Tip
Richard Mueller: "Great idea with some good advise."
Ed Price: "Great explanations of the code snippets! Fun topic! As is mentioned in the comments and in the article, many people don't know this is possible!"
saramgsilva
How to create a Virtual Machine for run Windows 10 Technical Preview
Ed Price: "Fantastic topic! Good use of images!"
Richard Mueller: "Good images and a good step by step explanation. Needs links to references and other Wiki articles (See Also). We should try not to use first person."
SharePoint 2010 / 2013 Technical Guru - October 2014
Geetanjali Arora
SharePoint Online : An Introduction to Office Delve
TN: "Great wrap-up about Delve"
Ed Price: "Amazing depth and a great overview to a new topic! Great job on the images and details!"
GO: "woohooo; a DELVE article. Great work."
Margriet Bruggeman: "A new topic explained well, I was actually looking for this info!"
Jinchun Chen: "Great."
Steven Andrews
Building a list specific search with JavaScript
TN: "Great tip for mid-dev"
Ed Price: "Great job on the descriptions, formatting, images, and See Also section! Check out the great comment from Dan at the bottom of the article!"
GO: "Nice work Steven. It's definitely a great article.!"
Margriet Bruggeman: "Great! easy to use solution for a request that is made often"
Jinchun Chen: "Nice work"
Dan Christian
No-code solution to lookup previous item in a list
Ed Price: "Effective images and helpful video and See Also help round out this great article!"
GO: "Thanks Dan and as USUAL an usefull article."
Jinchun Chen: "Nice. If InfoPath Form is accepted, we can use InfoPath Form to achive the goal as well."
Margriet Bruggeman: "I can tell that effort is taken to explain the idea well"
Small Basic Technical Guru - October 2014
Nonki Takahashi
Small Basic: Rotation Centers for Shapes of Triangle and Line
RZ: "Excellent article. This is a must read if you want to make an object move. You need to understand the coordinates and the rotation center."
Ed Price: "Great use of images!"
Nonki Takahashi
Small Basic Known Issue: 26992 -
GraphicsWindow.GetPixel(X, Y) Doesn’t Work Properly If X Or Y Has after the Decimal Point in Remote
Ed Price: "Good recommended workaround!"
RZ: "Yeah, another bug in Small Basic that might get you and need to be fixed :)"
Nonki Takahashi
Small Basic: International Resources
Ed Price: "Oh, yeah. This one is so amazing! Thank you for making this and organizing the resources so well!"
SQL BI and Power BI Technical Guru - October 2014
Visakh16
Random SSRS Musings 1 : Rowset Concatenation Using Native SSRS Expressions
MR: "Interesting example of LookupSet function usage"
RB: "merging columns on a single line with an interesting solution"
Jinchun Chen: "Good workaround we are generally using."
Ed Price: "Great descriptions and use of images!"
Jan D'Hondt
Dates in Excel files rendered from reports are displayed as plain numbers
Ed Price: "Great job laying out the sections. The images help convey a lot!"
MR: "Very short tip that could be useful because of different behavior on iPad and Windows"
RB: "interesting work-around."
Anushka Weerakkodyge
Integrating Power View with SharePoint Server 2010/2013 - Multidimensional Mode
RB: "nice walkthrough"
Ed Price: "Great depth in the procedure steps! It's similar to another article (see comment), but it's still a good addition. Good use of images!"
MR: "This article explains how to install Power View on SharePoint but do not explain that Reporting Services is the tool required for Power View to work - the initial setup is required only whether SSRS has not been installed before.
Otherwise, it has to be upgraded and then the shortcut can work."
SQL Server General and Database Engine Technical Guru - October 2014
Shanky
In depth Look at What can Cause Index to be Still Fragmented After Rebuild
AM: "Well covered."
Ed Price: "Good job on the explanations, Conclusion, and See Also section!"
Ronen Ariely
Representing list of values using a single value
Ed Price: "Great breakdown of sections! Good formatting on the sections and code snippets! Great interactions in the comments!"
AM: " Interesting options and walk through."
Visakh16
Generate Scripts for Stored Procedures Without Dynamic SQL in SSMS
AM: "Nice tip for better use of SSMS."
Ed Price: "Great breakdown of the problem and solution. As Saeid wrote in the comments, "Clear article which shows handy solution!" Good job!"
System Center Technical Guru - October 2014
Alan do Nascimento Carlos
ALM and IT Operations - Management 360 with System Center Operations Manager
in 06 Steps
Ed Price: "Lots of images. Great job breaking up the steps! Could benefit from a TOC and References. Great article!"
GO: "Thanks for the only article. great btw. :-)"
Transact-SQL Technical Guru - October 2014
Visakh16
Behavioral Difference of IIf Function in T-SQL Compared To SSRS
Richard Mueller: "Nicely done with code examples. The "See Also" section should only link to Wiki articles."
GO: "Wonderfull article thank you!"
Jinchun Chen: "Interesting comparison "
Ed Price: "Good topic. Very clean and clear. Great article!"
JS: "Good writeup, though I would bring the comparison with the table to the top and reference the samples from there."
Ronen Ariely
INSTEAD OF Triggers
Ed Price: "Good depth here. Great explanations of the code! Great job interacting in the comments and improving the article!"
JS: "Use object qualifiers (schema name to make sure that the right objects will be picked, e.g. dbo.) Outline ab bot more the things what not to do in production! Be aware that although people read this, they tend to use it anyway. If
triggers are enabled, they are executed once for each batch They are executed each statement not batch, miswording here."
Richard Mueller: "Good article. The "See Also" should only include Wiki articles. Some of the "Resources" could be moved to "See Also". Grammar needs work."
GO: "Thanks"
Praveen Rayan D'sa
Find the Database where user defined object located and where it is being referred.
GO: "This article deserves absolutely a medal THANKS!"
Jinchun Chen: ""
Richard Mueller: "Good topic. Grammar needs work. "Caution" states undocumented stored procedure is safe for production, but later states it is not."
Ed Price: "Great article. We should include the technology in the title. Good descriptions, and great References!"
JS: "Although the outlined solution is interesting and shows the public the usage of the "new" system views finding the right dependencies, it is not recommended to describe the usage of undocumented features such as sp_msforeachdb
as there are alternatives, especially in this scenario. You could generate a query using the sys.databases view and let it print out the database name along with the use statement. In addition to this and as the statement has to be run with a high privileged
account as schema information is secured as well, it should be made safe to SQL injection. In many case in the statements there is just a concatentation of values used. You can easily inject code in here, Also make sure that names / object identifiers are
quoted with [] in order to allow also special characters like spaces in the names"
Visual Basic Technical Guru - October 2014
.paul.
Image balloonTips
Richard Mueller: "Lots of code. Great idea. The "See Also" section should only include links to Wiki articles."
Ed Price: "Great solution. Good explanations!"
.paul.
Image Arrow Pointers
Richard Mueller: "Interesting idea. Need more links. Don't use first person."
Ed Price: "Creative solution! It would be good to break up the code more, to explain it. Great article!"
Paul Ishak
Visual Basic Graphics Frame Class (Easily Converted to C#)
Ed Price: "Good solution! Could benefit from more explanations of what the code is doing."
Richard Mueller: "Don't use first person. Could use more description, explanation, and links."
Visual C# Technical Guru - October 2014
Chervine
Using XML Serialization with C# and SQL Server
Ed Price: "It goes on for quite a while! Great job breaking out all the code snippets and explaining them well! Could benefit from a References or See Also section. Great TOC!"
Søren Granfeldt: "In these days of generic data, this serves as a good example of storing unstructured data"
Margriet Bruggeman: "Through discussion of the topic"
DB: "Interesting"
Magnus (MM8)
C#: Generic Type Parameters And Dynamic Types
Søren Granfeldt: "Nice example of diving into generic code and extensibility"
DB: "Good walkthrough of generics and reflection"
Ed Price: "Important topic! Great descriptions."
Margriet Bruggeman: "Good, I like the way the article covers various sides of the problem"
saramgsilva
File exporter for IEnumerable of T
Ed Price: "Another great article from Sara! Great job on the TOC and code snippets!"
Søren Granfeldt: "Great idea; could use a little more generic approach on the formatting of values"
Margriet Bruggeman: "Nice example of applying generics"
Wiki and Portals Technical Guru - October 2014
Durval Ramos
Summit: Principles of International TNWiki Summit
Richard Mueller: "A great writeup and introduction to this fantastic idea. Well done."
Ed Price: "Great depth and planning for this event!"
GO: "This is one of the best Portals that I've ever seen! Thanks"
Windows Phone and Windows Store Apps Technical Guru - October 2014
saramgsilva
How to Integrate Cortana in the Menu App
JH: "I got three words for you: I love Cortana! This article shows nicely how to integrate Cortana into your own app. Would love to see more."
Ed Price: "That's what I'm talking about! Way to go for a "What's Next" topic and nail it! I expect this article to gain a lot of interest. Fantastic article!"
Carmelo La Monica
The class GeocodeQuery in Windows Phone 8.
JH: "Lots of code examples about a feature some apps should be use more. Geocoding becomes more and more important, so this article fits perfectly into this."
Ed Price: "This is an important class with a lot of possibilities. Great execution on this article! Could benefit from a References or Additional Resources section. Good job wrapping it up with the conclusion."
saramgsilva
Export To CSV for Windows Store apps
JH: "Most people laugh when they hear about CSV export of data. A database would be a better place for the data of an app. In my opinion this is not always true (because CSV is small and can be used in different ways),
so most apps should have the capability to export data into the CSV file format. This article shows how this can be done."
Ed Price: "Another very important article. I love the Source link to the MSDN Gallery. Great job!"
Windows Presentation Foundation (WPF) Technical Guru - October 2014
Andy ONeill
WPF: Entity Framework MVVM Walk Through 1
Ed Price: "Very well formatted, clear sections, and lots of depth and clear explanations! The TOC, code snippets, Summary, and Further Reading links all help round out this great article!"
KJ: "awesome"
saramgsilva
How to binding a ResourceDictionary to a Lisbox in apps based in XAML
Ed Price: "Incredibly clear and fantastic topic! The TOC and Source link to the Gallery item help provide more value!"
GO: "She did it again. Great article."
Shweta Lodha
PopUps with Interactivity [Prism 5.0]
KJ: "handy"
Ed Price: "Good clarity and use of code snippets and images. Could benefit from a TOC and References/See Also. Great job!"
GO: "Layout could be better, but still valualble article."
Windows Server Technical Guru - October 2014
Richard Mueller
Active Directory: Generalized-Time Attributes
Mark Parris: "Very detailed article providing very good information."
GO: "Top 1 AD article Thanks Richard."
JM: "This is an excellent article, thanks for your contribution."
Philippe Levesque: "Good article ! I really liked the note about the whenChanged"
Darshana Jayathilake
Some useful features with Windows Group policies
JM: "This is an excellent article, but I recommend making the title more accurate by renaming it something like "How to configure Applocker using Group Policy" "
GO: "I like the article; so great written"
Mark Parris: "A good insight on some GPO settings and their capability."
Philippe Levesque: "Good visual howto !"
Mr X
How to manage Windows Taskbar Items pinning using Group Policy
Philippe Levesque: "Good subject well explained, already seen users that ask for that in the forum as it's new."
JM: "This is a good article that would be much more useful if you specify the Windows versions to which the article applies."
GO: "Merci, Mr X"
Mark Parris: "Very useful, especially if you need to utilise this capability post deployment."
-------------------------------- 8< --------------------------------
A huge thank you to EVERYONE who contributed an article to October's competition.
Hopefully we will see you ALL again in
November 2014's listings?
If you haven't contributed an article for this month, and you think you can create a more useful, clever and better presented wiki article than the winners above, here's
your chance! :D
Best regards,
Pete Laker
More about the TechNet Guru Awards:
TechNet Guru Competitions
#PEJL
Got any nice code? If you invest time in coding an elegant, novel or impressive answer on MSDN forums, why not copy it over to
TechNet Wiki, for future generations to benefit from! You'll never get archived again, and
you could win weekly awards!
Have you got what it takes o become this month's
TechNet Technical Guru? Join a long list of well known community big hitters, show your knowledge and prowess in your favoured technologies!Congratulations to Visakh, Jan, and Anushka!
SQL BI and Power BI Technical Guru - October 2014
Visakh16
Random SSRS Musings 1 : Rowset Concatenation Using Native SSRS Expressions
MR: "Interesting example of LookupSet function usage"
RB: "merging columns on a single line with an interesting solution"
Jinchun Chen: "Good workaround we are generally using."
Ed Price: "Great descriptions and use of images!"
Jan D'Hondt
Dates in Excel files rendered from reports are displayed as plain numbers
Ed Price: "Great job laying out the sections. The images help convey a lot!"
MR: "Very short tip that could be useful because of different behavior on iPad and Windows"
RB: "interesting work-around."
Anushka Weerakkodyge
Integrating Power View with SharePoint Server 2010/2013 - Multidimensional Mode
RB: "nice walkthrough"
Ed Price: "Great depth in the procedure steps! It's similar to another article (see comment), but it's still a good addition. Good use of images!"
MR: "This article explains how to install Power View on SharePoint but do not explain that Reporting Services is the tool required for Power View to work - the initial setup is required only whether SSRS has not been installed before.
Otherwise, it has to be upgraded and then the shortcut can work."
Also worth a mention were the other entries this month:
Make a dynamic selection from SharePoint list data with the SSIS 2012 OData Source by
Jan D'Hondt
RB: "No pics showing, nice post though"
Ed Price: "Pretty good details. It's missing the images though. Good topic!"
Error occurred while the attribute of the dimension from the database
was being processed–snowflake dimension by
Jan D'Hondt
Ed Price: "This is a pretty good writeup. It could be improved with images and references. Good article!"
MR: "Clarify this behavior is only for Multidimensional models. Moreover, you can handle that by changing configuration settings in Multidimensional project"
RB: "More of a data problem than a workaround for SSAS"
Ed Price, Azure & Power BI Customer Program Manager (Blog,
Small Basic,
Wiki Ninjas,
Wiki)
Answer an interesting question?
Create a wiki article about it! -
SSRS Report : Comma Separated Hyperlinks
Hello,
I want to display Comma Separated Hyperlinks in SSRS Report. I am not sure what should I change here to get this working.
Below is the flow of data.
1. Extracting value from the SharePoint List using SSIS Package Script component and filling data in SQL Table.
I have used this Table and created below view to stuff all these three links together.
SELECT ID, STUFF
((SELECT ', ' + BCM.BCMProgramDocument
FROM BCMProgramDocumentation BCM
WHERE BCM.Risk = R.ID FOR XML PATH('')), 1, 1, '') AS BCMDoc
FROM Risk R
which gives me below output, not sure why.
"<a href='http://yahoo.com'>YAHOO</a>", "<a href='http://gmail.com'>GMAIL</a>", "<a href='http://hotmail.com'>HOTMAIL</a>"
Then in the SSRS Reporting, I have placed a PlaceHolder with HTML View selected and gave above field value in the expression.
They are not appearing as comma separated Hyperlinks.
Can anyone please help me on this ? What are the changes required in above steps ?
Thank you,
Mittal.Hi Mittal,
According to your description, you want to show three links together with comma separated from BCMProgramDocument column to a report table. After testing the issue in my environment, we can refer to the following steps to achieve your requirement:
Use the following query create a dataset:
select * from BCMProgramDocumentation
Click Fields in the left pane, add a Calculated Field as below:
Field Name: ID2 Field Source: 1
Drag a table to design surface, then insert the expression below in the detail row:
=JOIN(lookupset(Fields!ID2.Value,Fields!ID2.Value,Fields!BCMProgramDocument.Value,"DataSet1"),",")
Right-click the Placeholder to open Placeholder Properties, then select ‘HTML-Interpret HTML tags as styles’ as Markup type.
The following screenshot is for your reference:
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Combine seperate lookupsets - find max(), count()?
Hello, my knowledge of SSRS is intermediate. Enough to have a plan. But I need just a little assistance.
Here are the functions.
here are my three lookupsets:
-LookupSet(Fields!name.Value, Fields!name.Value, Fields!act_actualend.Value, “AccountActivities”)
-LookupSet(Fields!name.Value, Fields!name.Value, Fields!act_actualend.Value, “AccountContactActivities”)
-LookupSet(Fields!name.Value, Fields!name.Value, Fields!act_actualend.Value, “AccountOpportunityActivities”)
1) How could I find the 'Max()' of all three of these datasets. The single highest number.
2) How could I find the 'COUNT()' of all three of these datasets. The total number of rows.
If they can be done separately and then added together using variables, that is an acceptable solution. Still, I'm just learning syntax here.
THanksHi ebs_software,
According to your description, you used three lookupset function to retrieve data from other dataset, now you want to select max value and count of values of all three datasets.
I tested the issue in my local machine, we could not select sum and max value returned by lookupset function directly. To workaround this issue, we need to use custom code. For detail information, please refer to the following document:
1. Right-click outside of the report, click Report Properties.
2. Click Code in left pane, type the code like below:
Public Function AggLookup(ByVal choice as String, ByVal items as Object)
If items is Nothing then
Return Nothing
End If
Dim current as Decimal
Dim sum as Decimal
Dim count as Integer
Dim min as Decimal
Dim max as Decimal
Dim err as String
current = 0
sum = 0
count = 0
err = ""
For each item as Object in items
'Calculate count
count += 1
'Check value is a number
If IsNumeric(item) then
'Set current
current = Convert.ToDecimal(item)
'Calculate sum
sum += current
'Calculate min
If min = Nothing then
min = current
End If
If Min >current then
min = current
End If
'Calculate max
If max = Nothing then
max = current
End If
If max < current then
max = current
End If
'Return NaN if value is not a number
Else
err = "NaN"
End If
Next
'Select and set output based on the user choice or choice passed by function
If err = "NaN" then
If choice = "count" then
Return count
Else
Return err
End If
Else
Select Case choice
Case "sum"
Return sum
Case "count"
Return count
Case "min"
Return min
Case "max"
Return max
Case "avg"
'Calculate the average avoiding divide by zero errors
If count > 0 then
Return sum / count
Else
Return 0
End If
End Select
End If
End Function
3. Right-click handle of the column you want to count values returned by lookupset function, click Expression.
4. In Expression text box, type the expression like below:
=LookupSet(Fields!name.Value, Fields!name.Value, Fields!act_actualend.Value,"AccountActivities").Length + LookupSet(Fields!name.Value, Fields!name.Value, Fields!act_actualend.Value,"AccountContactActivities").Length + LookupSet(Fields!name.Value, Fields!name.Value, Fields!act_actualend.Value,"AccountOpportunityActivities").Length
5. Right-click handle of the column you want to calculate total of values returned by lookupset function, click Expression.
6. In Expression text box, type the expression like below:
=Code.AggLookup("sum",LookupSet(Fields!name.Value, Fields!name.Value, Fields!act_actualend.Value,"AccountActivities"))
7. Right-click handle of the column you want to select max value returned by lookupset function, click Expression.
8. In Expression text box, type the expression like below:
=Code.AggLookup("max",LookupSet(Fields!name.Value, Fields!name.Value, Fields!act_actualend.Value,"AccountActivities"))
The following screenshot is for your reference:
If you have any more questions, please feel free to ask.
Thanks,
Wendy Fu
If you have any feedback on our support, please click
here.
Wendy Fu
TechNet Community Support -
Pass value from one dataset to another in SSRS
Hi,
We have a requirement where a value id from one dataset needs to be passed to another dataset in same report. Can anyone suggest how to achieve this?
Thanks,
PreethaYou can use Lookup,LookupSet etc functions for that
see
http://www.bidn.com/blogs/DustinRyan/bidn-blog/2037/lookup-and-lookupset-functions-new-in-ssrs-2008-r2
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
I need to connect to 2 different SQL server without creating linked server for generating report. Is it possible in SSRS 2008 report service?
Yes possible
You would just required created two data sources which points to both your SQL Servers. And inside report you can create datasets based on each of these data sources to retrieve and display the data from them. In cases where you would require merging the
data from both the systems you can use functions like Lookup, LookupSet etc. Reports created in SSRS can be rendered in a variety of formats like Excel, PDF, CSV etc
see
http://www.allaboutmssql.com/2013/08/ssrs-example-for-lookup-lookupset-and.html
http://www.sqlcircuit.com/2012/03/ssrs-2008-r2-lookup-how-to-use-multiple.html
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
SSRS Expression Month at a glance
I have a report that I am trying to regress the payment sums out month by month. I know how to do this in SQL, but no idea in SSRS. Below is what I would like the table to look like.
Year Month
Total Payments Month1 Month2 Month 3
2012 1
10,000.00 2000.00 2000.00 6000.00
2
15,000.00 5000.00 1000.00 9000.00
And this would go on. I have the report built to drill down by year and month and show the sum of the payments. What I can not figure out is how to break out the payments collected month by month. I hope this makes sense.Okay after much playing with this I have starting having success. This is what I want to do.
=sum(IIF(Fields!MPaidDate.Value = Month(Dateadd(DateInterval.Month, 1, Fields!Date_Recieved.Value))
and Fields!YPaidDate.Value = Year(Fields!Date_Recieved.Value), Fields!Amount_Paid.Value,0))
My month 1 column I left out the dateadd and I got back the right values. But when I try to add 1 month with date add it returns false.
Why do you need to write conditional expressions like this?Isnt it enough to bring MONTH(datecolumn) as a field in your dataset and use matrix control in your report? Add year to rowgroup and Month to column group to get data split up into monthwise. And inside
data part add three columns to show your measure value ie.#of orders ,
Balance
& Total Paid
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
Replacing NULL and EmptyString('') with "Unknown" in SSRS parameter dropdown
All,
What I want to do is, in the SSRS parameter drop down, instead of showing NULL and Blank values(), i want to categorize them as "Unknown", so, if the user selects "Unknown" from the SSRS drop down parameter, he should be able to see all
the records that have NULL values or empty strings in that particular column in the result set.
Can you tell me, how should I handle it in my main stored proc as well as in the dataset?
Right now, i have something like this:
Where
(t1.name in (select value from dbo.Split(@TName,',')) OR @TName IN ('All'))
-- Where t1.Name has empty strings and NULL values. Both of these values should be categorized under "Unknown"
-- How would the dataset query look like? Right now I have this query for populating the drop down for that parameter:
Select All
UNION
Select Distinct Name
Order BY 1Hello,
Please refer to the following stored procedure:
SELECT
CASE WHEN TName IS NULL OR TName = ''
THEN 'Unknown' ELSE TName END AS TName
From DemoTable
Then, use following query code to get the parameter values:
SELECT Distinct
CASE WHEN TName IS NULL OR TName = '' THEN 'Unknown'
ELSE TName END AS TName
FROM DemoTable
Regards,
Alisa Tang
Alisa Tang
TechNet Community Support -
Sharepoint Foundation 2010 and SSRS
Hi I have one small problem with Sharepoint Foundation 2010 and SSRS Integrated mode.
We have one installation with frontend and backend server, backend is installed on SSRS server and Kerberos authentication is enabled.
There are no problem to view reports with webparts but when you make one automatic subscription to make Report PDF files in one file share, it makes 5 och 30 files.
I can only find this in log files:
w3wp!library!18!01/26/2015-19:20:33:: i INFO: Skipped creating a dump file for the error InternalCatalogException, because a dump with the identical stack trace (with signature 1778776910) was already created.
w3wp!library!18!01/26/2015-19:20:33:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: Unhandled exception in timer Database version check, Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
An internal error occurred on the report server. See the error log for more details. ---> System.InvalidCastException: Unable to cast object of type 'System.DBNull' to type 'System.String'.
at Microsoft.ReportingServices.Library.ConnectionManager.GetDBVersion(Boolean rethrow)
at Microsoft.ReportingServices.Library.ConnectionManager.EnsureCorrectDBVersion()
at Microsoft.ReportingServices.Library.ConnectionManager.ConnectStorage(VersionVerificationOptions option)
at Microsoft.ReportingServices.Library.DatabaseVersionCheckTimer.DoTimerAction()
at Microsoft.ReportingServices.Diagnostics.TimerActionBase.TimerAction(Object unused)
--- End of inner exception stack trace ---;
Any ideas?Hi Dalibor,
Based on your description, my understanding is that the error occurred when automatically making Report PDF files.
Could you please provide the version of SQL server in your environment?
If you are using SQL server 2012, I recommend to update the SQL server with SP1 and CU7 to see if the issue still occurs.
And please also re-configure the Reporting Service Application and then check the results:
https://technet.microsoft.com/en-us/library/bb326213(v=sql.105).aspx
https://msdn.microsoft.com/en-us/library/gg492276(v=sql.110).aspx
Thanks,
Victoria
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Victoria Xia
TechNet Community Support -
SSAS SSRS Report Action on Cell Value w/ Embedded Single Quote Not Executing
I have configured an SSAS 2008 R2 cube SSRS ReportAction. I'm having problems when the member value for a cell has an embedded single quote, e.g. abc's. The action displays on the context menu appropriately, but when I click on the action, nothing happens.
For member values that do not have the single quote, the action works as designed. I've added a calculated ember to escape the embedded single quote by adding another single quote, e.g. abc''s, with no luck. Is there a resolution or workaround for this?Hi Mdccuber,
According to your description, you create a reporting action in you cube, and it works fine except the members that have embedded single quote, right? In your scenario, it seems that you pass this value to the report as the parameter.
In SQL Server Analysis Services (SSAS), when pass values to a report, multi-select parameters have to be placed into IN statement and SQL Server Reporting Services (SSRS) will do single-quote wrapping for string values automatically. In this case, the original
value that have embedded single quote will be damaged. So this action not work. You can submit a feedback at
http://connect.microsoft.com/SQLServer/Feedback and hope it is resolved in the next release of service pack or product.
Regards,
Charlie Liao
TechNet Community Support
Maybe you are looking for
-
Is that actually a mini-DVI port on my G5 iMac?
So I can't seem to figure this out... Is the Mini-DVI connector on the back of the G5 iMac (2 GHz, pre-camera or remote) a jack (male) or a port (female)? I bought one of the Apple mini-dvi -> S-Video & RCA adapter cables, but the mini-DVI end seems
-
"Your Firefox profile cannot be loaded. It may be missing or inaccessible." I dont know why this message has appeared. i have tried uninstalling and reinstalling firefox after completely deleting all files and folders of mozilla from program files an
-
Wildcard certificates supported by ACE
We are considering the use of wildcard certificates for our environment. Is this supported by the ACE when using SSL offloading ? regards, Sebastian
-
Using Xquery predefined functions in User defined functions
Hi All, I have a requirement of calling a user defined function in osb xquery file.In that function i have to use osb predefined string functions but they are not working it shows error message in xquery file.Can you please suggest how to use them in
-
Hallo We have defined for one Step in Workflow several Users to the role, who can work on this step. If the User A of this role open the workflow in his workflow inbox and closes it without finishing this step, and the other users cannot see this wor