Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing Data Source dynamically

Status
Not open for further replies.

WBaeck

Programmer
Jul 4, 2000
6
US
Hi,<br><br>I would like to know if it is possible to change the data source dynamically. I have a set of reports that are the same across various data sources and I don't like to repeat the reports just because the data source is different. Is there a way to pass the datasource in like the userid and password in the hidden fields?<br><br>thanks<br>wolfgang
 
Wolfgang<br><br>You do not say what method you use to call the reports. If you use the Crystal OCX to call the report, then look at the &quot;connect&quot; property - it allows you to change the database &quot;DSN&quot; , &quot;UserID&quot; and &quot;Password&quot; dynamically.<br><br>I hope this helps.<br><br>Dirk
 
I call the reports from a web page this way:<br><br>&lt;FORM ACTION='RegistrationReports/entries_for_order.rpt' METHOD='post'&gt; <br>&lt;input type=submit value='Generate Report'&gt; <br>&lt;input type=hidden name=&quot;user0&quot; value=&quot;IIS-Reports&quot;&gt;<br>&lt;input type=hidden name=&quot;password0&quot; value=&quot;nopassword&quot;&gt;<br>&lt;input type=hidden name=&quot;prompt0&quot; value=&quot;&lt;%=session(&quot;OrderId&quot;)%&gt;&quot;&gt;<br>&lt;/FORM&gt;
 
Check out the Data Definition File in the helpfiles. I use these to create one report and then I use it on my local Access DB and SQL7 and Oracle8i across a network.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top