Solved

ReportSmith InitialValues

Posted on 1997-08-25
3
228 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

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…
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…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

717 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