Solved

crystal report activex in vb

Posted on 2000-03-14
1
316 Views
Last Modified: 2010-05-02
I'm using the crystal report activex to run a report on accesstables.
Using de datafiles-property I can change the drive, path and .mdbname.  Can I change the name of the tables too ?
Per year I have an ordertable.  Depending on the users choice I have to print the report based on table ordr98 or ordr99 ...
0
Comment
Question by:pce
1 Comment
 
LVL 5

Accepted Solution

by:
Voodooman earned 150 total points
ID: 2616927
No you cant! Because CR doesnt allow you to change the field and table names. You can  

But what you can do is use a temporary table for your report.  Before you run the report run an Append query to append the records you want from the table of your choice to the TEMP table.

After running the report delete the recs from the TEMP table.

in VB
Dim db as database
Dim rs as DAO.Recordset

Set db=opendatabase("C:\Mydir\Mydatabase.mdb")

db.execute "Append mytable.[Field1]...etc

Report.action=1

DoEvents

db.execute "Delete from MyTable.....

Good Luck

VoodooMan!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now