Home General

Issues with Frames?

edited December 2015 in General
Hi,

Trying to get started with reports in D10 Seattle and RB17, using
SQLite. First test fails to show the datasource in my DB Pipeline.
Probably I have a problem because of using Frames, and/or with linking
to the datasource from a unidirectional data set. Any examples or simple
instructions to set up a first simple report would help much!

What I did: dropped a TppReport and ppDBPipe onto a frame. Most of
the needed stuff automatically appeared in the form's "uses" clause,
except ppDBPipe, which I had to add manually. Hooked the DBPipe to the
report. But despite having my datamodule in the uses clause, and a
DBSource in the datamodule, there are no choices in the drop-down of
DBPipe for data sources. The data source is hooked to a TFDTable (using
FireMonkey).

What I could do: I could abandon some or even all use of frames if
necessary. They work well in my application otherwise. Are they still a
problem in RB17? Can I use frames in the app, and call a separate form
for reports, avoiding RB components on a frame? Also, do I need to link
to a TSimpleDataSet or something for the datasource? I do want to use
FireMonkey.

Scott Stalheim

Comments

  • edited December 2015
    Hi Scott,

    Here are some tips

    - don't use frames

    - create 'report modules' comprised of a form or datamodule containing the
    Report, DBPipeline, DataSource, DataSet. Then when need to generate a
    report, create an instance of the module and call a public method you've
    defined for it, such as TmyReportModule.Print. Then free the report module
    instance when you are done. This architecture makes efficient use of
    resources. It uses dedicated datasets for the report, which is what you want

    - Even better than the above, use the RB Data workspace to build and link
    queries and define autosearch (ask at runtime criteria), and use the RB calc
    workspace to write calculations and event-handler code. Then you can save
    the report definitions to .rtm file or database. When you need to print,
    load a report template and print.

    - Unidirectional datasets are not supported

    - FireDAC is supported, FDTables are supported, see our demos

    - Check out the Dev Guide, demos, and tutorials installed to Public
    Documents\RBuilder/ For D10 Seattle we converted all the demos to use
    FireDAC, SQLite. We install an RBDemos SQLite database.






    Best regards,

    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited December 2015
    Thank you Nard,

    Lots of progress using your suggestions and the demos. But one sticky
    problem I can't find an answer for...

    I placed the RBuilder components on a Form, and provided access to a
    DataModule with my SQLite connection, a firedac table, and a datasource
    on it. On my form I have ppReport linked to a DBPipline. When I go to
    design the report all works well, indeed I can preview the data in the
    detail band within the designer. Also I put a GUIxWaitCursor on the form
    because that was in the examples, and it is in the datamodule.

    BUT when I go to run the Print method from within my form, I get "Cannot
    generate report. DBPipeline1 could not open data set". I tried to be
    sure the DB is connected, the table open, tried with the datasource as a
    regular datasource or a client dataset, etc. Always this error even
    though I can preview the data in table design. Must be some simple thing
    I have wrong?

    Scott Stalheim

  • edited December 2015
    Another follow-up. Some very bizarre behavior regarding component names
    and locations, apparently unrelated to Report Builder, was preventing a
    data connection to the report at run time. Now I can do at least simple
    reports with my data.

    So THANKS for the help. Will be back when/if more issues arise as
    reports are developed in more detail!!

    Scott

This discussion has been closed.