Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing the Crystal Report Source Table at Runtime
Message
De
12/07/2006 02:19:45
 
 
À
11/07/2006 22:56:01
Information générale
Forum:
Visual Basic
Catégorie:
Produits tierce partie
Divers
Thread ID:
01135563
Message ID:
01135580
Vues:
14
If you are linking the tables directly to reports at design time than it might be difficult to change the table at run-time.

There is an alternate approach to do this.
Create a SP that takes Table string as input parameter Ex: "Employee" or "Supplier"
depending upon the parameter either you can have one dynamic SQL returning
ID,Name,Address,PhoneNumber Or a simple If-else statement Ex:
If @TableName="Employee"
select ID,Name,Address,PhoneNumber from employee
else if @TableName="Supplier"
select ID,Name,Address,PhoneNumber from employee
...
Link you report to this SP. Pass the input parameters at run-time & you get the desired result.
Best Luck..
Nilesh
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform