Thursday, February 07, 2013
Hekaton from Microsoft
http://bit.ly/VTfgcC
http://bit.ly/X6ge6l
Tuesday, January 29, 2013
PowerView Add In for Excel not Detecting Silverlight, Trouble installing silverlight for Powerview Excel Add in
Choosing between Tabular Model and Multidimensional Model
Click here to go to download page
Monday, January 07, 2013
SQL Server Reporting Services - Multiple Personality Syndrome with Dynamic Borders
However, The reports were supposed to be uploaded to a Report Server and executed through the web interface When I tested the same report via the web interface, non of my dynamic styles were present. It always had "Solid" style, in all the scenarios. I rechecked the source files, re-tested it within data tools and the report was running fine. But again, when I uploaded it to the report server and ran it through the web interface, the borders were always solid.
After hours of struggling with this tiny issue, I have found that border styles work in two different ways in data tools and web interface. The border style property has one extra property called "Default". The value that is specified here for default (None, Solid ...etc), will override all the expressions specified for each side (left, right ..etc) only when the report is run via the web interface.
Friday, March 11, 2011
Transfer Sybase SQL Anywhere IMAGE Binary data to PostgreSQL BYTEA, Part1 (using CSV)
1. From a CSV created from the sybase table
2. Using Pentaho Kettle Data Integration.
I am explaining the first method in this post, Importing the image data using CSV.
Step 1 (Export the sybase table to CSV)
First of all, we need to export the required data of the sybase table to a csv. Note that my table in sybase looks like below,
images
======
image_ID integer,
image_name varchar(50),
image_data image
Before exporting the data in the table, the images table, the image_data column should be converted to ASCII string, encoded with base64. This can be done with the inbuilt function BASE64_ENCODE(
SELECT image_ID, image_name, BASE64_ENCODE(image_data) FROM images.
Note that in the query, the image_data field is encoded with 64 with the above function.
Step 2 (Import csv to PostgreSQL)
Once the csv is ready, import it to the postgresql database. Note that the image_data field should be imported to a string type field of the postgresql database table. Check the table I have in PG below,
images
======
image_ID int,
image_name character varying(50),
image_text text
image_data bytea
The copy command that imports the csv into the PG table may look like below,
COPY images FROM 'C:\\PG\\images.csv' WITH QUOTE '''' CSV
Note that if the text data in your csv is quoted, then the relevant quote should be provided in the COPY command to prevent the same quote be copied into the table alone with the data. For example, if you didn't provide the QUOTE in the COPY command, you will have data like, 'company_logo', in the table. This should be avoided, specially for the base64 string.
Step 3 (Update bytea column with base64 string in the text column)
Once we have data in the images table, images saved in the text column encoded with base64, we need to update the bytea column of the same table by decoding data in the text column into the bytea format. Check the following script I have used in this example,
UPDATE images SET image_data = DECODE(image_text, 'base64');
This script decodes data in the image_text column and updates the image_data, which is a bytea column, with the correct binary data of the particular image. You can clear the image_text column later to save addition space.
It's easy as that and check out the next post, which is the PART 2 of this post, to see how we can directly transfer image data from sybase to postgresql using Pentaho Data Integration ETL package.
Wednesday, March 02, 2011
Easy way to import image to bytea field in PostgreSQL/ Postgres
Step 1 (convert the image to base64 string)
Using an online converter such as, http://bit.ly/Ee6Ju, convert the image to base64 string.
Step 2 (Insert the baste64 string after decoding it into bytea)
Copy the string from the site and paste it in the PgAdmin query tool within the insert query like below,
INSERT INTO images (image_name, image_data)
VALUES( 'image_one', decode('
And thats it, your base64 is converted into bytea and inserted in the bytea field of the image table.
Friday, January 07, 2011
Export JasperRerpots to Excel, Number Formats and Patterns Mapping for JasperServer and JaperReports
For Example,
When you apply a pattern such as "#,##0.0 %" in iReports and deploy the report on JasperServer and then export the report to excel from JS you would expect the values to be something like, "12.0%". But instead, what you find on the excel is "0.12". The reason for this is because, Java patterns in iReports should be explicitly mapped to Excel patterns or Masks in order to have them exactly the way they are on the JRXML.
How to do this in two simple Steps,
Step1,
You need to add the mappings in the applicatonContext.xml file which can be found in the following folder,
"tomcat_folder"\webapps\jasperserver\WEB-INF\
Search for the following,
<util:map id="formatPatternsMap">
<!-- entry key="¤ #,##0.00" value="$ #,##0.00"/-->
</util:map>
Add a mapping as below,
<util:map id="formatPatternsMap">
<!-- entry key="¤ #,##0.00" value="$ #,##0.00"/-->
<entry key="#,##0.0 %" value="0.00%"/>
</util:map>
Key should be the Java pattern, and the value should be the pertaining excel pattern/mask
Step2
Do Not forget to disable "detectCellType" property. To do this search for the following bean,
"xlsExportParameters"
and change the following property to false,
<property name="detectCellType" value="false"/>
Restart Tomcat for changes to take effect. After that you should be able to see your desired formatting on excel too.
Cheers!
Wednesday, December 29, 2010
Sybase SQL Anywhere Database Tracing and Profiling
To the Post
Wednesday, November 24, 2010
Integrating SharePoint and Silverlight 3
Link to Article
Cheers!
Tuesday, November 23, 2010
Install or Copy Assembly / dll into GAC in Vista
I had to do a bit of googling and found this way in one of the forums. You need to use the "Microsoft .NET Framework 2.0 Configuration" utility which lets you Install / Uninstall assemblies from the GAC easily. You can find this utility in the following location
"C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\mscorcfg.msc"
When you open the utility, there is a node called My Computer in the left hand pane. Expand it and click on the sub node "Assembly Cache". This will give you two options in the right hand pane, "View List of Assemblies...." and "Add an Assembly to ...". You can use the second option to add the assembly to GAC.
Hope this helps,
Cheers!
Wednesday, November 17, 2010
Import, Export, Transfer Multiple Tables with Pentaho Kettle
Step1: Create a Job in kettle.
You can do this simply going to file --? new --> Job
Step2: Create Data Connections
You need to create the source and destination database connections. You can do this in the view tab, right clicking the Data Connection and selecting New Data connection.
Step3: Open the wizard to Create the Job
Once the source and destination connections are in place, it's time to create the job that will actually copy the data. Go to Tools --> Wizards --> Copy Tables. In the first view select the source and the destination connections and press next. Then select the tables from the source connection that should be copied to the destination. In the third step of the wizard, provide details where the job and the relevant transformations should be saved. Press finish and it will create a new job with all the Create Scripts and Transformations.
Things to consider,
1. The wizard would not create Create Scripts for already existing tables in the Destination Database.
2. Based on what destination database product used, SQL Server, PostgreSQL, there might be things missing from the source database. i.e, Default Values, Identity Columns created as ordinary Numeric columns ..etc. In that case, it had better if the destination tables can be manually created.
There might be more considerations that should be taken care of, but these are what I came across.
Hope this helps!
Configure email in JasperServer with SMTP Authentication
In this case you need to modify a file called "applicationContext-report-scheduling.xml". This file can be found in TOMCAT Installation Folder\webapps\jasperserver\WEB-INF folder. You need to find the following tag <bean id="reportSchedulerMailSender"....
and put the following property inside it,
<property name="javaMailProperties">
<props>
<prop key="mail.smtp.auth">true</prop>
</props>
</property>
Restart tomcat and things should work fine. Refer to the following forum thread where I got the answer for my post.
Forum Thread
Monday, November 15, 2010
Transfer / Load data to PostgreSQL using SQL Server , SSIS
PostgreSQL Native OLEDB Provider (PGNP)
Once you install the driver, you can use it in SSIS, SQL Server ....etc as an ordinary OLEDB provider to directly load data to Postgres tables.
Cheers
Extracting data from Sybase SQL Anywhere using SSIS through ODBC
Step1: Create DSN
The first thing I did was to install SQL Anywhere on my computer so that it installs all the ODBC and OLE DB drivers. In my case I used the ODBC driver for SQL Anywhere 10. I created a system DSN using the odbc driver. I used the following values for the connection properties,
In ODBC Configuration for SQL Anywhere 10,
Under ODBC Tab,
I have given a name for my Connection in "Data Source Name" field.
Under Login Tab,
I have selected the "Supply User ID and Password" option and entered the credentials there.
Under the Database Tab,
Server name: The Name of the Sybase Server you are connecting to
Database name: The Name of the database.
And finally under Network Tab,
I have selected TCP/IP checkbox and entered the following details in the textbox next to it,
HOST=IP Address of the server;PORT=port number sybase server listens to(default 2638)
Go back to the ODBC tab and click on the "Test Connection" button which should give a test successful message box if everything went well.
Step2: Create Connection in SSIS
In SSIS, right click on the connection managers secsion and select ADO.NET connection. On the Connection Manager window, you need to select "odbc data provider" for the Provider. Then select the System DSN you created in the Use User or System data source name combo box. Test the connection to ensure that the connection is working.
Step3: Configure Data Reader Source
Inside a Data Flow Component, drag and drop a Data Reader Source and open its properties window.
Under the Connection Managers Tab,
Select the ADO.NET connection manager we just created from the Connection Manager combo box.
Under the Component Properties Tab,
Under Custom Properties, type in the Select Query in the text box next to "SQL Command" field.
In the Columns Mapping Tab,
Check whether the columns selected in the Select Query are correctly mapped with the out put columns. Generally these two should be identical. Press ok to close the window.
Ok now you are ready to extract data from a SQL Anywhere table. You can connect the dataflow with other transformations/Destinations.
Cheers!
Monday, November 08, 2010
Rebuild and Reorganize Indexes in SQL Server
Rebuilding all the indexes in a table
ALTER INDEX ALL ON dbo.Customers REBUILD
Rebuilding a specific index
Alternatively you can re-organize indexes instead of rebuilding them when the index is fragmented, but not very much. Re-organizing an index would not be as costly as Rebuilding. Also it would not need the table to be locked during the process as rebuilding would. Here's the TSQL for reorganizing an INDEX.
ALTER INDEX ALL ON dbo.Customers REORGANIZE
Tuesday, November 02, 2010
SharePoint and JasperServer Integration
But luckily JasperServer comes with its web services. Specially the "Repository" web service to administrate the resources in the JapserServer repository and "ReportScheduler" web service to work with all the scheduled jobs in JasperServer. the wsdls for these web services can be found in the following locations respectively,
http://
http://87.253.130.134:8083/jasperserver/services/ReportScheduler?wsdl
I created a custom web part for sharepoint that has mainly two interfaces. The first to list all the schedules that is currently on JasperServer and the second, once you click on a particular schedule it will display details of the schedule also a button to re-run that job, I recall, re-run it with one click.
This is simple. ReportScheduler web service has several methods, together which will achieve this.
The main method that is used in the webserivce to create a scheduled job is "scheduleJob()" This requires an object of type "Job" as its input parameter. Job object contains all the detail of a JasperServer scheduled job such as, reportUnitURI, baseOutputName, Email....etc.
So how to re-run an existing schedule?
First you need to get the job id of the scheduled job you need to re-run. and use the GetJob() method, which requires jobid as its input param. This method will return an Job type object which represent the scheduled job of the given jobid. you can get a copy of this Job type object but with a bit of change. There are two types of calendar triggers you can create. Calendar Trigger and Simple Trigger. you can create an new object of type Simple Trigger and make the Star Date/Time and End Date/Time null. Then you need to set this simple trigger as the copied Job type object's simple trigger. Now you have a Job object with a simple trigger that has null start and end dates.
Now you can call the method ScheduleJob() and pass your job object to it which will create a new Run Now job but with all the details of the old job. you can create a button and do this creating new job thing in it's event handler class.
This is just an overview of what I did to implement Re-Run functionality on SharePoint which is not provided out of the box by JasperServer. Hope this helps and below are some screenshots of my simple webpart,
Cheers!
Thursday, July 01, 2010
Repository Migration from JasperServer Professional (Pro) to Community Edition (CE)
At some point I have almost given up after getting hundreds of errors and was going to manually upload all the reports, data sources, and create schedules. But bingo, something came to my mind. Instead of getting a full export from the Pro version, why not taking several exports of only the reporting folders? Yes that worked out. Yes, it is not as easy as the complete export, but much much easier than doing everything manually. I took several exports, specially of reporting schedules, avoiding resources that are not supported in the community edition, such as analysis views..etc. After that I individually imported these to my community edition and here it works smoothly.
So the trick is, if you ever want to transfer resources from a Pro version to Community version of JasperServer, take several exports/backups from the pro avoiding resources,features that are only supported in Pro. This will save your day!
Cheers!
Sunday, May 17, 2009
Gauges in SSRS 2008, The feature I have been waiting for!
Gauges that show the exact percentage amount, as I have experienced with most of the clients, has been one of the features that people mostly ask for in BI reporting/Dashboards. People ask for cost effective BI solutions with one platform. Microsoft SQL Server is a very good example for that since it provides a Database Engine for the Relational Data Warehouses, Powerful ETL tool (Integration Services), Multidimensional Database (Analysis Services) and lastly, A reporting Server (Reporting Services). When it comes to BI reporting, we could convince our customers with SQL Server Reporting Services as a complete BI platform because it has most of the stuff BI Features like drill down reports, Charts of various kinds, Dashboards….etc. But most of them asked for Gauges, showing us Business Objects Dashboards and, to have gauges on SSRS we had to use 3rd party tools such as Dundas Gauges.
But with SQL Server Reporting Services 2008, we are lucky to have built in gauges which we can use on SSRS reports and dashboards. I have put a screenshot of an example below.

Note that you can use gauges the same way you used charts. Its available in the toolbox of SQL Server Business Intelligence Development Studio. Drag and drop a gauge to the report area and try out different properties. You have a vast range of gauge types available, and also you have the flexibility to customize the look and feel of the gauges, such as colours of the different parts of the gauge …etc.
Enjoy the new feature!!
Friday, June 22, 2007
Thursday, June 21, 2007
Problem Running Bugzilla - Internal Server Error!!
wel the same thing happened to me too, after strugling for several days, this is the cause of it I found,
as you know you must put the following sataments in the httpd.conf to make .cgi file to run by apache using perl.
AddHandler cgi-script .cgi
Options Indexes FollowSymLinks ExecCGI
ScriptInterpreterSource Registry-Strict
But how does apache know where perl is? the problem is there, you must create registry values for .cgi extension so that apache can use perl to run them.
You can add the followng entries in the registry,
create the following key;
HKEY_CLASSES_ROOT\.cgi\Shell\ExecCGI\Command
Put 'default' value with the path to perl.exe followed by "-T"
example: C:\Perl\bin\perl.exe -T
Run bugzilla again, things should be ok if you have done other configurations correclty.
Chears!
Supun

