|
-
August 22nd, 2001, 02:59 AM
#1
display one record
Can somebody tell me how I can show one record in Crystal Reports from vb6. I Go from form1 to a crystal report and there I want to show one record that I selected in form1. How can I give the variable through? So form1 gives the value 1 through to chrystal reports and chrystal reports display record nr. 1. Where do I put the variable, only in vb6 or also in Crystal Reports? And where?
Remco Ploeg
[email protected]
-
August 22nd, 2001, 04:13 AM
#2
Re: display one record
First in crystal report create a report
then there is a method of crstalreport ocx named 'replaceselectionformula'.
you will have to use this method to filter the data that the crystalreport is supposed to show
suppose u have a table named 'TABLE1'
and u have columns named ID,NAME,AGE,SEX
Now in vb u will write:
Report1.replaceselectionformula("TABLE1.ID = somevalue")
Report1.action = 1
This will ensure that the crystalreport shows the record for onle the id that u have supplied.
Hope it helps
-
August 22nd, 2001, 04:41 AM
#3
Re: display one record
what do you mean with replaceselectionformula. Where can i find that in crystral report?
Remco Ploeg
[email protected]
-
August 22nd, 2001, 04:55 AM
#4
Re: display one record
So I have form1 there I have got a ID from a customer, now I want to print that customer. So I made a crystal report with a sql query but there is ID = 5. Now When I push the button to start making the report, i want to overrule that sqlstatement in crystal report, with a sql statement that is in the code of the action button. Can I do that? So then I see 1 customer on my screen and not ID5. But the ID where I'am standing on. I made already a variable for that. But how can I make the select statement with the variable in crystal reports?
Remco Ploeg
[email protected]
-
August 22nd, 2001, 05:13 AM
#5
Re: display one record
'replaceselectionformula' is a method of CRYSTAL REPORT CONTROL which is available as an activex control to be used in vb.
You won't find that method on Crystal Report
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
|