Solved

how to open crystal reports in vb?

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

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

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
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…
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…
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…

763 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