BIDS Archives -

Tag Archives: BIDS

Count Number of weekends between 2 dates in SSRS

Problem: There is no in-built function in SSRS where we can count the number of Saturdays and Sundays between any two dates in SSRS. This is a needed function for scenarios where we only need to get a count of working days.’ Solution: Following is a formula that can be used for getting an accurate count of weekends. = (((DateDiff (DateInterval.Day, DateAdd(DateInterval.Day,7-WeekDay(Parameters!startDate.Value),Parameters!startDate.Value), DateAdd(DateInterval.Day,7-WeekDay(Parameters!endDate.Value),Parameters!endDate.Value).AddDays(1)) + 1)/ 7)*2) + iif(weekday(Parameters!endDate.Value)=7,1,0) + iif(weekday(Parameters!startDate.Value)=1,1,0) -1 Here instead of Parameters!startDate.Value and Parameters!endDate.Value, you can use any other Start Date or End Date.

Generating Image dynamically in SSRS Report from CRM

Introduction: It is possible to Fetch images from CRM’s entity records using Fetch XML.  This can be done using Notes attachment in CRM and the steps to display the Image in your report are pretty simple as well. Steps: Attach your image to a note under your respective entity in CRM In your Visual Studio copy paste the following code in your Query Designer <fetch mapping=”logical” output-format=”xml-platform” version=”1.0″> <entity name=”annotation”> <attribute name=”subject”/> <attribute name=”notetext”/> <attribute name=”filename”/> <attribute name=”filesize”/> <attribute name=”documentbody”/> <attribute name=”annotationid”/> <attribute name=”mimetype”/> <attribute name=”objectid”/> <filter type=”and”> <condition attribute=”mimetype” value=”%image%” operator=”like”/> </filter> <order descending=”false” attribute=”subject”/> </entity> </fetch> Add an Image Control in your Report. If you want to generate multiple images then you can add the Image Control under a Table Go to Image properties and select the image source as Database. Under field select documentbody and select your MIME type to whichever image format you want it to be  Click on preview and your image should be rendered in your report Conclusion: Thus you can store images in your CRM and generate dynamic SSRS reports with these images easily.

SSRS Report Preview not working for D365 CRM V9 (Solution)

Issue: If you are trying to preview a FetchXML report in SSRS and you are a facing an issue due to a Sign-In Failure, then the reason for that most probable is due to the reason that you are trying to connect to CRM v9. When we try to connect to a v9 environment using report authoring extensions, the connection fails without any proper error and loops back to organization selection screen or login screen. If you would try to preview the same report in a v8.x environment then you would be able to preview it successfully. Reason: The main reason for this issue is that v9 only uses Transport Layer Security(TLS) 1.2 and TLS 1.0 & 1.1 connections whereas the previous CRM versions still support all TLS connections. Solution: The first solution would be to update your Business Intelligence Development Studio(BIDS) to the latest version. Please use the link below:  https://www.microsoft.com/en-us/download/details.aspx?id=56973 The second solution is to make a few changes in your regedit For systems running on .NET Framework 3.5 on x64-based systems: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727 Create a DWORD key Name: SchUseStrongCrypto Value: 1 For systems running on .NET Framework 4.5 or later on x64-based systems: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\ v4.0.30319 Create a DWORD key Name: SchUseStrongCrypto Value: 1 Restart your PC Note: Please take a backup of your regedit before editing it. Regedit used incorrectly can cause serious problems in your operating system. For x32-based systems do not add the \Wow6432Node in the HKEY paths mentioned. Your Report should preview fine now!

SEARCH :

FOLLOW CLOUDFRONTS BLOG :

[gravityform id="36" ajax="true"]

FOLLOW CLOUDFRONTS BLOG :