Click here to Skip to main content
15,888,070 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<br />
Private Sub showreport_Click()<br />
sql = "select * from student_record_database where"<br />
sql=sql+ Grade='" & Combo1.Text & "' AND Meal='" & Combo11.Text & "'"<br />
Set RES = CON.Execute(sql)<br />
Set DataReport1.DataSource = RES<br />
DataReport1.WindowState = vbMaximized<br />
DataReport1.Show vbModal<br />
End Sub<br />



This code I am using as record set to create a data report.
1. My task is to choose options from various combo boxes and then display it's report so record set is needed there..

2. My question is that whether this code is sufficient to create data report???

3. I didn't set any properties of data environment or data report such as (connection - command - sql) because I am passing this record set directly to data report,then no need to fire any sql in properties of data environment.

But unfortunately it is not showing desired output
Please help me............
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900