[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

How to call crystal report  from VB?

Posted on 2001-07-31
9
Medium Priority
?
188 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
Independent Software Vendors: 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!

 

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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses

650 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