hi VB Master, I'm building an application using VB6, MS Access 2003 as database, and crystal report ocx for printing and report.
Right now I'm using ms dao (database files) to connect crystal with access. But it is very slow, when I want to show 1 record out of 1000, the rpt load all 1000 record first before filtering.
I need help if someone know how to tell crystal to load only records I want to see.
I tried to convert database driver using OLEDB, that work, crystal only load records I want to see, but when I proceed into my other report I received error messages says there is no files ... bla bla... and I can't use some of my queries.
any help would be appreciated. thanks.

Recommended Answers

All 5 Replies

It has been a long time since I used CR, but if I remember correctly, you can set the sql statement of the CR so that only the records you want are queried for, thus making it faster.


Good Luck

thanks a lot. But how to do that? and what driver to use? is it using ADO or OLEDB? I usually developing app with SQL Server. So I'm a bit frustrated with access.

hmmmm....
Why dont you create a Queery in the database then connect that quiry in the CR

Then use SQL command in deleting and recreating that quiry in your vb app.

In that way you can customize (using the sql command in creating a query view) what will be shown in the report in CR...

Ive already done this one using msAccess as my database and crystal report 10 for the report viewer and it works...

wow, is that really possible? I never thought of that..
but doing so is very complicated, if that's the idea, I would using temporary table, or ADO to just send a recordset to CR.
hmm.. think I can move data from my queries into a temp table.. that could work.. :P

Yep!... its posible in crystal report...

just create a VIEW for that query...
and use that VIEW in CR as your temporary table,
then do the ADO Thingy in your VB app...

just make sure you delete your VIEW and then Create it again with your sql query in your Code in VB...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.