Saturday, March 10, 2012

How to call crystal report in Visual Basic 2010 with Record Selection Formula

Visual Basic Sample code on how to call and filter crystal report in Visual Basic 2010 using the Record Selection Formula. Download Project


Visual Basic Source Code
 
Imports CrystalDecisions.CrystalReports.Engine
Imports System.IO

Public Class Form1


    Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim cryReport As New ReportDocument
        RepLocation = Path.GetFullPath( _
            Path.Combine(Application.StartupPath, "..\..")) & _
            "\CrystalReport1.rpt"

        cryReport.Load(RepLocation)
        If TextBox1.Text <> "" Then
            cryReport.RecordSelectionFormula = "{Customer.CustomerID} = " & TextBox1.Text
        End If
        CrystalReportViewer1.ReportSource = cryReport
        CrystalReportViewer1.Refresh()
    End Sub
End Class

58 comments:

djiesoft team said...

keren!!!! sip banget!

Zil said...

thanks for this piece of code!! :)

gunadaya said...
This comment has been removed by the author.
gunadaya said...

ijin sedot gan...thanks
Gunadaya.com

aparna john said...

Hi, Nice Visual Basic Program in Crystal Report.Thanks, its really helped me......

-Aparna
Theosoft

Purushothaman Mathakode said...

Superb and Simple Coding

Anonymous said...

Plese Could you send your code..

Thanks a lot

peterson said...

Your information about VB scripts is really interesting and innovative. Also I want you to share latest updates about this VB. Can you update it in your website? Thanks for sharing
Dot net training institute in Chennai

venkatesh krishna said...

Nice peice of example. thanks for sharing

SEO training in chennai

murali karthik said...

Thanks for sharing your informative article on investing in social media marketing. Your entire blog was totally awesome. Keep on updating with such awesome information. SEO Training in Chennai

jack wilson said...

Thank You for Sharing Valuable Information. I like this blog and this is very informative.

Dot Net Course in Chennai

Anonymous said...

Thanks a lot.i have learned to lot. of information.hadoop training chennai

john son said...

This information you provided in the blog that was really unique I love it!!, Thanks for sharing such a great blog..Keep posting..

J2EE Training in Chennai

Anonymous said...

Thank you so much.hadoop training in chennai

Mahesh Gajipara said...

Thank You Very Much Its Really Working

Tutarni Aliya said...

Hi visualbasicnetcode Thanks for your post, really working for the practics

Andria BZ said...

Thanks for sharing these niche piece of coding to our knowledge. Here, I had a solution for my inconclusive problems & it’s really helps me a lot keep updates…
DOT NET Training in Chennai

rebeka christy said...

Dot Net Training Chennai

Thanks for your wonderful post.It is really very helpful for us and I have gathered some important information from this blog.If anyone wants to get Dot Net Training in Chennai reach FITA, rated as No.1 Dot Net Training Institute in Chennai.





jack wilson said...

I have read your blog and i got a very useful and knowledgeable information from your blog.its really a very nice article. I did Loadrunner Training in Chennai. This is really useful for me. Suppose if anyone interested to learn Manual Testing Training in Chennai reach FITA academy located at Chennai Velachery.

regards...

Software Testing Training in Chennai

dhanamlakshmi palu said...

.This Information very helpful for the beginners.In this each step have a wonderful explaination.I would study and known about the application.thanks for giving wonderful information.
PHP Training in chennai | PHP Training chennai | PHP course in chennai | PHP course chennai

Jitendra singh said...

this information very useful and helpful . i am very interested your post
website designing company in India

Isak Hoxha said...

thanks, an important source for me

Roberto said...

Muy bueno.
Mas ejemplos: http://tupagina.comuf.com/

Zach said...

I am using crystal report 9. Once i install my program (vb.net 2008) on any other PC with different SQL server name, to view the reports it is asking database connection and if i give relative server name,user and pass it will fail to connect. So i need to know how to update connection string for reports dynamically.

PLC Training in Chennai said...

thanks for sharing

Rohit P said...

nice informative article
good to know that reports also has this kind of presentations
seo reports also helps in analysis your complete business online through different mode of digital marketing
just learn seo seo training in bangalore

Priya said...

Really interesting content which is interesting and provided me the required information.
SEO Training in Chennai | SEO courses in Chennai | SEO training Chennai | SEO institutes in Chennai

Web Designers Pitampura said...

This is the precise weblog for anybody who needs to seek out out about this topic. You notice so much its almost arduous to argue with you. You positively put a brand new spin on a subject that's been written about for years. Nice stuff, simply nice!

akmal niazi khan said...

Programming is very interesting and creative thing if you do it with love. Your blog code helps a lot to beginners to learn programming from basic to advance level. I really love this blog because I learn a lot from here and this process is still continuing.
Love from Pro Programmer

NetTech India said...

Thanks for sharing such a useful information.
We a whole team from Nettech India appreciates you.

NetTech India said...

Thanks for sharing such a useful information.
We a whole team from Nettech India appreciates you.

Nikshitha S said...

The usage of third party storage system for the data storage can be avoided in cloud computing and we can store, access the data through internet.
cloud computing training in chennai | cloud computing courses in chennai

Nikshitha S said...

