Solved

ReportSmith InitialValues

Posted on 1997-08-25
3
223 Views
Last Modified: 2010-04-06
How do I send InitialValues to ReportSmith from Delphi when they are Date variables??  I am using D1.
0
Comment
Question by:jdthedj
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 50 total points
ID: 1342375
Try this, I haven't tested it because I almost always use QuickReport. I found this in the Lloyd's Help file. Hopefully it solves your problem.

Q:  How do I pass variables to Report Smith?

A:  The important part of the code is line to concatenate the single quotes to the string.  (If it is just a string that is being passed, you don't need the embedded quotes.  That is for a date string.)

In Report Smith, the REP VAR is

Name: tday
Type: DATE
Entry: Type-in

(Note:  The values passed to RS are case sensitive.)

procedure PassVars;
var s: string;
begin
  s := DateToStr(date);
  s := '''' + s + ''''; {This is not needed for regular strings.}

  report1.InitialValues.add('@tday=<'+s+'>');
  report1.run;
end;

{ This code came from Lloyd's help file! }

Have fun,
c.u. ZifNab;
0
 
LVL 3

Author Comment

by:jdthedj
ID: 1342376
Thanks ZifNab for your help - it's just what I needed
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1342377
Glad I could help you.

Have fun,
c.u. ZifNab;
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Downloading email attachments 2 72
Delphi IDE crash without error message ... 7 88
TServerSocket - file via sendbuf or Text via sendtext ? 1 52
update joined tables 2 45
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

813 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

12 Experts available now in Live!

Get 1:1 Help Now