473,322 Members | 1,241 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

crystal report help

hello,

i using vb 6 and i did report seagate crystal report .
i want to know how it use in vb . i did some code but it not display anything

code is


Public strReportPath As String
Public strRecordSelection As String
Dim crystal As New CRAXDRT.Application
Dim Report As New CRAXDRT.Report

Private Sub Form_Load()
strRecordSelection = ""
strReportPath = App.Path & "\" & "Report1.rpt"

On Error Resume Next
Set crystal = New CRAXDRT.Application
Set Report = Nothing
Set Report = crystal.OpenReport(strReportPath)

Report.Database.LogOnServer "pdsodbc.dll", stud.mdb, sd

If strRecordSelection <> "" Then
Report.RecordSelectionFormula = strRecordSelection

End If
Report.DiscardSavedData
Cry.ReportSource = Report
Cry.ViewReport
Cry.Zoom 2
Set crystal = Nothing

end sub


please tell why it not display report
Sep 13 '07 #1
3 1444
debasisdas
8,127 Expert 4TB
if you are trying todisplay the CR iusing the CR viewer then

Add a crystal report from under the projects menu.

Create from the Crystal report file and save.

then try the following code

Expand|Select|Wrap|Line Numbers
  1. Public Sub MonthlyReportDisplay(Query As String)
  2.  
  3. Set CRXReport = CrystalReport4
  4. Set CRXDb = CRXReport.Database
  5. CRXReport.DiscardSavedData
  6.  
  7. inti = 1
  8. Do Until inti = CRXReport.Database.Tables.count + 1
  9. CRXReport.Database.Tables.Item(inti).SetLogOnInfo strdblocation, "das", "debasis", "debasis"
  10. inti = inti + 1
  11. Loop
  12.  
  13. CrystalReport1.SQLQueryString = Query
  14.  
  15. With FrmReport
  16. .Show
  17. .CRV1.ReportSource = CRXReport
  18. .CRV1.ViewReport
  19. End With
  20.  
  21. Set CRXReport = Nothing
  22. End Sub

You can call this procedure from buttonclock by passing the querystring for the report. so that the report will be dynamic.
Sep 13 '07 #2
Thanks but how i can link external (seagate crystal report ) in vb
please tell me.
Sep 14 '07 #3
debasisdas
8,127 Expert 4TB
Thanks but how i can link external (seagate crystal report ) in vb
please tell me.
You need to

Add a crystal report in VB 6.0 from under the projects menu.

Create the report from the external Crystal report file and save.

then follow as suggested in the previous post.
Sep 14 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Stephan | last post by:
Hi, I'm using Visual Studio 2003 (C#) with the integrated Crystal Report software and have the following question: How can I assign a value (string) to an unbound (string) field in Crystal...
4
by: Rick Thiel | last post by:
Hello, I am trying to build a Crystal report VisualStudio.NET for an ASP.NET application. I would like to build a report that doesn't connect to any particular database at design time because I...
7
by: Phin | last post by:
I need your HELP! I've seen all the posts on using Crystal Reports within vs.net (vb.net) and changing a SQL query at runtime. When I tried to pass in a dataset into the crystal report at...
2
by: Mythran | last post by:
In .Net, how can I go about and set a Crystal Reports namespace? Right now they use the Root Namespace (VB) from the project. How can I extend the namespace for a single report (which will be set...
3
by: Deasun | last post by:
I need some help please! Crystal is driving me nuts. Heres my code so far, see below. Problem: On the .export() line it comes back with error #5 Login failed! I know the login info is good so...
3
by: Milan Todorovic | last post by:
Hello, I need help. I have experience in ASP.NET programming, but this is my first dealing with Crystal Reports. I'm trying to make the most basic report purely for testing purposes: connect to...
1
by: bthomas71chevy | last post by:
I have just setup a WebServer and all the applications work fine, but when every any of the applications try to generate a Crystal Report the page errors out. "File or assembly name...
17
by: Peter Proost | last post by:
Hi Group, I've got an interesting problem, I don't know if this is the right group but I think so because everything I've read about it so far says it's a .net problem. Here's the problem, we're...
0
by: Jeff | last post by:
Help!!! The bitmap I am trying to display in a sample Crystal Report is coming up with much less quality than the original bitmap. I have a 300x300 dpi bitmap file that I want to insert at run...
0
by: John Smith | last post by:
Hello, I am developing a VB.NET 2003 application that will use lots of Crystal Reports. Sometimes the users will preview a report in a Crystal report viewer, and sometimes they will send the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.