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!

is it possible to pass a variable filename to cr7?

Status
Not open for further replies.

apelecanus

Programmer
Oct 25, 2000
18
US
Hello,

I'm using vb6 to create tables on DB2 for use by cr7. I'm having resource conflicts when multiple users want to run report concurrently, i.e. bad report output. I'd like to use a variable filename to be passed to cr7 at runtime, but can't get cr to accept one. anyone have any ideas?

thanks
 
You could pass a recordset from VB to the report. That requires using the Active Data driver to create the report.

Which Crystal technique are you using to launch the report. They are listed in the FAQ "What to include in your question"



Ken Hamady-
 
Additional Info:

cr makes an odbc connection to the db2 tables.

cr is launched thru vb using the cr control component (ocx)

thanks again
 
Did you really mean that VB is creating tables, as in physically writing to the database?

What "File Name" do you want to change. Are you trying to create temporary tables for each user, and then report off of them?

I believe you can override the name of a table used by a report using the following code:

rptMyReport.DataFiles(0) = "orders"

Where the number is a zero based index of the tables in the report. Ken Hamady
 
my goal is to have multiple users able to create simultaneous instances of the report table. CR uses this table as a lookup key into other tables in the database to produce a report. (as i type this it sounds like a bad design plan??)

vb really is sending the create table, select and insert sql strings to db2 to get a recordset which is then written into the table structure. My problem (if i explain this correctly) is that
1. the report links to tables other than the one just created making a recordset difficult (or impossible) to use (?)
2. as far as i can tell cr can only link to files in one library at a time on the AS/400 (cr bombed when i had multiple libraries listed on the odbc connection definition) so using the session's temporary library does not working
Sooo, what i get is all data in every report instead of each user getting the data he requested. I'd like to pass each user's data in a temporarily created table which would then link to the other tables...

thanks for your attention and thoughts on my problem!
 
If you have the record set that you are writing to a table, can't you create a second recordset using the table variable name and then pass it to the report, using active data. Might give you more control.

However as I mentioned in my last post. If you can give the table a unique name, I believe that you can override the table name saved with the report by using the command I gave you.

I think you have two options. Ken Hamady
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top