Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

REPORTSMITH HELP!!!

Posted on 1997-04-30
2
Medium Priority
?
735 Views
Last Modified: 2006-11-17
For my program in Delphi I need to make about 50 reports. I think it's best to make them in ReportSmith 3.0. Though I can not work with it. How can I use reports in my Delphi program and can I give variables to my report.
Example: Report for all students with a group the user can choose
Database : Name Groep Lastname Result
             Tom Fr04  De Decker  5
             Stijn Fr03 De Decker 4
            Jens  Fr04  De Decker 5
            Gordian Fr04 Vermarien 2
I need to make a report of all students who are in group Fr04 and have at least 5 and of all students who are in group Fr03. The groups should be variabels to the report
1 report for all groups. is this possible? Can I give variables from my delphi program to my report??
HOW??? Please Help Me It's urgent!!!!!!!!!!!!!
You'll get good points
:) Thanx to anybody wwho wants to help me with a FULL explanation.
0
Comment
Question by:DDTom23
  • 2
2 Comments
 
LVL 2

Accepted Solution

by:
javiertb earned 360 total points
ID: 1335787
First of all I should tell you that it's much more easier
using TQuery instead of ReportSmith, but anyway, here you go:
- In order to get that report you first access ReportSmith and
 select the table you want from the Tables section.
- Then you go to Report Variables tab and define your two
 variables which would be Group1 (to chose the first group
 you want the students result to be greater or equal than 5)
 and Group2 (for the students who are in Fr03 in your example).
- Now you go to Selections and set the selection criteria, that
in your case, it would look something like this:

 . Include records in the report where 'any' of the following    aply
   1. 'all' of the following aply
     1.1. 'datafield' 'table1.Group' 'is equal to' 'report            variable' 'Var1'
     1.2. 'datafield' 'table1.Result' 'is greater than or equal            to' 'number' 5
   2. 'datafield' 'table1.Group' 'is equal to' 'report variable'       'Var2'

- Once you have all this set, you save the report and then access ReportSmith component property InitialValues, where you can set by code the variables you want to pass.
i.e.
Report1.InitialValues.Add('Var1=<'+YourSelectedGroup1+'>');
Report1.InitialValues.Add('Var2=<'+YourSelectedGroup2+'>');
Report1.Run;

Hope this helps
0
 
LVL 2

Expert Comment

by:javiertb
ID: 1335788
Hey, there! Could you evaluate my answer, please?
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

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…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

886 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