Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

how to open crystal reports in vb?

Posted on 2000-05-09
3
Medium Priority
?
172 Views
Last Modified: 2010-05-02
I've written a database program in Vb6 and one of my form contains codes that will open up crystal reports, but it failed to work. I don't know really know what should I use in the form to open up the reports as well as the codes. Thanks
0
Comment
Question by:cooljam23
[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
3 Comments
 
LVL 43

Expert Comment

by:TimCottee
ID: 2792620
Post some of the code, I can then try to work out which bit(s) aren't working and suggest a solution.
0
 

Accepted Solution

by:
syedAliF earned 300 total points
ID: 2792746

To open a report in Vb You need to open the  a.rpt file of crystal report that you have created.

To open a report in VB
you have to place a crystal report control from the tool box onto the form.

Now to test you can assign the reportfilename property by selecting the .rpt file you have designed.


This is the code:
Put a command button and write this under its click event
crystalreport1.Reportfile="C:\report1.rpt"
cystalreport1.WindowState = crptMaximized   crystalreport1.Destination = crptTowindow
crystalreport1.Action = 1
   
This code works fine if the report is designed properly.


0
 

Author Comment

by:cooljam23
ID: 2793004
Thanks, it works just fine.  I'm sure you wanna get more points. Can you please have a look at my other question I asked on the 9th. The topic is "refreshing problem with 2 child forms" I'll up the point if you could help me with it. Thanks again
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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

660 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