Solved

how to open crystal reports in vb?

Posted on 2000-05-09
3
170 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 75 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

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.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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
Course of the Month5 days, 16 hours left to enroll

626 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