Solved

ReportSmith

Posted on 1997-05-12
3
240 Views
Last Modified: 2010-04-06
I would like to create temporary files with Delphi that can then be used by ReportSmith.  How do I change the table that ReportSmith uses at runtime.  I have used the Delphi connection, however that only allows one table or query from Delphi.  Is there some way I can substitute the file that ReportSmith uses at runtime with a temporary file that is built by Delphi?

Thanks
Ian Hopewell
Hopewell and Associates
e-mail: ianah@iaccess.za
0
Comment
Question by:Ianah
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
hpierson earned 50 total points
Comment Utility
Ian,

Being simple minded and the king of kludges, I would probably rename the original table to keepsafe.db, rename the temporary table to originaltable.db, run the report, rename the temporary table back to its old name, then rename keepsafe.db back to its original name..

Fortunately, the TTable componet does have a renametable method, so all this skulldugery will only take four lines of code...and since it all happens in Delphi, you can leave your report alone and avoid learning the macro language in Reportsmith!

Harry M. Pierson
DREJ Consulting
0
 

Author Comment

by:Ianah
Comment Utility
I would like multiple users on the network to print this report.  If I rename my files there will be a clash with what other users are doing.  This report will be in a multi user environment. Any suggestion?
0
 
LVL 3

Expert Comment

by:hpierson
Comment Utility
Suppose the table to be replace is

F:\somedirectory\realtable.db

copy the table to

c:\temp\realtable.db

Load the original report, and replace the table
F:\somedirectory\realtable.db with the table
c:\temp\realtable.db

in the reportsmith report, and save it under a different name, say
NEWREPRT.RPT

Now your users don't have to rename anything, the just have to copy or rename the table they want to use in any report to

c:\temp\realtable.db,

and since these tables will be local to each user, all common tables retain their original names and locations, and will be untouched.

I hope this is clear.

Harry M. Pierson
DREJ Consulting


0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

772 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now