Labels

Apache Hadoop (3) ASP.NET (2) AWS S3 (2) Batch Script (3) BigQuery (21) BlobStorage (1) C# (3) Cloudera (1) Command (2) Data Model (3) Data Science (1) Django (1) Docker (1) ETL (7) Google Cloud (5) GPG (2) Hadoop (2) Hive (3) Luigi (1) MDX (21) Mongo (3) MYSQL (3) Pandas (1) Pentaho Data Integration (5) PentahoAdmin (13) Polybase (1) Postgres (1) PPS 2007 (2) Python (13) R Program (1) Redshift (3) SQL 2016 (2) SQL Error Fix (18) SQL Performance (1) SQL2012 (7) SQOOP (1) SSAS (20) SSH (1) SSIS (42) SSRS (17) T-SQL (75) Talend (3) Vagrant (1) Virtual Machine (2) WinSCP (1)

Wednesday, April 27, 2011

To Provide Alternate Colors to Rows in SSRS Report

To Provide Alternate Colors to Rows in SSRS Report perform th efollowing steps:

Select the row of the table, go to the row properties and in expression enter the following code:

=iif(RowNumber(nothing) mod 2, "silver", "white")

Monday, April 25, 2011

Sample Query for Unpivoting data:

Table Structure:
------------------------------------------------------------------------------------------------------
AccountNo AccountKey Datekey PeriodID Segment 1 Segment 2 Segment 3 Debit Credit
------------------------------------------------------------------------------------------------------
1                1                  234           12          456          567            346          3423   44353
-----------------------------------------------------------------------------------------------------

SELECT AccountNo, AccountKey, Datekey, PeriodID, Debit, Credit
FROM
(
  SELECT AccountKey, Datekey, PeriodID, Credit,
    [Segment 1] As Segment1, [Segment 2] As Segment2, [Segment 3] As Segment3
  FROM dbo.vw_FactAccount
) MyTable
UNPIVOT
(Debit FOR Accountno IN (Segment1, Segment2, Segment3))AS MyUnPivot



Result

----------------------------------------------------------------------------------------------
AccountNo     AccountKey  DateKey    PeriodID   Debit     Credit
-----------------------------------------------------------------------------------------------
 Segment1    1                       234           12              3423   44353
Segment2     1                       234           12              3423   44353
Segment3     1                       234           12              3423   44353
------------------------------------------------------------------------------------------

Monday, April 18, 2011

Batch Script to take SQL Server DB Bakup

@ECHO OFF
SETLOCAL
DEL D:\MercuryDBBackup\DBBACKUP\Mercury.bak
echo Deleting Mercury.bak finished at %date% %time%
DEL D:\MercuryDBBackup\DBBACKUP\SalesDW_Mercury.bak
echo Deleting SalesDW_Mercury.bak finished at %date% %time%
DEL D:\MercuryDBBackup\DBBACKUP\Mercury_Scope.bak
echo Deleting Mercury_Scope.bak finished at %date% %time%

REM Build a list of databases to backup
SET DBList=%SystemDrive%\SQLDBList.txt
SqlCmd -E -S 192.168.50.52\MERCURY -h-1 -W -Q "SET NoCount ON; SELECT Name FROM master.dbo.sysDatabases WHERE [Name] IN ('Mercury','SalesDW_Mercury','Mercury_Scope')" > "%DBList%"
REM Backup each database, prepending the date to the filename
FOR /F %%I IN (%DBList%) DO (
ECHO Backing up database: %%I
SqlCmd -E -S 192.168.50.52\MERCURY -Q "BACKUP DATABASE [%%I] TO Disk='D:\MercuryDBBackup\DBBACKUP\%%I.bak'"
ECHO.
)
REM Clean up the temp file
IF EXIST "%DBList%" DEL /F /Q "%DBList%"

echo Completed Successfully at %date% %time%>>_date_.txt

Monday, April 11, 2011

PPS Open Sub report in new window

<%@ Page language="c#" Codebehind="Details.aspx.cs" AutoEventWireup="false" Inherits="seminarRx03.Details" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
 <HEAD>
  <title>Details</title>
  <meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
  <meta content="C#" name="CODE_LANGUAGE">
  <meta content="JavaScript" name="vs_defaultClientScript">
  <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
 </HEAD>
 <body MS_POSITIONING="GridLayout">
  <form id="Details" method="post" runat="server">
   &nbsp;
   <asp:Button id="btnRegistration" style="Z-INDEX: 101; LEFT: 611px; POSITION: absolute; TOP: 155px" runat="server" Text="Registration " Width="180px" Height="28px"></asp:Button>
  </form>
 </body>
</HTML>

Tuesday, April 5, 2011

Performance Point Server Error: :Unable to view data across Domain"

While developing any reports or charts using Pivot report or Pivot Chart in PPS 2007, we often come across the below type of error
Performance Point Server Error: :Unable to view data across Domain...."

To fix this issue we need to customize our Security setting in IE browser.

1. Go to Internet Options --> Security tab
2. Click 'Custom Level' button and enable 'Access Data Across Domain' under Miscellneous part.

If you still find difficult to view data. install below exe's in your system:
  1. SQLServer2005_ASOLEDB9.exe
  2. msxml6.exe