Re: problem writing report
Are you using VB6 or VB.NET?
Re: problem writing report
i am using visual basic 6 and for database i use access 97
Re: problem writing report
Then put two option buttons on your VB6 form.
Call one of the optAll and put in the caption "All Records"
Call the other one optDates and put in the caption "Select Date Range"
Then in your code do something like
Code:
If optDates.Value = True Then
{"SELECT * FROM Table1, Customers WHERE Customers.CustomerID =Table1.CustomerID AND Table1.CustomerID =" & Customerid & " and Table1.Date between #" & dtFrom & "# and #" & dtTo & "# ORDER BY Table1.DATE"}
Else
{"SELECT * FROM Table1, Customers WHERE Customers.CustomerID =Table1.CustomerID AND Table1.CustomerID =" & Customerid
End If
Re: problem writing report
i use this code in viewing the data for customerid
but in report print the data show in datagrid does not same in report
in report show all data of that customerid NOT equal to the datagrid
Re: problem writing report
HI,
Are you using CR or data report?
greg
Re: problem writing report
If your using data report, you may use hack's sql statement suggestion to view your report.
Greg
Re: problem writing report
You have very little control over what is shown in a bound DataGrid.
Because it is a bound control, and therefore, linked to a table, it is going to display everything in the table.
If you need, for display purposes, only a subset of your records, then you would be much better off changing from using a datagrid to an unbound control like a flexgrid or a ListView.
Re: problem writing report
What are you using for the DataSource Property of your report. Are you using a DE , ADO recordset or MSDataShape?
Re: problem writing report
I try to use both CR 8 And Datareport
but both have same problems
and i am using ADODB recordset