hi
i am using crystal reports9 in vb6 with access database.
i Created one report called rep_customer
and wroted code on button_click event to call report from vb
vbcode---------------
public sub cust_report_button_click
connect
Set r = New ADODB.Recordset
ReportNameVar = App.Path & "\reports\rep_customers.rpt"
r.Open "select * from cust ", c, adOpenDynamic, adLockOptimistic
Set report = crxApplication.OpenReport(ReportNameVar, 1)
report.Database.SetDataSource r
CRViewer91.ReportSource = report
Rep_form.ViewReport
Rep_form.Show
End Sub
------------------
it;s working fine
i created one more report Called Purchase_order based
on two tables (purchase_order,purchase_order_details)
and wroted code on button_click event to call report from vb
vbcode---------------
public sub Purchase_report_button_click
connect
Set r = New ADODB.Recordset
ReportNameVar = App.Path & "\reports\rep_purchase.rpt"
r.Open "select Purchase_order.pono,purchase_order.date,
Purchase_order_details.Product_code ,Purchase_order_details.product_description
from purchase_order,purchase_order_details
where purchase_order.pono=purchase_order_details.pono ", c, adOpenDynamic, adLockOptimistic
Set report = crxApplication.OpenReport(ReportNameVar, 1)
report.Database.SetDataSource r
CRViewer91.ReportSource = report
Rep_form.ViewReport
Rep_form.Show
End Sub
---------------------
i am getting error like
logon failed
Details:Ado Error Code 0x80040e4d
Microsoft Jet Database Engine
Description not a valid password
sql stated 3031
Report is working fine in Desiging and Preview of Crystal Designer Environment
i am sure no problem in database connection username and password
because i am using same connection for customer report.
i hope Only the Problem while Calling from vb6 when report having 2 tables
Where is the Problem ?how Can i solve this One
Can Any one Help meOpen the report and Do verify Database
Showing posts with label vb6. Show all posts
Showing posts with label vb6. Show all posts
Monday, March 19, 2012
Wednesday, March 7, 2012
Login To SQL Server Db
HI
I am using CR 8 with vb6 and sql server 2000
I am designing my reports in RDC integrated into VB IDE. I set the Login info in the dialog box which appear to add database, e.g Server = (Local),User ID=sa etc, and this is being done at design time.
My question is that as my app is going to be multiuser, so will it cause any problem on clients machine?
Should I give the login information to RDC at run time and How?
Also can I use the same connection for RDC which is being used by app to connect with the DB on SQL Server?
Waiting for help...I have the same problem. I would like to enter the logon information to the database at runtime. As of now, I`ve no clue as to how to go about.|||Any one to Help...|||ok. I found a solution. Not exactly me but Robdog. I was just pointed to his code :
http://www.vbforums.com/showpost.php?p=1775989&postcount=2|||This is no way near to what i require.
Still waiting......
I am using CR 8 with vb6 and sql server 2000
I am designing my reports in RDC integrated into VB IDE. I set the Login info in the dialog box which appear to add database, e.g Server = (Local),User ID=sa etc, and this is being done at design time.
My question is that as my app is going to be multiuser, so will it cause any problem on clients machine?
Should I give the login information to RDC at run time and How?
Also can I use the same connection for RDC which is being used by app to connect with the DB on SQL Server?
Waiting for help...I have the same problem. I would like to enter the logon information to the database at runtime. As of now, I`ve no clue as to how to go about.|||Any one to Help...|||ok. I found a solution. Not exactly me but Robdog. I was just pointed to his code :
http://www.vbforums.com/showpost.php?p=1775989&postcount=2|||This is no way near to what i require.
Still waiting......
Subscribe to:
Posts (Atom)