Solved

How to call crystal report  from VB?

Posted on 2001-07-31
9
178 Views
Last Modified: 2010-05-02
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?
0
Comment
Question by:revathi
  • 6
  • 2
9 Comments
 
LVL 11

Expert Comment

by:Otana
ID: 6337164
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
 

Author Comment

by:revathi
ID: 6337718
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
 

Expert Comment

by:pepe2000
ID: 6337806
There is a property crReport.SQLQuery <SQL text here>
0
 

Author Comment

by:revathi
ID: 6337824
Can you send me an sample code to illustrate this property usage. I tried but not able to get
thanks
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Accepted Solution

by:
pepe2000 earned 100 total points
ID: 6338312
   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
 

Author Comment

by:revathi
ID: 6353039
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
 

Author Comment

by:revathi
ID: 6353041
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
 

Author Comment

by:revathi
ID: 6353047
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
 

Author Comment

by:revathi
ID: 6353080
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

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now