How to call crystal report from VB?

I am doing an VB application where I need to create reports . I have designed a report & formed needed sql to pass to that report. But I don't know how to pass them off. Can anybody help me on that?
revathiAsked:
Who is Participating?
 
pepe2000Connect With a Mentor Commented:
   CReport1.PrintFileName = ""
    CReport1.ReportFileName = ""
    CReport1.ReportSource = crptDataControl
    CReport1.Destination = CrptToWindow
    Data1.RecordSource = "SELECT..."
    Data1.Refresh
    CReport1.Action = 1

This example works if you can use data control
i dont know what do you want to do with the SQL text, do you have the same output for every sql that you want to send or it can change?

if it can change this example works
 
0
 
OtanaCommented:
You need to place the Crystal Reports Control on your VB Form. Set the report property to your report, maybe some other properties. Set the action property to 1 to execute the report.

CR1.action=1
0
 
revathiAuthor Commented:
I need to use sql for reporting i.e., runtime assignment of either recordset / query as such will be helpful. Any other suggestion is appreciated.
thanks

0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
pepe2000Commented:
There is a property crReport.SQLQuery <SQL text here>
0
 
revathiAuthor Commented:
Can you send me an sample code to illustrate this property usage. I tried but not able to get
thanks
0
 
revathiAuthor Commented:
Thank you expters!.I found that RDC is helpful for assigning active data sources. I graded to average since only part of the code was helpful to me

0
 
revathiAuthor Commented:
Thank you expters!.I found that RDC is helpful for assigning active data sources. I graded to average since only part of the code was helpful to me

0
 
revathiAuthor Commented:
Thank you expters!.I found that RDC is helpful for assigning active data sources. I graded to average since only part of the code was helpful to me

0
 
revathiAuthor Commented:
Thank you expters!.I found that RDC is helpful for assigning active data sources. I graded to average since only part of the code was helpful to me

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.