Solved

ReportSmith InitialValues

Posted on 1997-08-25
3
218 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

760 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

26 Experts available now in Live!

Get 1:1 Help Now