Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : Updating data in Crystal Reports - optimization settings?Search Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC v8 Forum

 New Topic 
 
 Post Reply 
[1]  
 Updating data in Crystal Reports - optimization settings? 
 Author   Message 
  Troy Smith 
  
 Group: Members 
 Posts: 8 
 Joined: 2008-05-14 
 Profile
 Posted : 2008-05-14 07:26:34
After searching and snooping and reading FAQs here, i've got my optimization set up correctly i think. It's set to update to the end of the previous day and stock info is set to 'dirty read'. Then i hit the "Load Updated Data" button, to get my optimized file up to date. That took probably 2 hours to complete.

Sooooo, after all that, i thought i would be able to go into crystal reports and run all the reports i want, and close and re-open the program and still run all the reports i want, all without having to wait for crystal to access the QB database. Buuuuut, it doesn't seem to be working that way, it still takes a long time to run reports and i still get messages in the corner of my screen from QODBC that it is reading the tables.

What do i have to do to get to a point where i have a static, quickly readable data set? Is it easier to export to an access database, or some other format?

Since it's not currently possible to interact quickly directly with the QB database, the next best thing for me would be to automatically each evening, create an exported data set that I CAN access directly and quickly. I thought that's what the optimizer does. Am i wrong? 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-05-14 08:07:43

Well you just about have done everything wrong. See: How do I setup the QODBC Optimizer? Where are the Optimizer options? 

The best way is to let the QODBC work correctly as per my recommendations:

and then run your reports. The first time you run a report, it will take a little longer to update sync, but if you refresh the report or run another report off the same tables, Crystal Reports will work off the opimized tables.

 

  Top 
  Troy Smith 
  
 Group: Members 
 Posts: 8 
 Joined: 2008-05-14 
 Profile
 Posted : 2008-05-14 08:19:28
Haha, well i tried! I actually have read at least a dozen of your posts today and initially did set it up just like the image you posted here. THen i decided that i'd rather have the data updated once a day instead at the start of every connection. That way, if i shut down and restart crystal reports, i don't have to re-optimize. Or, if i use other programs (access, excel) it's already optimized and ready to go for them. I also set the windows scheduler to run 'QODBCUPD.exe' every evening after i leave work. My thought was that all the optimizing will be done in the evenings while i'm at home and i won't have to do any waiting while i'm working. Is that incorrect?

The only thing that is currently different from what you show in the image is that instead of  "Thestart of every new connection (with"Load Updated Data" first)" , I've chosen "The end of yesterday". 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-05-15 09:46:41
QODBCUPD does a full update of all tables and the update time will not match the "The end of yesterday", so the optimizer will have to run awayway. You will need run QODBCUPD after midnight. 

  Top 
  Troy Smith 
  
 Group: Members 
 Posts: 8 
 Joined: 2008-05-14 
 Profile
 Posted : 2008-05-22 07:42:34
Ok, let me ask this then: Is there some way that i can export data, maybe once a week or so, into some format that is very quickly and easily accessible without using ODBC (perhaps a mySQL or MS Access database)?

It would be very, VERY nice to be able to run a report quickly, see that i need to change something about the report, and run it again quickly, rather than it taking 4 hours to run and being terrified that i've made a mistake and will have to make a change then run it all over again. And yes, right now the report i'm working on (well, really YOU have been working on, thanks again!) does take a very long time to run. It was 4 hours the time that i was here. Since you changed it to query only items that are sub-items i'm not sure how long it takes. I started that one before leaving for the day.

Anyway, can i export a complete data set to a 'normal' database? 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-05-22 08:03:39

This query:

SELECT Item.ParentRefFullName as ParentItem,
AVG({fn CONVERT(InvoiceLine.TxnDate, SQL_DATE)} - {fn CONVERT(BillItemLine.TxnDate, SQL_DATE)}) as AvgDaysHeld
FROM BillItemLine NOSYNC, Item NOSYNC, InvoiceLine NOSYNC
WHERE BillItemLine.ItemLIneItemRefListID = Item.ListID
and BillItemLine.ItemLIneItemRefListID = InvoiceLine.InvoiceLineItemRefListID
and BillItemLine.TxnDate >= {d'2007-01-01'}
and InvoiceLine.TxnDate  >= BillItemLine.TxnDate
and Item.ParentRefFullName is not null
GROUP BY
Item.ParentRefFullName

will take a long time to process as it has to read every BillItemLine and InvoiceLine to determine the average days held. To speed up the report you need to limit the date range to exactly what you really need, for example change:-

and BillItemLine.TxnDate >= {d'2007-01-01'}

to:-

and (BillItemLine.TxnDate >= {d'2008-01-01'} and BillItemLine.TxnDate < {d'2008-07-01'})

Due to a bug within QODBC v8.00.00.242, I've had to use this evaluated function to process the dates correctly when using the QODBC optimizer:

({fn CONVERT(InvoiceLine.TxnDate, SQL_DATE)} - {fn CONVERT(BillItemLine.TxnDate, SQL_DATE)})

When this is corrected by the QODBC Software Engineer, you will be able to use:-

(InvoiceLine.TxnDate - BillItemLine.TxnDate)

which will be MUCH faster!!!!

In the meantime, you can use the DoCmd.TransferDatabase command to transfer the BillItemLine, InvoiceLine, and Item tables into MS Access and process the query there instead.

See: Can I use DoCmd.TransferDatabase command in MS Access? 

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-10-06 16:19:29
Fixed in QODBC v9, see: Release 9.0.0.249 Fixes  

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to