Solved

crystal report activex in vb

Posted on 2000-03-14
1
323 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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 Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

738 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