By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,972 Members | 1,092 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,972 IT Pros & Developers. It's quick & easy.

CRYSTAL REPORT TO Sql SERVER WITH vb6.0

100+
P: 103
HI ALL,

i want to know that how to connect crystal report to Sql SERVER with vb6.0

i'm trying to get rid of this probs sine last 2 days but not succeded.

Can someone suggest me a website which does contain method ( i mean the form piccs)to connect or please give me a step by step procedure for connection between crystal report and sql server....

i hope you will help me...............
waiting for quick reply....

:confused:

ThanKs in Advance

Nick
May 16 '08 #1
Share this Question
Share on Google+
12 Replies


debasisdas
Expert 5K+
P: 8,127
What version of CRYSTAL REPORT you are using ?

Try to create a DSN and connect to Sql SERVER .
May 16 '08 #2

100+
P: 103
What version of CRYSTAL REPORT you are using ?

Try to create a DSN and connect to Sql SERVER .
that too is not connecting.....
May 16 '08 #3

debasisdas
Expert 5K+
P: 8,127
what is the error that you are getting ?

are you able to connect to the sql server directly ?
May 16 '08 #4

100+
P: 103
what is the error that you are getting ?

are you able to connect to the sql server directly ?
yes i able to connect it directly and i have succeded in that,but to view this using vb6....how can i do that.....
i have a kept a "print" command button...please help me to write the code.....i have already done the rept that too directly....


please sugest me the code.
Thanks in advance.
NICK
May 17 '08 #5

100+
P: 103
yes i able to connect it directly and i have succeded in that,but to view this using vb6....how can i do that.....
i have a kept a "print" command button...please help me to write the code.....i have already done the rept that too directly....


please sugest me the code.
Thanks in advance.
NICK
i am after this for a couple of days please help..........

NIKHITA.....
May 19 '08 #6

debasisdas
Expert 5K+
P: 8,127
what exactly is the error that you encounter ?

how are you trying to display the report ?
May 19 '08 #7

100+
P: 152
gpl
i am after this for a couple of days please help..........

NIKHITA.....
Back in 2001 I had a similar trouble, the report viewer in VB6 would not render our reports.

After a lot of searching, it turned out that we needed a component from VB6 SP4 installed, after that it worked well.

I am sorry but after so long, the actual details are forgotten and the source code has been consigned to the scrap heap.

Do a Google search and you may find the answer -- what version of Crystal are you using ??

Graham
May 19 '08 #8

QVeen72
Expert 100+
P: 1,445
Hi,

You never mentioned Version of your CR...
You succeeded in Creating Report means,
You must have created the ODBC properly and is Previewed Data showing properly...?

Without mentioning these details, how can anyone help you...?

Regards
Veena
May 20 '08 #9

100+
P: 103
Hi,

You never mentioned Version of your CR...
You succeeded in Creating Report means,
You must have created the ODBC properly and is Previewed Data showing properly...?

Without mentioning these details, how can anyone help you...?

Regards
Veena
sorry for not giving the correct infm let me telll u veena,i have done the same as u explaind
.............now i need to view the report of the employees within a range and individually
by pressing a button.....
im using sql server 7.0

my queries:

1) how do i connect sql with crystal report(7.0)......im gettn as a crys.report viewer.

2) is it possible to me to get report as :

name
Nikhita
id 100
working hours 10
Overtime hours 5
Salary 30000



please clear my queries


...Thanks in advance:
NICK
May 21 '08 #10

QVeen72
Expert 100+
P: 1,445
Hi,

use this code to show the report in VB:

Place the Crystal Report control on the form...

Expand|Select|Wrap|Line Numbers
  1. CrystalReport1.ReportFileName = App.Path & "\MyReportName.rpt"
  2. CrystalReport1.Connect = "DSN=MyDSNName"
  3. CrystalReport1.Action = 1
  4.  
Yes you can print the report in that format..
Go to Report Designer, Open the Report, and Increase the Detail Section (add few lines) and Place the Fields one below another.. save and View report

Regards
Veena
May 21 '08 #11

P: 84
what im guessing is that he has connected CR to a sql server and can view the reports in cystal.

now he wants to view the reports in vb6 when he clicks a button.

ive tried this before but failed so i cant give you any help past this :( sorry
May 21 '08 #12

100+
P: 103
Hi,

use this code to show the report in VB:

Place the Crystal Report control on the form...

Expand|Select|Wrap|Line Numbers
  1. CrystalReport1.ReportFileName = App.Path & "\MyReportName.rpt"
  2. CrystalReport1.Connect = "DSN=MyDSNName"
  3. CrystalReport1.Action = 1
  4.  
Yes you can print the report in that format..
Go to Report Designer, Open the Report, and Increase the Detail Section (add few lines) and Place the Fields one below another.. save and View report

Regards
Veena

Hi,
but i have a crviewer,i have got errors while at runtime......

[vb code:]

Private Sub cmdRpt_Click()
Set report = crystal.OpenReport("C:\Program Files\Seagate Software\Crystal Reports\report.rpt")
Form1.CRViewer1.DisplayBorder = False
Form1.CRViewer1.DisplayTabs = False
report.DiscardSavedData
report.Database.SetDataSource rs

ERROR:

Run-time Varaible 91
Object variable or With block variable not set.....




Thanks
Nikhita
May 23 '08 #13

Post your reply

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