Shared Bands

hello.
I have to enter shared band, that is jeneral to all my reports (like REPORT TITLE, with logo, name og company and more..).
This band must be able to have those qualities:
1. It must be exported from jeneral report, and imported at RUN TIME to all of the reports, so change that will be put in it, will influence all the reports automaticaly.
2. it must enter as a band, not as entire page (Like shared logo). that is, it will take only the rows that it has to, and will be be preview and printed as an integral band of the report.
I think the composite reports can not do that things, and it is very important to have in Report generator system.
thanks
yaron.

Comments

  • BruceBiddleBruceBiddle Nottingham UK
    edited 3:38AM
    Hi Yaron

    I havent tried this, it's just an idea!

    Suppose you create a general report with the band you want to use in it and test it with all the objects you want.

    Procedure Somefunction;
    Var
    StdBand , TargetBand : TfrxReportTitle; // or TfrxDataBand etc....??
    S : TmemoryStream;
    begin

    S := TMemoryStream.Create;
    StdBand := MyStandardfrxReport.FindObject(StdBandName);

    StdBand.SaveToStream(S, True,False?? );
    //SaveToStream(Stream: TStream;SaveChildren ,SaveDefaultValues:Boolean);

    TargetBand:= MyReportToUse.FindObject(TargetBandName);
    //Or create one?

    TargetBand.LoadFromStream(S);
    S.free;
    ......

    Hope this gives you some ideas!

    Bruce

  • edited 3:38AM
    Hello Bruce.

    Thanks for the response.

    I did what you have suggested, but the generator had the exception: 'Invalid File Format'.
    What can I do to solve the problem ?
    And more : Do you have the intention to upgrade the generator to do the Shared Band ?

    Thanks.
    Yaron.
  • BruceBiddleBruceBiddle Nottingham UK
    edited 3:38AM
    >'Invalid File Format'
    Is this when you try to compile your project in Delphi or when you run it?
    I have only seen this once before when installing a component, something to do with packages not being compiled in the correct order.

    >And more : Do you have the intention to upgrade the generator to do the Shared Band ?
    Sorry Yaron, I'm just a FastReports user like you!

    Bruce
  • edited 3:38AM
    Hi Bruce.
    This huppens when the report is executed.
    Thanks.
    Yaron.
  • edited 3:38AM
    Hi Bruce.
    Correction to my last response:
    The exception show on executing the line: 'TargetBand.LoadFromStream(S);'
    That is, before even executing the report.
    Thanks.
    Yaron.
  • edited November 2004
    Don't know if you guys are still on to this. I have an old post where I described how I got this to work in FR 2.52 but how I did not get it to work in FR 3. I have tried several approaches but not this idea.

    You will need to

    memStream.Postition := 0;

    before you LoadFromStream.

    The approach with Object.Save/LoadFromStream seems handy enough. I Load a complete page (it is a optional title page with data selection information) and that seems to work good as long as there are no duplicate names.

    BUT HOW DO I move the created page before all existing ones by code????

    Regards,

    /Dany

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.