Loop?
?Hi,
I am new at report builder, rap and delphi!
I am writing a report which has a subreport.
I am trying to pull data for a registration report, which will give me
presents or absences for each person that attended a training session.
The report should show a list of names on the left and their weekly
corresponding registratin marks.
The end user should be able to select which date wants the date from and
that date should be carry over on the report. eg, the user selects
10/09/2012, the reports should show registration marks for each attendee
for Monday, Tuesday, Wednesday and Friday.
I've got to the point to catch the data from the user and show the dates
and name of day, also show the registration marks.
The problem is that it is showing all registration marks for each attendee
instead of only the one matching the date entered by the user. I know
there should be a loop to go through all the dates and show only the one
needed but for some reason it is not working. I believe I am not doing
well the While do clause or probably I need an end of file? sorry for the
long message, any help will be much appreciated.
This is an example:
Name Monday Tuesday Wednesday Thursday Friday
10/09/12 11/09/12 12/09/12 13/09/12 14/09/12
Name1 Present Present Present Absent Present
Name2 Absent Present Present Absent Present
etc
Laura
--- posted by geoForum on http://www.newswhat.com
I am new at report builder, rap and delphi!
I am writing a report which has a subreport.
I am trying to pull data for a registration report, which will give me
presents or absences for each person that attended a training session.
The report should show a list of names on the left and their weekly
corresponding registratin marks.
The end user should be able to select which date wants the date from and
that date should be carry over on the report. eg, the user selects
10/09/2012, the reports should show registration marks for each attendee
for Monday, Tuesday, Wednesday and Friday.
I've got to the point to catch the data from the user and show the dates
and name of day, also show the registration marks.
The problem is that it is showing all registration marks for each attendee
instead of only the one matching the date entered by the user. I know
there should be a loop to go through all the dates and show only the one
needed but for some reason it is not working. I believe I am not doing
well the While do clause or probably I need an end of file? sorry for the
long message, any help will be much appreciated.
This is an example:
Name Monday Tuesday Wednesday Thursday Friday
10/09/12 11/09/12 12/09/12 13/09/12 14/09/12
Name1 Present Present Present Absent Present
Name2 Absent Present Present Absent Present
etc
Laura
--- posted by geoForum on http://www.newswhat.com
This discussion has been closed.
Comments
Welcome to the ReportBuilder community!
Typically, when filtering data, once the parameters needed are given
(date range from the end-user), you would then run a SQL query using
those parameters as a search condition and have the database return the
records needed.
Once the correct data is available, ReportBuilder will access and
display that data as-is, so there is no need for a code loop of any sort.
For instance: If the user selects 10/09/2012 the query would look
something like the following.
SELECT Name, Date, Status
FROM MyTable
WHERE Date >= 10/09/2012
ReportBuilder offers a feature that allows you to change the search
condition (WHERE clause) automatically called AutoSearch. This will
automatically give the user a dialog asking which dates he/she would
like to see and filters the dataset immediately before generating the
report. The easiest way to use this feature is with the Professional
version of the product and the data workspace (DADE).
I highly suggest reading though the Developer's Guide and working
through the tutorials given before moving forward. This will give you a
solid base for how to use ReportBuilder and the concepts of the
reporting process and data access. In the long run, this will make
creating reporting applications much more enjoyable.
Once you have done this, take a look at the demos (especially the
AutoSearch demos) located in the \Demos\.. directory (see article below)
and our rbWiki site for hundreds of helpful articles and tips.
Demos:
http://www.digital-metaphors.com/rbWiki/General/Installation/Tech_Tip:_Demo_Location
RBWiki: http://www.digital-metaphors.com/rbWiki
Let me know if you have any more questions, please feel free to post
them here or email us directly at support@digital-metaphors.com.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com