?
Solved

How to call crystal report  from VB?

Posted on 2001-07-31
9
Medium Priority
?
186 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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
 

Accepted Solution

by:
pepe2000 earned 200 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses
Course of the Month10 days, 10 hours left to enroll

764 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