Well Said, you have furnished the right information that will be useful to anyone at all time. Thanks for sharing your Ideas.
Hadoop Training Chennai | PHP Training in Chennai

Nikshitha S said...

The content you posted helps me to get the in depth knowledge about the various technology and it is very interesting to go through it. Thanks for sharing it.
AngularJS Training in Chennai | AngularJS course in Chennai

YouLoseBellyFat said...

VBasic Examples

Mobile Game Developers Delhi said...

Awesome work.Just wanted to drop a comment and say I am new to your blog and really like what I am reading.Thanks for the share

mythily mythu said...

Awesome work.
hibernate training in chennai

1croreprojects said...

Thanks for sharing this valuable information.
ieee java projects in chennai
ieee dotnet projects in chennai
mba projects in chennai
be projects in chennai
ns2 projects in chennai
mca projects in chennai
bulk projects in chennai
bsc projects in chennai
msc projects in chennai

Iqbal Dlk said...

very nice and informative blog
dot net training in chennai
java training in chennai

Iqbal Dlk said...

very useful blogs.
hotels near us consulate chennai
hotels near apollo hospital chennai

yasar said...

very nice and informative blog
big data projects chennai
mobile computing projects chennai
cloud computing projects chennai
secure computing projects chennai

Rajapriya R said...

helpful article.. this blog having very clear content so easy to understand

dot net training | best dot net training | dot net training and placement | dot net training in chennai

sunitha vishnu said...

It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
Android Training in Chennai
Ios Training in Chennai

unknown said...

The Spring Framework is a lightweight framework for developing Java enterprise applications. It provides high performing, easily testable and reusable code. Spring handles the infrastructure as the underlying framework so that you can focus on your application.Spring is modular in design, thereby making creation, handling and linking of individual components so much easier. Spring implements Model View Container(MVC) design pattern.
spring mvc form example

George Morgan said...

Very interesting article for readers, It is providing complete details in a easiest way. Really liked it.

Now website development buffalo ny service is available with complete professionalism in reasonable budget.

tansitanu said...

Appreciation for really being thoughtful and also for deciding on certain marvelous guides most people really want to be aware of.
Hadoop Training Institute In chennai

amazon-web-services-training-in-bangalore

shethal said...

I am really happy with your blog because your article is very unique and powerful for new reader.
Best rpa training Institute in chennai

samyak It said...

Helpful Blog.
visit: VB.net training

Anonymous said...

Hi, thanks for sharing such an informative blog. I have read your blog and I gathered some needful information from your blog. Keep update your blog. Awaiting for your next update. mulesoft training india

impress bss said...

Thank you for sharing valuable information
Mobile app development company in chennai
Web design company in chennai
Web development company in chennai

Mia Sofia said...

I applaud the publication of your artilce on interesting subject. It's a good reminder to look on the useful information.

hadoop training velachery
hadoop training omr
hadoop certification chennai
hadoop classes chennai
hadoop architect training in chennai
hadoop training centres in chennai

viswanath said...

AWS Training in Bangalore - Live Online & Classroom
myTectra Amazon Web Services (AWS) certification training helps you to gain real time hands on experience on AWS. myTectra offers AWS training in Bangalore using classroom and AWS Online Training globally. AWS Training at myTectra delivered by the experienced professional who has atleast 4 years of relavent AWS experince and overall 8-15 years of IT experience. myTectra Offers AWS Training since 2013 and retained the positions of Top AWS Training Company in Bangalore and India.

IOT Training in Bangalore - Live Online & Classroom
IOT Training course observes iot as the platform for networking of different devices on the internet and their inter related communication. Reading data through the sensors and processing it with applications sitting in the cloud and thereafter passing the processed data to generate different kind of output is the motive of the complete curricula. Students are made to understand the type of input devices and communications among the devices in a wireless media.

aruna raj said...

Appreciation for really being thoughtful and also for deciding on certain marvelous guides most people really want to be aware of.
Hadoop Training in Chennai

Hadoop Training in Bangalore

Big data training in tambaram

Big data training in Sholinganallur

Big data training in annanagar

pooja saravanan said...

Have you been thinking about the power sources and the tiles whom use blocks I wanted to thank you for this great read!! I definitely enjoyed every little bit of it and I have you bookmarked to check out the new stuff you post.


MEAN stack training in Chennai

MEAN stack training in bangalore

MEAN stack training in tambaram

MEAN stack training in annanagar

MEAN stack training in Velachery

gowsalya said...

Great post! I am actually getting ready to across this information, It’s very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
Devops Training in Chennai

Devops Training in Bangalore

kevingeorge said...


Great post! I am actually getting ready to across this information, It’s very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.

rpa training in Chennai

rpa training in anna nagar | rpa training in marathahalli

rpa training in btm | rpa training in kalyan nagar

rpa training in electronic city | rpa training in chennai

rpa online training | selenium training in training

Mouni yoga said...

This is very good content you share on this blog. it's very informative and provide me future related information.
Python training in marathahalli
Python training in pune
AWS Training in chennai

Afiah B said...

It is better to engaged ourselves in activities we like. I liked the post. Thanks for sharing.

java training in chennai | java training in bangalore

java online training | java training in pune

Post a Comment

 
Powered by Blogger