Home End User
New Blog Posts: Merging Reports - Part 1 and Part 2

Auto search dialog for specific query structure

edited December 2003 in End User
Hi!

Here s query (that use transform function in MS Access):

TRANSFORM Count(UMVGL.Id) AS CountOfSifra
SELECT UMVGL.Datum, Count(UMVGL.Id) AS [Total Of Sifra]
FROM Ispitivac INNER JOIN (UMVGL INNER JOIN UMV ON UMVGL.Id = UMV.Id)
ON Ispitivac.Id = UMV.Ispitivac
WHERE UMVGL.Prefix='1' AND
UMVGL.Datum Between #01/01/2001# And #01/31/2001#
GROUP BY UMVGL.Datum
PIVOT UMV.Ispitivac;


How to add Auto search criteria manually for a query like that.....

Regards,

Benjamin

P.S.
Sorry if this is repeted post but eventhought I think I saw something like
that...now cannot find it!
;-)

The difference between theory and practice is that in theory there is no
difference between theory and practice, but in practice there is....

Comments

  • edited December 2003
    Hi Benjamin,

    Please see the previous post and check out the Autosearch Demos for more
    information on creating custom autosearch criteria.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2003
    Hi!

    There are several demos...so I have studied them and choose "1. AutoSearch
    Field to SQL Params".
    Is that OK or maybe some other DEMO is more suitable for my need.
    However all that demos suppose that you have in ".exe" implementation of
    such a feature (i.e. creting autosearch fields). According that I have
    another question which i logical continuing....

    I'd like to make something that should be app independent, so none of
    changes should be made in .exe but only in database definition.
    For that (as far as I can see now) I need to create another rbXXX table(s)
    (in 1:m relation with rbItem table) which would hold some aditional
    information for my need. Could you please specify on what should I consider
    when creating such a new database design (that can cowork with RbEur).
    At the end, have you heard that someone has tried something like that so is
    there any aditional suggestions.

    Regards,
    Benjamin


  • edited December 2003
    Hi Benjamin,

    To my knowledge, we have not ever seen this done before, however it should
    be possible. I would suggest loading report templates as you need them and
    then using the Template.OnLoadEndEvent to assign the autosearch values from
    your separate table. Below is an article on using the Template events.

    ----------------------------------------------
    Tech Tip: Using Template Events
    ----------------------------------------------

    The Report.Template object has several events that can be used for
    customizing what happens when a report is loaded or saved:

    - OnLoadStart
    - OnLoadEnd
    - OnNew
    - OnSaveStart
    - OnSaveEnd


    The OnLoadEnd and OnNew events are often used to perform actions related
    to report and data initialization.

    The OnSaveEnd event is often used to save additional descriptive
    ("meta") data to the database each time the report is saved.

    Example:

    The Report.Template events are public and therefore must be assigned at
    run-time.


    1. In the private section of your form declaration you can declare an
    event-handler method:

    TForm = class(TForm)
    private
    procedure myTemplateOnLoadEndEvent(Sender: TObject);

    public

    end;


    2. In the Form.OnCreate event, you can assign the event-handler to the
    event:

    procedure TForm1.FormCreate(Sender: TObject);
    begin

    ppReport1.Template.OnLoadEnd := myTemplateOnLoadEndEvent;

    end;


    3. Implement the event-handler method:

    procedure TForm1.myTemplateOnLoadEndEvent(Sender: TObject);
    begin

    {add code here to initial the report or data, etc. }
    ppReport1.PrinterSetup.MarginTop := 0.5;

    end;


    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2003
    Ok!
    If I implement that in praxis using your mentioned events...would it be
    compatible (with same table structure of course) when we would like to
    implement such a report to work on Report server?
    THX!
    Benjamin

  • edited December 2003
    Hi Benjamin,

    In short... Yes. When using the Report Server, you will need to define
    which type of Volume you will be using to access your report files. If you
    are using rsReportTemplateVolume object, you can use its OnLoadEnd event
    already built in to do the things I described in my previous post.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2003
    THX!

This discussion has been closed.