Click here to Skip to main content
Click here to Skip to main content

Basics of Crystal Report for .NET Programmers

By , 14 Jan 2008
 

Introduction

After I wrote my article about "How to use Crystal Report in .NET", I received several emails about it. Some of you wanted me to make a complete example and explain it more.

Now I have created an example for those who want to know more about using Crystal Report in C#.NET or VB.NET.

My example is designed in Visual Studio.NET 2003 and I'll make another one in Visual Studio .NET 2005 as soon as possible.

Now if you are ready, just follow me and send me your ideas at the end!

Download the Document File and Follow It

Please download the document file from the link at the top of this article, and follow it.

Sample screenshot

Sample screenshot

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

ShahabFatemi
Other
Sweden Sweden
Member
I got double MSc degree in Space Science and Technology from Luleå Technical University in Sweden and Paul Sabatier Toulouse in France.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
QuestionClean data of reportmemberQnhat1 May '12 - 23:53 
Hi,
I have a question about crystal report in visual studio 2008. I use object crystal report viewer for show my report:
 
crystalReportViewer.ReportSource = reportDocument;
crystalReportViewer.ParameterFieldInfo = report.ParameterFields;
crystalReportViewer.Refresh();
 
When I change parameter of report on user interface , memory of program is increase about 3-5 MB. How can I clean old data before change parameter ? I don't know where is data of report. Thanks so much!

GeneralMy vote of 1memberMember 392989916 Mar '12 - 7:13 
political propaganda
GeneralRe: My vote of 1memberShahabFatemi9 Dec '12 - 9:01 
Which politics?
Best wishes!
Shahab Fatemi.

GeneralMy vote of 5memberMember 422335711 Oct '10 - 21:05 
Great example! really appreciate the effort!
GeneralSyntax error in update stmtmemberG.subburaju25 Feb '09 - 21:25 
Hi ,i'm using Ms-Access as an backend with Oledb connection in VB.net.but i execute this following query i'm getting syntax error...kindly help me,if u kow....
 

 

 
Imports System.Data
Imports System.Data.OleDb
Imports System.Text.RegularExpressions
 
Public Class Changepwd
 
Dim con As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=C:\softwarepackage\shiva.mdb")
 
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
 
con.Open()
 
Dim cmd As New OleDbCommand("update login set password ='" & Textnewpwd.Text & "' where username = '" & Textuser.Text & "'", con)
 
cmd.ExecuteNonQuery()
con.Close()
 
MessageBox.Show("Password Changed !Login with ur New Password.")
Textuser.Text = ""
Textnewpwd.Text = ""
Textoldpwd.Text = ""
 
End Sub
 
End Class
GeneralCrystal ReportmemberSanthosh Sebastian11 Feb '09 - 18:53 
Great Work my dear Iranian FriendThumbs Up | :thumbsup:
Generalawesomememberrobinraj19 Jun '08 - 23:30 
gr88 job..keep it up!!!
impressed...
Generalnice jobmemberjehanzebn30 Mar '08 - 23:17 
Very nice article and example. One thing I wanted to know, can we setup an application so that "Father"(in the sample) can use the application himself and not ask "son" to create reports for him.
 
Meaning we create an application for him so he selects the dates, employees himself and create reports?
 
I would like to see a sample in 2005 as I use VS2005, CR 2008 with Informix database using ODBC connection.
 
Great Work overall!
 
Keep it up
 
Regards
 
J
GeneralThanksmembersolham18 Feb '08 - 8:33 
salam
khastam azatoun tashakkor konam .
kheyli khoshhal shodam yek irani dar in sath az malomat va dar in sathe jahani miderakhshe.
Hamed Mortazi
Tabriz
GeneralNice workmemberhugo1412 Feb '08 - 15:52 
Thanks you helped me alot man
QuestionHOW useded justify in crystal reports?memberEhsan Golkar5 Feb '08 - 17:48 
Hi Mr fatemi
your article in nice but i have problem Cry | :(( and could not solve it !?
i used crystal reports and send my info too ( textobject,paramfiels and furmola fields) but when i set property in justify and right to left in report could not see my report true !?
please help me soon
khyly mamnon Smile | :)
QuestionHow to create Guntt Chart in C# Winform?memberuranus122524 Sep '07 - 15:37 
I want to ceate a guntt chart using crystalreport in C# winform application,will you please tell how to finish it?better,give me some demos!
great thanks!
By the way,It is the mid-autumn festival,A important festival in china.wish you have a pleasant
day too and welcome to BeiJing next year for olympic games!
Generalabsolute path information is requiredmemberMaryam Kasravi30 Jul '07 - 0:32 
I have compiled the sample code but when I click the print button to see the crystal report a MessageBox apears which contains the following message:
"absolute path information is required" I have the same problem in my own soloution.the code seems to be in order you described in your document.
 
Kind Regards,
Maryam Kasravi
GeneralRe: absolute path information is requiredmemberShahabFatemi30 Jul '07 - 5:16 
Dear Friend;
 
In my point of view, this problem may be occurred from 2 ways:
1) Your Crystal Report has not been installed thoroughly.Sigh | :sigh:
2) You didn't bind your DataSet to your report correctly.Cool | :cool:
 
Be Happy!
Shahab Fatemi.

GeneralVS 2005 versionmemberNeil Futcher18 Jul '07 - 3:50 
I'm battling my butt off to migrate from VS 2003 to VS 2005.
I'm still using crystal 8.5 to design my reports and feed them via store procs in sql 2000.
Now, in VS 2005, when I try to produce the reports I get a message "The parameter is invalid"
 
HELP PLEASE
GeneralGood ArticlememberTCim17 Jul '07 - 21:37 
That is a very good article u wrote..but where i can find for VS 2005?
 
Thank YouSmile | :)
 
Regard,
 
TCim
General.Net 2005 versionmemberA.leithy17 Jul '07 - 6:42 
salam Alikom
thanks a lot
 
u helped me so much
please if u can send the document and src_code for .Net2005
Generalverywell ShahabmemberSeyyed Ali16 Jul '07 - 18:58 
I Wait for It's Visual studio 2005:-> version
 
Cool | :cool:
 
Seyyed Ali @#@

GeneralGood Work!membertbz26 Jun '07 - 22:46 
Laugh | :laugh: A very nice article. Helped me alot.
thanks!Blush | :O
 
P.S nice idea of .pdf file.Smile | :)
 
tooba!
GeneralGoody boy!memberMuammar©6 Dec '06 - 21:40 
Nice articleCool | :cool:
 
All globalizations are wrong, including this one!

GeneralSimply the best!!!memberphilipg3610 Oct '06 - 16:01 
Great example! really appreciate the effort!
JokeGood workmemberMarcelo Miorelli10 Oct '06 - 3:08 
I thought this article a very good one.
I will see if I can add the database scripts so that it would be even easier for the people that are new on this subject.
(I'm bit of a lazy myself sometimes).
 
Very good Shahab Fatemi,
Congratulations for the good work.;P
 
Hare Krishna

GeneralNice way of documentationmemberIrwan Hassan10 Oct '06 - 3:06 
Hi, I'm not so good in Crystal Report, but after going through your articles, somehow I understand. May be I would go into details and find myself about the benefit of it. Thanks for the great article.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web04 | 2.6.130523.1 | Last Updated 14 Jan 2008
Article Copyright 2006 by ShahabFatemi
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid