|
-
October 17th, 1999, 12:44 PM
#1
How to pass query from VB form to Crystal Report Designer Component
I am a beginner programmer in VB. I have a form from which the user can query the database in Access. I am using DAO. I also want to print a report but I don't know how to pass the query from VB form to Crystal Report Designer Component or Microsoft Data Report.
If anybody has sample code or knows site where I can get help , please let me know.
My email address is
[email protected]
Thanks in advance.
-
October 20th, 1999, 05:45 PM
#2
Re: How to pass query from VB form to Crystal Report Designer Component
It depends on on what version you are using. The newer versions of crystal allows the programmer to pass parameters in away to the report to retrive data.
The best way is to create a temp db at run time, run the query you want on the live db and update the neccesary data for the report into the temp db. Delete the temp db after displaying the report using the temp db.
Also U can use queries defined in the access database in your reports. Hope this helps you.
Amendra
-
October 21st, 1999, 10:55 AM
#3
Re: How to pass query from VB form to Crystal Report Designer Component
hope this can help you abit.
text1.Text = tmp1
test2.Text = tmp2
tmp1 = Format(text1.text, "YYYY-MM-DD")
tmp2 = Format(text2.text, "YYYY-MM-DD")
Crystalreport1.SqlQuery = "SELECT * FROM Customer WHERE JointDate BETWEEN '" & tmp1 & "' AND '" & tmp2 & "' ORDER BY CustID ASC ", dbSQLpassThrough
CrystalRerpot1.action = 1
regards...
loader
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|