Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print Only the select record

Status
Not open for further replies.

Baixinha

Programmer
Dec 27, 2000
122
BR
I created a report and I need this report print only the record selected (only one).

How can I do this?
 
Hi

Could you give more details on exactly what you are wanting to do and how you have your report set up now? Also, what version of crystal reports are you using?

When you refresh your report, do you only see one record? or more? If you have more records in the report, what do you mean by "Selected"?

I look forward to your response. E. McEvoy
Crystal Reports Consultant
 
Hi

I'm using Crystal Reports 8 and VB5.
I have a database where I can consult a record by the title and the record is showed in the form and I wanna print this consult by a report created CR8 (only one record). I only developed the report. Now, I need to program the report to work this way.

 
Do you want Crystal to retrieve this 1 record from the database or do you want to pass the record from the form to the report?

You can store the record in a recordset and pass it to the report, or you can pass the criteria of the record to the report and have it retrieve the same record. The second option is simpler but will require a second query of the database. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
You didn't really answer the first question, so I will assume that you want to have CR retrieve the record.

Now, can you write a SQL statement that would return only the record you are looking for from the database? If so, post the statement here, and I will explain how to get CR to return just that record. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
I wanna pass the record from the form to the report.

 
Is this record in memory as a recordset of one record in the application? How many fields in the recordset. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Yes.
There are only three fields in the recordset.
 
You have to convert the report to use the active data driver, and to use only these three fields. If the report was designed using more than on table you have to recreate it.

If you converting the report use "Database - Convert Driver" and switch it to PDSMON.dll and then select the appropriate connection.

In the application you will need to use the converted report and then use the "SetPrivateData" method to pass the data to the report. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top