Board index » delphi » Report Smith Variables

Report Smith Variables

I feel like I am missing something simple, so would someone please jog
my memory, with a 2x4 preferably.

        The problem is running a report using a report variable.  Sometimes I
want a specific dataset, ie: PROGRAMCODE = A.  Other times I want all
the data items, ie: all PROGRAMCODEs.  The only solution I seems to have
come up with is two separate reports, one runs when I want all of them,
the other runs when I only want a specific dataset.  This is an OK
solution for a one or two possibilities.  But I have one with 2^3
possibilities, I can't believe I have to have 8 separate reports.  Any
Ideas?

        Ted Herrlich

PS.... One engineer in my office had a question about installing
PowerBuilder 5, he went out in e-mail asking everyone here.  My
Partner-in-crime responded with "Install Delphi 2.0 instead!"
--

"The Pen is Mightier than the Sword, unless you are One on One."

 

Re:Report Smith Variables


Ted Herrlich wrote in an article appearing in comp.lang.pascal.delphi.databases:

Quote
>    The problem is running a report using a report variable.  Sometimes I
>want a specific dataset, ie: PROGRAMCODE = A.  Other times I want all
>the data items, ie: all PROGRAMCODEs.  The only solution I seems to have
>come up with is two separate reports, one runs when I want all of them,
>the other runs when I only want a specific dataset.  This is an OK
>solution for a one or two possibilities.  But I have one with 2^3
>possibilities, I can't believe I have to have 8 separate reports.  Any
>Ideas?

 select fields_of_interest from the_table
   where Program_code = :User_parameter
     or :User_parameter = 'A'

Just be careful. Too many lines like the above in a Query will crash
the Development Environment if you try to make the query go active.
[Save your work].

--
Kevin Davidson (kwdav...@calweb.com)
* Every scribe who has been instructed in the kingdom of heaven
  is like the head of a household who brings from his storeroom
  both the new and the old. Matthew 13:52 (NAB-RNT)

Other Threads