Many database records in different Memo on one side of reoprt

dufduf Poland
edited 5:39PM in FastReport 4.0
I have no experience with the reports related to the database but from what I have observed that each record is loaded into the object on the next page.
Is it possible to load the four records from a database to four Memo objects on one page of the report? Thanks.

Comments

  • edited 5:39PM
    duf wrote: »
    Is it possible to load the four records from a database to four Memo objects on one page of the report?
    Can you change your DataSet (this one with 4 rows) into another, like
    select (select sth from myTable where MyId = 1) as One,
             (select sth from myTable where MyId = 2) as Two,
             (select sth from myTable where MyId = 3) as Three,
             (select sth from myTable where MyId = 4) as Four
    
    That would prevent you report Page from printing it four times instead of once.
    If you can do that then disconnect Page from first DataSet, and connect it to this new one.
  • dufduf Poland
    edited 5:39PM
    Mick.pl wrote: »
    Mick.pl wrote: »
    Is it possible to load the four records from a database to four Memo objects on one page of the report?
    Can you change your DataSet (this one with 4 rows) into another, like
    select (select sth from myTable where MyId = 1) as One,
             (select sth from myTable where MyId = 2) as Two,
             (select sth from myTable where MyId = 3) as Three,
             (select sth from myTable where MyId = 4) as Four
    
    That would prevent you report Page from printing it four times instead of once.
    If you can do that then disconnect Page from first DataSet, and connect it to this new one.
    Is this syntax query is in MySQL? I'm not sure if writing 'as one' is appropriate for MySQL language. I see that perhaps we have a different idea as to how I connected the database with Fast Report. It seems to me with a strong emphasis on 'think' that I can not change the DataSet. I can only change query to database. I have only TfrxReport DataSet connected to database. TfrxReportPage DataSet is not connected and Memo DataSet is not also connected to database. If I do not understand something then I'm sorry.
  • edited 5:39PM
    duf wrote: »
    Is this syntax query is in MySQL? I'm not sure if writing 'as one' is appropriate for MySQL language. I see that perhaps we have a different idea as to how I connected the database with Fast Report. It seems to me with a strong emphasis on 'think' that I can not change the DataSet. I can only change query to database. I have only TfrxReport DataSet connected to database. TfrxReportPage DataSet is not connected and Memo DataSet is not also connected to database.
    Well, I didn't say it clearly [img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> - This isn't a syntax pattern for you - it's just an idea how to change ADOQuery that gives you 4 rows into another ADOQuery that'll give you 1 row with 4 columns (fields). - So phrases like "as one" are just examples and if you go this way you'd adjust them to your database syntax. - Of course you don't have to change your Dataset, I thought about the ADOQuery that you use to read those 4 rows. - I think of a Memo with contents like[/img][<ADOQuery."Field1">], where Query is responsible to give you a certain value from a database.
    - The above has a sense if you - as I guess - use ADOQuery, but if not ... >
  • dufduf Poland
    edited February 2013
    Mick.pl wrote: »
    Mick.pl wrote: »
    Is this syntax query is in MySQL? I'm not sure if writing 'as one' is appropriate for MySQL language. I see that perhaps we have a different idea as to how I connected the database with Fast Report. It seems to me with a strong emphasis on 'think' that I can not change the DataSet. I can only change query to database. I have only TfrxReport DataSet connected to database. TfrxReportPage DataSet is not connected and Memo DataSet is not also connected to database.
    Well, I didn't say it clearly [img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> - This isn't a syntax pattern for you - it's just an idea how to change ADOQuery that gives you 4 rows into another ADOQuery that'll give you 1 row with 4 columns (fields). - So phrases like "as one" are just examples and if you go this way you'd adjust them to your database syntax. - Of course you don't have to change your Dataset, I thought about the ADOQuery that you use to read those 4 rows. - I think of a Memo with contents like[/img][<ADOQuery."Field1">], where Query is responsible to give you a certain value from a database.
    - The above has a sense if you - as I guess - use ADOQuery, but if not ... >
    OK.
    I do not have in Fast Report such a component like ADOQuery but I have it in Builder and I can use it from Builder level. Instead of ADOQuery I use TSQLQuery. To use ADOQuery I need a component ADOConnection but is it used to connect to the database server? I do not see anywhere in the properties of the component value like host parameter. Do I have any hope prognosis? >
  • edited 5:39PM
    wrote:
    I do not have in Fast Report such a component like ADOQuery but I have it in Builder and I can use it from Builder level. Instead of ADOQuery I use TSQLQuery. To use ADOQuery I need a component ADOConnection but is it used to connect to the database server? I do not see anywhere in the properties of the component value like host parameter. Do I have any hope prognosis? >
    This is an area (yet) not known well for me - programming (Delphi, C++, others). My experience is based on FR script.
    In spite of that I attach sample example - maybe it will help you.
  • dufduf Poland
    edited 5:39PM
    Mick.pl wrote: »
    Mick.pl wrote: »
    I do not have in Fast Report such a component like ADOQuery but I have it in Builder and I can use it from Builder level. Instead of ADOQuery I use TSQLQuery. To use ADOQuery I need a component ADOConnection but is it used to connect to the database server? I do not see anywhere in the properties of the component value like host parameter. Do I have any hope prognosis? >
    This is an area (yet) not known well for me - programming (Delphi, C++, others). My experience is based on FR script.
    In spite of that I attach sample example - maybe it will help you.
    Thanks, but I have problem with your attach. It can not be opened. Can you attach it *.avi format?
  • edited 5:39PM
    duf wrote: »
    Thanks, but I have problem with your attach. It can not be opened. Can you attach it *.avi format?
    I've sent you an e-mail as avi file is longer than 10 MB (this forum limit).

  • dufduf Poland
    edited 5:39PM
    Mick.pl wrote: »
    Mick.pl wrote: »
    Thanks, but I have problem with your attach. It can not be opened. Can you attach it *.avi format?
    I've sent you an e-mail as avi file is longer than 10 MB (this forum limit).
    Thank you. Topic can be closed.
  • edited 5:39PM
    duf wrote: »
    Thank you. Topic can be closed.
    Sorry that you had to work with that issue so looooooong [img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> Maybe it would have been easier to force FR engine to do as you planed, I mean to write at X, Y coordinates. But, in the meantime, you could ... taste a bit of FR[/img][img]style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> Only you know what was better[/img]>

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.