×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Choosing a table during run-time

Choosing a table during run-time

Choosing a table during run-time

(OP)
I am creating a report to display information from our firewall.  Is there some way I can change, on the fly, which file it is reading?  For example, we will have daily files and weekly files; all will have the same format.  Right now the report points to a specific file but I need to be able to set it up so our operators can choose which file is being reported on.

Thanks!

RE: Choosing a table during run-time

Rena: You can reset the data source of any table in your report in code. The method depends on the approach you are using e.g. Report Design Component vs. Automation Server etc. but have a look at SetLogonInfo - as in the following code snippet from Developer Help

Private Sub Command1_Click()
    ' Set log on info for the two tables in the report
    rpt1.Database.Tables(1).SetLogOnInfo "pdsodbc", "CRSS", _
        "pubs", "user1", "password"
    rpt1.Database.Tables(2).SetLogOnInfo "pdsodbc", "CRSS", _
        "pubs", "user1", "password"

    ' Preview the report
    rpt1.Preview
End Sub

David C. Monks
david.monks@chase-international.com
http://www.chase-international.com
Accredited Seagate Enterprise Partner

RE: Choosing a table during run-time

(OP)
Hi David,

Thanks for your response.  Unfortunately, it is so far over my head I didn't understand it.  I looked for 'SetLogonInfo' in Seagate Crystal Reports Help but didn't find anything there.  Could you please try again and bring your explanation down a few levels?  

Thanks,
Rena

RE: Choosing a table during run-time

Rena: I shall be delighted. However to enable me to be more precise can you let me know what version of CR you are using and what method of report integration (e.g. Report Design Component) you are using?

David C. Monks
david.monks@chase-international.com
http://www.chase-international.com
Accredited Seagate Enterprise Partner

RE: Choosing a table during run-time

(OP)
Hi David,

Thanks for you time.  I am using Crystal Reports Professional V8.  Look forward to hearing from you.

TIA,
Rena

RE: Choosing a table during run-time

Rena,

Are you running the report from a VB application?  You need to be to do what you are talking about.

Ken Hamady
http://www.kenhamady.com/
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)

RE: Choosing a table during run-time

(OP)
Hi Ken,

No, it is a stand-alone Crystal Report.  So I guess I am tough-out-of-luck.

Thanks,
Rena

RE: Choosing a table during run-time

Well if they are in the design environment, they can go into the database menu and "set location" to a different table/database.  What is the datasource?

Ken Hamady
http://www.kenhamady.com/
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)

RE: Choosing a table during run-time

Rena: The solution is to upgrade to the Developer Edition (you'll probably get v8.5 now as well) - this version includes the ability to embed reports whereas Professional doesn't.

David C. Monks
david.monks@chase-international.com
http://www.chase-international.com
Accredited Seagate Enterprise Partner

RE: Choosing a table during run-time

(OP)
David:  Now I have another question.  It just sunk-in that I am running the Professional Edition but when I looked at our 'box' we purchased the Developer Edition.  We purchased an upgrade from our V7 which was Professional.  Will it not upgrade to Developer?

Ken:  You mentioned using a VB front-end.  I am considering using Clarion as a front-end to call this (and many other reports).  I know I can create a screen to get input from the user (which in this case would be the file name).  How would I pass that to the CR?

Thanks to you both for your help.  Look forward to your responses.

Rena

RE: Choosing a table during run-time

Rena: I suggest you go back to your reseller. The Professional version of V7 did include the ability to embed reports whereas as you know the upgrade to v8 Professional doesn't. You'll need to find out whether you got what you ordered rather than got what you want!

David C. Monks
david.monks@chase-international.com
http://www.chase-international.com
Accredited Seagate Enterprise Partner

RE: Choosing a table during run-time

Sorry,

I know little enough about VB, and nothing at all about Clarion.  If you go to the CR Integraton forum, you can ask if someone knows how to integrate with Clarion.

Ken Hamady
http://www.kenhamady.com/
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)

RE: Choosing a table during run-time

(OP)
Hi Ken,

I was looking more for how I would set up the CR to accept such input from an outside program.

Thanks,
Rena

RE: Choosing a table during run-time

The only way to do that is to integrate the report into the app.  There is no other way to manipulate the report settings.

Ken Hamady
http://www.kenhamady.com/
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)

RE: Choosing a table during run-time

(OP)
Thanks Ken.  I am just now learning Clarion so I will have to keep that in mind as I go through the tutorial and other courses.  Thanks for your time.

Rena

RE: Choosing a table during run-time

Rena: If Clarion is COM based like VB and Delphi then you may find you can use the CR components such as the Report Design Component or the VCL (for Delphi) to enable you to gain access to the CR API. Without this I would switch to VB!

David C. Monks
david.monks@chase-international.com
http://www.chase-international.com
Accredited Seagate Enterprise Partner

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close