Create a report with the use of an image file

dufduf Poland
edited 5:50PM in FastReport 4.0
Previously I was using RaveReport and can load an image (template) file and print text on it
MyReport->PrintBitmapRect();
MyReport->PrintXY();
Do I have to change the way reporting in fast report? Is there a similar way of making a report fast report? Thanks.

Comments

  • edited 5:50PM
    duf wrote: »
    Previously I was using RaveReport and can load an image (template) file and print text on it
    MyReport->PrintBitmapRect();
    MyReport->PrintXY();
    Do I have to change the way reporting in fast report? Is there a similar way of making a report fast report? Thanks.
    You may use two options:

    - Page1.BackPicture property gives you a background to the whole page,
    - Put Picture1 (TfrxPictureView) at the same place on a band where you need to write your text. Then use Designer context menu for that Picture1 and Send it to back. Finally put a Memo1 (TfrxMemoView) onto this Picture1 and write any text inside the Memo1.


    Regards
    Mick
  • dufduf Poland
    edited January 2013
    Mick.pl wrote: »
    You may use two options:
    - Page1.BackPicture property gives you a background to the whole page,
    - Put Picture1 (TfrxPictureView) at the same place on a band where you need to write your text. Then use Designer context menu for that Picture1 and Send it to back. Finally put a Memo1 (TfrxMemoView) onto this Picture1 and write any text inside the Memo1.

    Regards
    Mick
    1. I do not know which component has this property - Page1.BackPicture
    2. I do not have these two components (TfrxPictureView, TfrxMemoView) in my tool palette. This means that I have to create them dynamically?
    Thanks
  • edited 5:50PM
    wrote:
    1. I do not know which component has this property - Page1.BackPicture
    2. I do not have these two components (TfrxPictureView, TfrxMemoView) in my tool palette. This means that I have to create them dynamically?
    Thanks
    Ad. 1.
    Page1 is TfrxReportPage.

    Ad. 2.
    TfrxPictureView is available as Picture Object from Designer tool palette.
    TfrxMemoView is available as Text Object.

    All these three are basic components you meet when working with FR Designer.

    Regards
    Mick
  • dufduf Poland
    edited January 2013
    Thanks.
  • dufduf Poland
    edited January 2013
    Mick.pl wrote: »
    Mick.pl wrote: »
    Previously I was using RaveReport and can load an image (template) file and print text on it
    MyReport->PrintBitmapRect();
    MyReport->PrintXY();
    Do I have to change the way reporting in fast report? Is there a similar way of making a report fast report? Thanks.
    You may use two options:
    - Page1.BackPicture property gives you a background to the whole page,
    - Put Picture1 (TfrxPictureView) at the same place on a band where you need to write your text. Then use Designer context menu for that Picture1 and Send it to back. Finally put a Memo1 (TfrxMemoView) onto this Picture1 and write any text inside the Memo1.

    Regards
    Mick
    Can the memo type text in certain places? Is there a function that inserts the text in the specified space on the band? How can I enter text into the appropriate fields in the form?
    After create more than one page in the report window is still set to one. What should I do to the value is equal to the number of pages?
  • edited 5:50PM
    wrote:
    Can the memo type text in certain places? Is there a function that inserts the text in the specified space on the band? How can I enter text into the appropriate fields in the form?
    ...
    I attach 2 files.
    wrote:
    ...
    After create more than one page in the report window is still set to one. What should I do to the value is equal to the number of pages?
    Could you explain what do you mean above - I can't guess [img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> Regards Mick[/img]
  • dufduf Poland
    edited 5:50PM
    Mick.pl wrote: »
    Mick.pl wrote: »
    Can the memo type text in certain places? Is there a function that inserts the text in the specified space on the band? How can I enter text into the appropriate fields in the form?
    ...
    I attach 2 files.

    To view a "background_picture.fr3" I used this command:
    frxReport1->LoadFromFile("background_picture.fr3", false);
    frxReport1->ShowReport(true);
    
    What I saw is in the first attached file. I do not see used the image.
    Mick.pl wrote: »
    What you should do:
    - Assign that picture to picMyForm.Picture using Designer - then you'll see the right background on MasterData1 while working with Designer.

    Do you mean "Picture" property of the component TfrxReport? Second attached file.
    Mick.pl wrote: »
    - Put new Memos at the location you need to point the right place on you form (Intrastat).
    - Set expressions into these Memos to represent values from your Database.

    If I understand I have to create many objects Memo in places where there are fields "Intrastat". If yes how determine the location of the object Memo?
    Mick.pl wrote: »
    Could you explain what do you mean above - I can't guess >

    I do not know whether I made ​​it up but the instructions below allows you to create new pages of the report:
    Page = new TfrxReportPage(frxReport1);
        Page->CreateUniqueName();
        Page->SetDefaults();
        Page->BackPicture->LoadFromFile( "BMP\\N.bmp" );
    
    Page = new TfrxReportPage(frxReport1);
        Page->CreateUniqueName();
        Page->SetDefaults();
        Page->BackPicture->LoadFromFile( "BMP\\N.bmp" );
    

    But in the report header only appears value "1" as seen in attached file number three.


  • edited 5:50PM
    Things go wrong [img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> I guess you don't have an experience with using FR Designer and you try to construct the whole Report in your compiler. FastReport also offers such a method (Report.Engine properties like X, Y) but I do not suggest you to do so. FR offers a Designer that helps you to build the whole graphic for the report. Once you created (and tested) a report using Designer you usually save it to disk or database, and afterwards your application loads the report from that file or from database and run it I can help you by giving you an idea about how to work with FastReport in (IMO) most effective way - ie using FR Designer. I attach a short film to show you what I mean. Notice - I use a graphic file as a Picture property for TfrxPictureView I put on a MasterData1 and not as a Page.BackPicture.[/img][img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> Regards Mick[/img]
  • dufduf Poland
    edited January 2013
    Mick.pl wrote: »
    Things go wrong [img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> I guess you don't have an experience with using FR Designer and you try to construct the whole Report in your compiler. FastReport also offers such a method (Report.Engine properties like X, Y) but I do not suggest you to do so. FR offers a Designer that helps you to build the whole graphic for the report. Once you created (and tested) a report using Designer you usually save it to disk or database, and afterwards your application loads the report from that file or from database and run it I can help you by giving you an idea about how to work with FastReport in (IMO) most effective way - ie using FR Designer. I attach a short film to show you what I mean. Notice - I use a graphic file as a Picture property for TfrxPictureView I put on a MasterData1 and not as a Page.BackPicture.[/img][img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> Regards Mick[/img]
    Thanks for your good intentions but the file is corrupted. I tried to play it on two computers and the same problem occurs in a variety of applications for video playback, BestPlayer and Windows Media Player.
    I do not need to create a report in a separate Designer or loads it from file to my application. I need to preview the document in the FR. When the Button "Preview" in my application is pressed window will open with the completed report document. Creating a report should therefore take place in the event "OnButtonClick" and without saving to disk. I would also like to be able to create a report file *. pdf without opening preview.
    Pressing the button "Preview" should follow the instructions:
    1.Loading an image file "Intrastat" to the wizard.
    2.Entering text in the form boxes.
    3.Generate report and show it in a FR window or creating a report file *.pdf and saving to the disk.
  • edited 5:50PM
    wrote:
    ...
    Thanks for your good intentions but the file is corrupted.
    ...

    Write to me (you may use your own language) using my FR profile and give me any your e-mail adress and I'll send you an avi file without any compression (zip or rar). The film has more than 10 MB and I can't send it here as attachment.

    The main question is: how do you plan to create your report?
    Are going to use FR Designer or are you going to do everything by code of your compiled program.
    If you plan to use Designer then I can help you, if not - I'm sorry I can't as I my knowledge is based on pure FR script and Designer.

    Once more - have a look at complied demo and see how much you can do with Designer to place controls on a page in locations your form needs. If you find it helpfull then we can keep on going with your issue.

    Regards
    Mick
  • dufduf Poland
    edited January 2013
    Mick.pl wrote: »
    Mick.pl wrote: »
    ...
    Thanks for your good intentions but the file is corrupted.
    ...

    Write to me (you may use your own language) using my FR profile and give me any your e-mail adress and I'll send you an avi file without any compression (zip or rar). The film has more than 10 MB and I can't send it here as attachment.

    The main question is: how do you plan to create your report?
    Are going to use FR Designer or are you going to do everything by code of your compiled program.
    If you plan to use Designer then I can help you, if not - I'm sorry I can't as I my knowledge is based on pure FR script and Designer.

    Once more - have a look at complied demo and see how much you can do with Designer to place controls on a page in locations your form needs. If you find it helpfull then we can keep on going with your issue.

    Regards
    Mick
    Yes, I`m going to do everything by code of my compiled program. I sent the e-mail address. Thanks

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.