Solved

crystal report activex in vb

Posted on 2000-03-14
1
315 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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

772 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

10 Experts available now in Live!

Get 1:1 Help Now