Setting Parameters for different reports
I am saving my reports to a database table. Some reports requires some
values to be checked for certain values while other reports do require any
values.
My question is how can I set up a report listing for the end user to select
a report with out creating errors. Some reports requires the checking of
table values or set parameters while other reports do not take any
parameters at all?
For example:
Report1: Insurance Report
If Table1.HasLifeInsur = 1 and Table1.HasMedIsur = 1 then
I want chkHasBoth.checked = true
I want chkHasLife.checked = false
I want chkHasMed.checked = false
If Table1.HasLifeInsur = 1 and Table1.HasMedIsur = 0 then
I want chkHasBoth.checked = false
I want chkHasLife.checked = true
I want chkHasMed.checked = false
If Table1.HasLifeInsur = 0 and Table1.HasMedIsur = 1 then
I want chkHasBoth.checked = false
I want chkHasLife.checked = false
I want chkHasMed.checked = true
These checkmarks are located at three phyical location to print on a
preprinted form
Report 2: Employee Name Listing
This report does not require any of the top values to be initialized.
How can I run a report like Employee Name Listing without errors because of
the initialization for the forst report?
Thank you,
John A
values to be checked for certain values while other reports do require any
values.
My question is how can I set up a report listing for the end user to select
a report with out creating errors. Some reports requires the checking of
table values or set parameters while other reports do not take any
parameters at all?
For example:
Report1: Insurance Report
If Table1.HasLifeInsur = 1 and Table1.HasMedIsur = 1 then
I want chkHasBoth.checked = true
I want chkHasLife.checked = false
I want chkHasMed.checked = false
If Table1.HasLifeInsur = 1 and Table1.HasMedIsur = 0 then
I want chkHasBoth.checked = false
I want chkHasLife.checked = true
I want chkHasMed.checked = false
If Table1.HasLifeInsur = 0 and Table1.HasMedIsur = 1 then
I want chkHasBoth.checked = false
I want chkHasLife.checked = false
I want chkHasMed.checked = true
These checkmarks are located at three phyical location to print on a
preprinted form
Report 2: Employee Name Listing
This report does not require any of the top values to be initialized.
How can I run a report like Employee Name Listing without errors because of
the initialization for the forst report?
Thank you,
John A
This discussion has been closed.
Comments
rather than in Delphi. You can create a calculated field (either one integer
field which can take on one of three values for each of the three
possibilities, or three Boolean fields). You would then populate the fields
based on the HasLifeInsur and HasMedInsur fields. Lastly you would hook
these new fields to DBCheckBoxes in your report.
The other option is perform some kind of check to decide whether the code
you listed should be executed, such as checking the name of the report or
explicitly looping through the objects in the report to see if the
checkboxes exist so that they can be checked.
--
Cheers,
Alexander Kramnik
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com