Link to home
Start Free TrialLog in
Avatar of kitmax
kitmaxFlag for United States of America

asked on

Report Designer

I have a simple application for adding and updating Order information, using Access as the database.
I'm using DAO to add and update as I normally do (will get round to ADO one day), all works fine.

My experience wilth the report designer is limited but I have had no trouble creating what I want so far but I have some questions \ problems with them.

1) One Report lists all orders that are UnDespatched, very simple report and works fine, BUT the problem I have is when I close the report (after using .show) and update an order to Despatched, run the report again, it is the same as before, the Order that is now Despatched still shows, I have tride the refresh command.  It only works correctly when I exit the application and run it again.
When I use DAO I close the Recordset and Database using code, is there a way of making sure the reports do that??
I've also noticed the access.lockfile is always around now, whereas previously it is only there when updating the database.  (I can open it exclusivly though so it is not really locked out, report designer is set to lockreadonly)

2) I have been using SQL commands to retreive data and am aware of how to get data involving DATES, however, when using the SQL Builder to build the reports I have no idea where to start to put a date in.  I'd like a report to be generated that shows all UnDespatched orders for Today but I can't use Now or Date and as the date will always be changing I can't put a fixed one in, any ideas????

Thanks in advance

ASKER CERTIFIED SOLUTION
Avatar of VBGuy91917
VBGuy91917
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kitmax

ASKER

Thanks, I'll try the first point in the morning.

The 2nd point is a little more difficult (for me), I have used SQL by dates before....  

CriteriaDate = Format(frmStockReport.DTDate, "mm/dd/yyyy")
CriteriaDate = "#" & CriteriaDate & "#"
Set SkyRS = SkyDB.OpenRecordset("SELECT * FROM Stock WHERE Despatched = " & CriteriaDate & "")

But, how would it be done for a report, when I used the SQL builder in report designer it tells me it can't do dates, but does let me put an actual date in.  The reports are completly done in designer with no code by myself.
I've seen somewhere, sql statements for reports running in code, that would help.

Kit
hi kitmax
try out following
1) when u use  datareport1.show method before it use
   dataenvironment1.open method
2) and then go to datareport right click on report then  
   choose show code and from listing of datareport method
   choose unload method and type in that method
   dataenvironment1.close
it will solve your problem


sahir
Avatar of Anthony Perkins
sksahir.

I suspect you hit the answer button in error.  If this is not the case, please re-read the EE Guidelines regarding locking questions with answers, especially when they do not even come close to answering the original question.

Anthony
Avatar of kitmax

ASKER

I have no requery methods, only refresh which does not work.

Also, there is no unload option on the report.

Kit
Avatar of kitmax

ASKER

OK, Thanks to you both so far, found out how to use the requery, close methods, also found this site which helped a little http://dbforums.com/archive/130/2001/06/4/82124

Any thoughts on the date issue, is it possible to create a query for a report during initialisation??

Thanks
Kit
Hi kitmax,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept VBGuy91917's comment(s) as an answer.

kitmax, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
Avatar of Netminder
Netminder

Per recommendation, force-accepted.

Netminder
EE Admin