05 Desember 2011

Journey to SQL Authority with Pinal Dave - SQLAuthority News – Microsoft SQL Server ODBC Driver for Linux Available Now


Posted: 03 Dec 2011 05:30 PM PST
Yesterday I went to watch movie based on recommendation of the readers on myFacebook page. If you think we only discuss SQL on facebook page, it is not correct. We discussion pretty much everything what DBA do in their daily life.
During the movie, someone recognized me from our blog photo. He changed his sit and while I was watching movie and asked couple of quick question. I understand it is a bad manner to talk in movie while others are watching but still answered him quickly. Let us call him Jatin.
Here is our conversation:
Jatin: Are you Pinal Dave?
Pinal: I guess so.
Jatin: Guess?
Pinal: I am.
Jatin: I have one SQL question?
Pinal: Sure – can we talk after the movie is over.
Jatin: This movie is boring any way.
Pinal: Hm… Some may like it too. Any way we should talk afterwords. 
Jatin: Answer me when you can – how can I connect from Linux box to SQL Box?
Pinal: Oh… why do you want to do that?
Jatin: Now you are asking me question and prolonging the conversation – see you lost interest from this boring movie.
Pinal: Oh…I did… (silence)… you are correct. Let us talk after the movie.
Jatin: Nice blog by the way, I read it every day.
Well, that was it, after the movie was over – we all rushed outside and never connected. I never met Jatin afterwords, Infact, I do not know what is his real name. I wanted to answer his question and reason why he wanted to use Linux box to connect to SQL Server installed machine. Any way, Jatin if you are reading my blog everyday as you said, here is your answer. Please leave your answer in comment as well – do mention your real name and details so we can continue our conversation.
The Microsoft SQL Server ODBC Driver for Linux provides native connectivity from Linux to Microsoft SQL Server. The 64 bit version of the Microsoft SQL Server ODBC Driver for Linux provides robust data access to Microsoft SQL Server. It allows native C and C++ applications to leverage the standard ODBC API and connect to Microsoft SQL Server 2008 R2. Microsoft SQL Server ODBC Driver for Linux also comes with powerful tools – sqlcmd and bcp.
Reference: Pinal Dave (http://blog.SQLAuthority.com)

Filed under: PostADaySQLSQL AuthoritySQL DownloadSQL Query,SQL ServerSQL Tips and TricksT SQLTechnology       

BAN MEETS WITH AFGHAN PRESIDENT AHEAD OF INTERNATIONAL CONFERENCE

BAN MEETS WITH AFGHAN PRESIDENT AHEAD OF INTERNATIONAL CONFERENCE
New YorkDec  4 2011  6:10PM
Secretary-General Ban Ki-moon on Sunday stressed the unity of the international community in supportingAfghanistan for the long term, as he met with President Hamid Karzai in Bonn, Germany, ahead of the conference set to convene there on Monday

During their <http://www.un.org/apps/sg/offthecuff.asp?nid=2110>meeting, Mr. Ban also expressed concern about the security situation in Afghanistan, according to information provided by his spokesperson.

The Secretary-General noted that the United Nations, through its mission in the country (UNAMA), will continue to work with the Afghan Government towards a sustainable peace. 

He also insisted on Afghan ownership of the peace process, which should be inclusive, and called on the country to continue on the road to full inclusion of all, especially women, in all aspects of life. Respect for human rights must be a cornerstone of government poli
cy, he added.

The conference, which will be chaired by Mr. Karzai, will focus on helping the country on the path towards greater democracy, stability, security and economic development. 

Also in attendance will be Staffan de Mistura, the Secretary-General's Special Representative and head of UNAMA, and Hervé Ladsous, the Under-Secretary-General for Peacekeeping Operations.

Mr. Ban also met on Sunday with German Foreign Minister Guido Westerwelle, with whom he held wide-ranging <http://www.un.org/apps/sg/offthecuff.asp?nid=2109>discussions on the situation in Afghanistan, as well as the situation in SyriaIran, the Middle East and North Africa.  

Dec  4 2011  6:10PM

SOCCER STAR DAVID BECKHAM VISITS UNICEF-BACKED SHELTER IN THE PHILIPPINES

SOCCER STAR DAVID BECKHAM VISITS UNICEF-BACKED SHELTER IN THE PHILIPPINES
New YorkDec  2 2011 12:10PM
David Beckham tried his hand at sewing, took part in an art class and played a game of soccer with local students this week as the Goodwill Ambassador for the United Nations Children’s Fund (UNICEF) visited the Philippines to spotlight the plight of young people in need.

The soccer ace toured a UNICEF-supported centre in Manila, the national capital, that is home to about 130 former street children aged between seven and 17, the agency said in a press release issued today.

As many as 250,000 children are estimated to be living and working on the streets across the Philippines, and UNICEF noted they are particularly vulnerable to violence, abuse and exploitation.

“As a father, I can’t imagine how life was for these young children living and working on the streets,” Mr. Beckham <"http://www.unicef.org/philippines/mediacentre_17803.html">said. “They are exposed to so many threats and dangers, and are missing out on the basics in life – having people around who love and guide them.”

The centre provides classes in different subjects, including sewing and art, as part of its livelihood programme for the children that also helps to build their self-esteem.

His visit concluded with a 20-minute football game with young players from the shelter.

“Whilst many of these children have been through tough experiences in their young lives, like any child they still have hopes and dreams,” he said. “The staff here has a huge responsibility and they are doing an amazing job giving these children the love, guidance and care they’ve been missing.”

Mr. Beckham, 36, has served as a Goodwill Ambassador for UNICEF since 2005. One of the most famous footballers of his generation, the midfielder has played for Manchester United, Real Madrid and LA Galaxy, among other clubs, and has also played more than 100 times for the English football team.
Dec  2 2011 12:10PM

We Bought a Zoo Trailers & Video Clips

Studi AL-Quran


CONTOH PROPOSAL STUDI ALQURAN PDF EBOOK FREE DOWNLOAD

Last 10 searches : Contoh proposal studi alquran Orlando international airport Free books about oman Sexuality 5 Gionale de santé 2010 2 7 Obat jerawat batu tradisional Gsm ...
Sumber: http://www.pdf-search-engine.com/contoh-proposal-studi-alquran-pdf.html

OS ADMINISTRATIVOS PDF EBOOK FREE DOWNLOAD

Last 10 searches : Os administrativos Contoh proposal studi alquran Orlando international airport Free books about oman Sexuality 5 Gionale de santé 2010 2 7 Obat jerawat ...
Sumber: http://www.pdf-search-engine.com/os-administrativos-pdf.html

13376 PDF EBOOK FREE DOWNLOAD

Last 10 searches : 13376, Pwd E resumo Seni visual Epidemiology lecture note ppt Kamehasutra couleur fr images Provansa Os administrativos Contoh proposal studi alquran ...
Sumber: http://www.pdf-search-engine.com/13376,-pdf.html

SENI VISUAL PDF EBOOK FREE DOWNLOAD

Last 10 searches : Seni visual Epidemiology lecture note ppt Kamehasutra couleur fr images Provansa Os administrativos Contoh proposal studi alquran Orlando international ...
Sumber: http://www.pdf-search-engine.com/-seni-visual-pdf.html

E RESUMO PDF EBOOK FREE DOWNLOAD

Last 10 searches : E resumo Seni visual Epidemiology lecture note ppt Kamehasutra couleur fr images Provansa Os administrativos Contoh proposal studi alquran Orlando ...
Sumber: http://www.pdf-search-engine.com/e-resumo-pdf.html

METODOLOGI BIBEL DALAM STUDI ALQURAN PORTAL ISLAM

Metodologi Bibel dalam studi Alquran, Ardin Armas. Penulis Adnin Armas, M.A. ... Some HTML allowed:
Sumber: http://portalislam.wordpress.com/2009/11/04/metodologi-bibel-dalam-studi-alquran/

STUDY SAYS MALARIA HELPS SPREAD HIV KRISTIANI POS BERITA TERKINI

LAI Terbitkan Alkitab Edisi Studi; Marilah, Makanlah Hidanganku; Andreas Yewangoe: Pemerintah ... Tokoh Gereja Kecam Hari Membakar Alquran; Kerukunan Hidup Beragama Butuh Kepastian Hukum
Sumber: http://www.christianpost.co.id/life/health/20070131/4784/Study-Says-Malaria-Helps-Spread-HIV/index.html

MUHAMMAD DAN KRISTUS PORTAL ISLAM

Some HTML allowed:
Sumber: http://portalislam.wordpress.com/2009/11/04/muhammad-dan-kristus/

RE KISAH KISAH PARA PEMBURU MAYAT DI ACEH DARI PIKIRAN ACTON RALAT

... mbak Lina.... > Metodologi Sejarah koq dibilang Metodologi Bibel...??? > > ===== > > Senin, 29 Nopember 2004 > > Pengaruh Metodologi Bibel Terhadap Studi Alquran ...
Sumber: http://osdir.com/ml/culture.region.indonesia.ppi-india/2005-02/msg01283.html

TERJEMAH TAFSIR JALALAIN PORTAL ISLAM

Some HTML allowed:
Sumber: http://portalislam.wordpress.com/2009/06/18/terjemah-tafsir-jalalain/www.google.co.id

01 Desember 2011

Step by Step Creation of Crystal Report using its Features Group, Graph, Cross-Tab and Sub Report


This article will help you to create reports using Crystal Reports. Here I am giving a step by step idea to create reports in an easy way. Here I have covered Crystal reports features such as Grouping, Graph, Cross-Tap, Sub report, etc.
I am going to explain the below 5 features:
  1. Simple Crystal Report
  2. Group in Crystal Report
  3. Graph in Crystal Report
  4. Cross-Tab in Crystal Report
  5. Sub report in Crystal Report

Using the Code

Let’s start by creating a new ASP.NET Web Site. Figure 1 shows the initial web site creation screen.
fig1.PNG
Figure 1
By clicking OK button, you can see the project created in solution explorer. Now let’s start with Crystal Report.
Before that, I am going to show my table structure and data in table. So this will help you to understand the steps easily. Figure 2 will show the table structure and Figure 3 will show the data in table.
fig2.PNG
Figure 2
fig3.PNG
Figure 3
But in the attached project, I am getting data from the XML file. I have saved all the data from table to XML. So you can easily use the attached project. Next Dataset (xsd file) creation.
There are so many ways to pass the data to Crystal Report. Here I am using Dataset (xsd file) to bindCrystal Report. In my point of view, this is the best way to bind. So, next step is Dataset (xsd file) creation.
Go to Solution Explorer -> Right click on the Project -> Add New Item. Figure 4 shows the Dataset creation.
fig4.PNG
Figure 4
Once you click on Add button, it will ask one confirmation message. Just click yes. Now you can see thedsTestCrystal.xsd dataset file opened in Visual Studio. Here you need to create one Data Table with all the columns names you need to shown in Crystal Report. To Create Data Table, see the below Figure 5.
fig5.PNG
Figure 5
Now you can see Data Table created in the Dataset. Next, we need to add the columns names need to shown in Crystal ReportPlease note that this Data Table column names and data types should be the same as your table in database. If you are getting any data type property mismatching error, just think that this is the problem. To Create Column names, see the below Figure 6.
fig6.PNG
Figure 6
Add all the columns one by one and set the correct data type. Here by default, data type is string. If any columns have different data type, we need to change manually. In this project, I am using ‘Marks’ column data type as int. So to change the data type, see the below Figure 7.
fig7.PNG
Figure 7
Dataset (dsTestCrystal.xsd) creation has been done. Now we need to design Crystal Report.

1. Simple Crystal Report

Go to Solution Explorer -> Right click on the Project -> Add New Item. Figure 8 shows the Dataset creation.
fig8.PNG
Figure 8
On click of Add button, you will get Crystal Report Gallery window. In that, select Using the Report Wizardcheck box and Click OK button. Now you will get the below Figure 9.
fig9.PNG
Figure 9
Now expand the ADO.NET Datasets folder. There you can see the Dataset (dsTestCrystal) we created. Under dsTestCrystal, you can see the Data Table we created. So select this Data Table and click the arrow button to move to the Selected Tables list box as shown in the below Figure 10.
fig90.PNG
Figure 10
Just click the Finish button. Now you can see the Crystal Report opened in Visual Studio. In your left side, you can see Field Explorer. In case you cannot see it there, just go to menu Crystal Reports -> Field Explorer. Field Explorer View is shown in below Figure 11.
fig91.PNG
Figure 11
Now you can drag and drop the columns from Field Explorer to Details Section in Crystal Report. You can see the final view of the Crystal Report in the next Figure 12.
fig92.PNG
Figure 12
Crystal Report design also done. Now we need to pass the data to the Dataset (dsTestCrystal) and we need to set this Dataset to Crystal Report.
Now just create one aspx page. Add the below code in .aspx page.
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"
DisplayGroupTree="False"  />   
Then write the below code in .aspx.vb page to generate Crystal report.
Dim rptDoc As New ReportDocument
Dim ds As New dsTestCrystal
Dim sqlCon As SqlConnection
Dim dt As New DataTable
dt.TableName = "Crystal Report Example"
sqlCon = New SqlConnection("server='servername';
Initial Catalog='databasename';user id='userid';password='password'")
Dim da As New SqlDataAdapter("select Stud_Name, Class, 
Subject, Marks from stud_details", sqlCon)
da.Fill(dt)
ds.Tables(0).Merge(dt)
rptDoc.Load(Server.MapPath("SimpleCrystal.rpt"))
rptDoc.SetDataSource(ds)
CrystalReportViewer1.ReportSource = rptDoc 
Now run your page and the data generated in Crystal Report.

2. Crystal Report using Grouping

Here I am going to explain only the Crystal Report design. Remaining things you can refer from the previous one.
I am going to use the Group like Class -> Name -> Subect & Marks. Here Class and Name is Group. Subject and Marks will come in detail section. To create Group, see the below Figure 13 & 14.
fig93.PNG
Figure 13
fig94.PNG
Figure 14
Class is the main group. So first we need to move Class field to Group By list box by clicking the arrow button. Then we need to move the Stud_Name field. See the below Figure 15.
fig95.PNG
Figure 15
Now click OK button and see the difference in Crystal Report. There you can see two Header & Footer added and two fields Group #1 Name, Group #2 Name. Group #1 Name is Class and Group #2 Name isStud_name. See the below Figure 16.
fig96.PNG
Figure 16
Now you can drag and drop the columns from Field Explorer to Details Section in Crystal Report. You can see the final view of the Crystal Report in the next Figure 17.
fig97.PNG
Figure 17
Now I am going to add sum of marks for the student. In Stud_Name GroupFooterSection, we need to add this sum. See the below Figure 18.
fig98.PNG
Figure 18
On click of Summary you will get the below Figure 19.
fig99.PNG
Figure 19
We need the sum of Marks column. So select Marks field from first combo box. Then select Sum from the second combo box. Finally, we need sum of marks for each student. So we need to select Stud_Name group from third combo box. Then click OK button. Now you can see the sum field added in Stus_Name footer section. See the Final view of Crystal Report in the below Figure 20.
fig100.PNG
Figure 20

3. Chart in Crystal Report

Here also, I am going to explain only the Chart design. Remaining steps are the same as the first one.
I am going to show the students total marks student wise. X-axis is Student names and Y-axis is Total Marks. Lets start the creation of chart. See the below Figure 21.
fig101.PNG
Figure 21
Once you click the Chart, you will get the below Figure 22. Here you can see number of chart formats. So you can select any one from here. I am selecting Bar from the options.
fig102.PNG
Figure 22
Now move to the second tab which is Data. See the below Figure 23.
fig103.PNG
Figure 23
As I said earlier, Stud_Name we are using in X-axis. So we need to move Stud_Name to first (on change of) list box. Then move Marks to the second list box (Show value(s)). By default, Sum will display there. If you want to change Sum to some other, you can change by clicking the Set Summary Operation button. Then click Ok button. You can see the chart created in Report Header section. See the Final view of Crystal Report in the below Figure 24.
fig104.PNG
Figure 24
Now Run the web site and see the chart. That’s all. It’s done.

4. Cross-Tab in Crystal Report

Here also, I am going to explain only the report design. Remaining steps are the same as the first one.
First, you need to know the reason why we need to use Cross-Tab. If you want to display the subject column wise, we need to use cross-Tab. Because subject can vary for different class, we cannot design report with fixed columns. So in this scenario, we can go for Cross-Tab. See the Cross-Tab report creation in below Figure 25.
Note: We can place Cross-Tab only in Report Header/Footer.
fig105.PNG
Figure 25
Once you click the Cross-tab, you can see the rectangle mouse pointer. So you need to place that only inReport Header/Footer. Once you place that, you will get the below Figure 26.
fig106.PNG
Figure 26
As I said in the earlier, we are going to put subject in column wise. So move Subject field to Columns listbox. Then before showing the marks of each subject, we need to show the Student name. So Move Stud_Name to Rows listbox. Finally move Marks to Summarized Fields listbox. Then click Ok button. You can see the reportcreated in Report Header/Footer section. See the Final view of Cross-Tab Report in the below Figure 27.
fig107.PNG
Figure 27
Now Run the web site and see the report. That’s all. It’s done.

5. Sub Report in Crystal Report

Here also, I am going to explain only the report design. Remaining steps are the same as the first one.
Here, I am going to show the each students' marks in graph by using sub report. So, to use sub report, first I am going to create student group header. See the below Figure 28.
fig108.PNG
Figure 28
Then in group header section, we need to create sub report. To do this, follow the below Figure 29.
fig109.PNG
Figure 29
Then place the mouse in the group header section. Once you place the mouse cursor, you will get one popup window. See the below Figure 30.
fig110.PNG
Figure 30
Here check the third check box to create new sub report. Then type the sub report name. Then click theReport Wizard button to select data set. Select the dataset like the below Figure 31.
fig90.PNG
Figure 31
Then click the Finish button and click OK button in sub report window. Now follow the below Figure 32 to edit the sub report.
fig111.PNG
Figure 32
Now you will get the below Figure 33. Here you can create Graph by using 3rd section (Graph Creation). Here use Subject as X-axis and Marks as Y-axis. See the below Figure 33.
fig112.PNG
Figure 33
Now Run the web site and see the report. That’s all. It’s done.
I hope that this article will help you.