Differents "Details structures" in a Report

I need to do a report with differents "Details structures".

I try to explain (sorry for my english).

My client it's a Medical Clinical and it's need a "Patients Clinical Historial" with the next data:

- Header Basic: Clinical Name, Patient Name, age, sex ...
- Detail Basic: Cuestion and Answers


Well, the Detail Band it's need in differents structures, that is, Cuestion and Answers TFields with differents size, color, position, .......

I think that a flexible way for the client (because it's allow indefinite Details structures), It's to do differents Reports ('Reports Detail') with only a Details Band, and when the reports run change the "Detail Band Basic" to "Detail Band" of "Report Detail".

I d'ont known how can to do it and I'm not sure if it's a good idea.

Any other idea??

Please Help meeeeeeee!!!

TIA

Comments

  • edited November 2003
    I'm doing test of a report with differents "Details structures".

    I try to explain (sorry for my english).

    The "Basic Report" have:

    - Header : header data
    - Detail: Visible to False; Only code-script with a call to a function that "try" change a Child Band by Other.
    - Child Band: detail data

    Test 1.- I try to do a function that change all "Child Band" objects by Other "Child Band" that I load from another file frf.
    function TfrObjects.ChangeBand(BandName: String): Boolean;
    var
     ? SourceBand, TargetBand: TfrBandView;
    begin
    Result:=False;
    frReport2.LoadFromFile( ExtractFilePath(ParamStr(0)) + 'AnotherBands' + '.frf');
    SourceBand:= TfrBandView(frReport2.FindObject(BandName));
    TargetBand:= TfrBandView(frReport1.FindObject(BandName));
    
    if not Assigned(SourceBand) or
     ?  not Assigned(TargetBand) then
     ?  ? showmessage('error')
    else
     ? begin
     ?  TargetBand.Assign(SourceBand);
     ?  Result := True
     ? end;
    end;
    

    Test 2.- I try to do a function that change a "Child Band" object by Other "Child Band" object, that I load from another file frf.
    function TfrObjects.ChangeMemo(BandName, MemoName: String): Boolean;
    var
     ? SourceMemo: TfrView;
     ? TargetBand: TfrBandView;
    begin
    Result:=False;
    frReport2.LoadFromFile( ExtractFilePath(ParamStr(0)) + 'AnotherBands' + '.frf');
    SourceMemo:= (frReport2.FindObject(MemoName));
    TargetBand:= TfrBandView(frReport1.FindObject(BandName));
    
    if not Assigned(SourceMemo) or
     ?  not Assigned(TargetBand) then
        showmessage('error')
    else
     ? begin
     ?  TargetBand.Assign(SourceMemo);
     ?  Result := True
     ? end;
    end;
    

    But.... D'ONT WORK ANY TEST

    How can I change a band by other, or a object by other, in others frf??

    Please, Help me.
  • gordkgordk St.Catherines On. Canada.
    edited 8:24AM
    Hi
    one way may be to design with 2 detail bands and to turn visible property of bands on or off depending on which one you want.
    regards
    gord
  • edited 8:24AM
    Thanks Gord,

    Yes I know that a I can create 2, 3, 4... details/childs/... bands and turn visible property of these bands to true/false depending on which one I want to print, but ....

    I d'ont want to limit (well my client) the number of details bands. It's most flexible (only for this report) that the user can create the detail band that their prefer.

    Well, I think that a good method it's to create:
    A.) 1 "Basic Report" that containt de "basic structure" (masterheader, masterdata, detailheader, detailband ....)
    B.) X "Detail Report" that containt a only detailband.
    C.) Then programming I want to link some detailband of "Detail Report" to certain detailband of "Basic Report".

    * Any Idea?
    * How can I do it?
    * About TfrReport or TfrBandView, exist any objects methods or objects properties to do it?
    * Other similar idea than it maintain these flexibility?

    Thankss IA
  • gordkgordk St.Catherines On. Canada.
    edited 8:24AM
    Hi
    there is a number of approaches to take
    1 give them full design capability by using a datamodule and all the frdbdatasets required and let them design their own reports.
    2 limit design capabilities.
    you can create templates .frt files you can control the template dir the save dir and the open dir of the designer.
    or you can design a report with all the possibilities and use variables to control visible properties of objects, add a dialog page to the report and allow the user to select what options he wants using check boxes, and set the value of the variables controlling visibility according to the check boxes selected.
    regards
    gord
  • edited 8:24AM
    Hi Gord again. Thanks for your reply.

    The report that treatment to do is more complex, next I give more details about your reply:
    > 1 give them full design capability by using a datamodule and all the frdbdatasets required and let them design their own reports.

    The most end users d'ont know (and they do not want to know) to use technical details. they prefer to manipulate things like the font, position, color, etc. (simples components)

    >2 limit design capabilities.

    ok

    >3 or you can design a report with all the possibilities and use variables to control visible properties of objects,

    It's impossible, because I d'ont want to limit the number of DetailsBand designs.
    I explain myself better. I would like that the user could design with each "question or article" a structure/detailband or indicate to it as he wishes of which they exist. (and all write in the database)

    >4 add a dialog page to the report and allow the user to select what options he wants using check boxes, and set the value of the variables controlling visibility according to the check boxes selected.

    It is impossible, because the design of each line of details depends on the information that arrives to us from the data base.

    ---

    Therefore I believe that a form to do all this, would be to have create a "FRF BASIC" of a line of detail and that the user can from this create new FRF, but ...

    How can I do it?
    Or it's Imposible?

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.