Sum Per Group SSRS 2005

Long time not writing about Sql Server Reporting Service 2005.

I found that SSRS 2005 is the best for making the report. I find it’s very easy and fast to make a report.

Below it’s one tip that I will give you about making report using Sql Server Reporting Service 2005 (SSRS 2005)

If you want to make report like this:

[TABLE=5]

To count the %, you need to sum the polling for each group (man, woman, gay)

So what you need to do is add this formula for column % like below

=Fields!Polling.Value/Sum(Fields!Polling.Value, “table1_content_category”)*100

table1_content_category is the name of group (man, woman, gay)

Good luck !!

Rational Unified Process on Vista

I try to install Rational Unified Process on Vista. First, I use java 1.6.0, and it can’t work. It shows error message “an error occured while gathering rup content”. The recomendation says that the software should use jre 1.4.1, so i try to install it. Unfortunately still can’ work. The internet explorer immediately close when the rup is running. So i try java 1.5. It’s work !!! really.

So if you want to try Rational Unified Process you have to uninstall Java 1.6 and install java 1.5.

If there are two version eg java 1.5 and java 1.6, the internet explorer always use java 1.6 while loading java applet.

I try to switch to java 1.5, but still using java 1.6. So the final solution to run Rational Unified process on Vista is, uninstall java 1.6 and use java 1.5.

Web Hosting Experience

Almost 7 months i rent a web hosting at www.nicspace.com. The beginning six months is ok, support handle very fast. But since january 16, 2008, I can’t access that web site again including the CPanel. It’s very bad and disappointed. The support said that mysql administrator is run away and they can’t fix it.

The answer from support is not clear and very slow. If I ask today they will answer tomorrow :(. Hopefully they backup my file on their server and they promise to refund my money, but until now i never receive my money back.

So I make a decision to move to new web hosting company. Now, I use www.pasarhosting.com, so far so good. They can activate your web server in 5 minutes after you pay. And if you want to upgrade the packet, they can do it almost in 5 minutes. very good support.

The other good point is, www.pasarhosting.com using Indonesia Server, so it can be accessed very quicly from indonesia because it’s using IIX connection, no need to route to other country for example Singapore.

But www.pasarhosting.com is still using php 4 and mysql 4. You can’t make a program based on Object Oriented Programming (OOP) methodology. Because OOP only handled since php 5. And there are functions only work on PHP 5.

I hope www.pasarhosting.com can upgrade their server to php 5 and mysql 5 and keep the good support, connection and server performance and stability.

Tips Hide Duplicates Row on Sql Server Reporting Service 2005

When you make a report using microsoft sql server reporting service 2005, sometimes you need to hide duplicates row.

For example you want to make a report like this one:

Period

nomor

description


Total

March 2007

12344

test 1


2

12341

test 2


23

12342

test 3


24

test 4


2

test 5


3

April 2007

12342

test 6


2

test 7


2

12344

test 8


2

test 9


2

test 10


2

So, what you have to do is open the RDL file on your favorite text editor, i use Notepad++, it’s free 😉
Than edit the following code:

<ReportItems>
<Textbox Name=”Period”>
<HideDuplicates>dataset1</HideDuplicates> <!– add this line –>
<rd:DefaultName>Period</rd:DefaultName>
<ZIndex>6</ZIndex>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<FontFamily>Tahoma</FontFamily>
<FontSize>8pt</FontSize>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>=Fields!Period.Value</Value>
</Textbox>
</ReportItems>

<ReportItems>
<Textbox Name=”NOMOR”>
<HideDuplicates>table1_Group1</HideDuplicates> <!– add this line –>
<rd:DefaultName>NOMOR</rd:DefaultName>
<ZIndex>5</ZIndex>
<Style>
<BorderStyle>
<Default>Solid</Default>
</BorderStyle>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<FontFamily>Tahoma</FontFamily>
<FontSize>8pt</FontSize>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>=Fields!NOMOR.Value</Value>
</Textbox>
</ReportItems>

dataset1 is data set which is defined to generate the report.

table1_Group1 is a group based on period.

Why using pointer (c programming)

Today, i receive email from one of forum asking about why we are using a pointer.

As long as I know we can use a pointer for making dynamic array. We can’t use variable without pointer to make a dynamic array. As an example:

We can’t do:

int size;
size=10;
int i[size];

But we have to do:

int size;
size = 10;
int *i=new int [size];

The other reason is if we want to make a function, which one of input parameter is output, we can use pointer. But in my experience it’s better if we use reference. For example

void add(int a, int b, int &c)
{
c=a+b;
}