Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Grid Pack and Report Builder Server

edited March 2006 in General
Hello

I was advised to look at Grid Pack for Report Builder.

This is a brilliant component. However, it appears as though its yet
another thing that is not supported by Report Builder Server. I have a
simple report with a grid and I get an unable to read server response error

Any ideas anyone?

I am not going to be impressed if this is not supported by the server
especially as we have purchased it!

Cheers

Paul

Comments

  • edited March 2006
    Just thinking, Have you register all GridPack class at report server?

    William

  • edited March 2006
    What do you mean William?

  • edited March 2006
    Hi, Paul

    Since I don't have server edition, so I can not commet it out, The first
    thought came from my mind was that if the GridPack class has been registered
    in the Report Server, so the Server knows the GridPack.

    William

  • edited March 2006
    It is a brillant component and it works very well for me in Server.

    I had to put RBTableGrid in the "uses" clause of the report server data
    module to get it to work.

    ie

  • edited March 2006
    Hi Ismail

    Can you provide me with example report with a grid that works?

    I have added the RBTableGrid to my report server data module and I still get
    the error.

    Do I have to change anything on the webtier?

    Cheers

    Paul

  • edited March 2006

    Try adding the relevant units to the report server application and to the
    webtier applicaiton and/or client application.

    Report Server -----> (grid draw commands) ---> WebTier
    (grid component)

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited March 2006
    Grid Draw commands???

  • edited March 2006

    See details below...



    ---------------------------------------
    Article: Draw Command Architecture
    ---------------------------------------

    Page Objects
    -------------

    When a report prints it generates Page objects. Each Page object contains an
    array of DrawCommand objects (Page.DrawCommands[]) that describe what needs
    to be rendered for the page.

    Report --> Pages.DrawCommands[] ---> Device (Printer, Screen, ..) --> final
    output


    DrawCommands Objects
    --------------------

    Component --> DrawCommand

    Each TppComponent generates a DrawCommand object each time
    it prints on a page. For example if the component is a TppLabel and prints
    at the top of the page - one draw command object will be created for each
    page. If the Label is in the detail band, many draw commands will be created
    for each page.

    A DrawCommand contains a complete description of the location and content to
    draw. See ppDrwCmd.pas for the existing DrawCommand class descendants
    (DrawText, DrawImage, etc.)

    Some of the basic DrawCommand classes such as DrawImage and DrawText, rely
    on the ScreenDevice and PrinterDevice classes to render their content. Other
    DrawCommand classes such as TppDrawBarCode and TppDrawRichText render
    themselves to the appropriate device canvas directly.


    Creating Custom Components
    --------------------------

    Each component has an associated DrawCommand class that is
    is the value of its DrawCommandClass property. For a Label,
    the DrawCommandClass is TppDrawText. This value is normally
    set in the constructor. Examples of the common components
    are located in ppCtrls.pas.



    constructor TmyComponent.Create(AOwner: TComponent);
    begin

    inherited Create(AOwner);

    DrawCommandClass := TppDrawText;

    end;


    Each time the component prints, a DrawCommand object of
    the designated DrawCommand class will automatically be
    created and the components PropertiesToDrawCommand method
    will be called. You override this method to transfer the
    appropriate property values from the component to
    the drawcommand object.


    {------------------------------------------------------------------------}
    { TmyComponent.PropertiesToDrawCommand }

    procedure TmyComponent.PropertiesToDrawCommand(aDrawCommand:
    TppDrawCommand);
    var
    lWrappedText: TStrings;
    lTextBuf: PChar;
    lPrinter: TObject;
    lDrawText: TppDrawText;
    llCharPos: Longint;
    begin

    inherited PropertiesToDrawCommand(aDrawCommand);

    if not(aDrawCommand is TppDrawText) then Exit;

    lDrawText := TppDrawText(aDrawCommand);

    {set properties here}

    lDrawText.Alignment := Alignment;
    lDrawText.AutoSize := AutoSize;
    lDrawText.Color := Color;
    lDrawText.Left := PrintPosRect.Left;
    lDrawText.Top := PrintPosRect.Top;
    lDrawText.Height := PrintPosRect.Bottom - PrintPosRect.Top;
    lDrawText.Width := PrintPosRect.Right - PrintPosRect.Left;
    lDrawText.Text := Text;
    lDrawText.Transparent := Transparent;
    lDrawText.WordWrap := WordWrap;
    lDrawText.Font := Font;


    end;



    Creating Custom DrawCommands
    ----------------------------

    When you create a descendant component you can either
    use an existing draw command class or create a new one.
    For the TeeChart wrapper components, we chose to use
    the existing DrawImage class to specify the TeeChart
    as a metafile image. So it is not always necessary to
    create a draw command class.

    Examples of DrawCommand classes are located in ppDrwCmd.pas.
    A drawcommand will contain published properties that
    contain a complete description of the location and
    content to be rendered.

    DrawCommand classes must be registered - see the
    initization and finalization sections at the bottom
    of the ppDrwCmd.pas unit for an example.

    DrawCommand classes should publish all properties
    used to describe the object.

    DrawCommand classes must implment the Assign
    method to assign the values of all published
    properties from one draw command to another.


    --
    Tech Support mailto:support@digital-metaphors.com
    Digital Metaphors http://www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited March 2006
    Hmm this looks complicated Nard! Especially as I didnt write the component

    Hopefully William can help

    What makes this more interesting is that Ismail does not appear to have
    needed to put initilization sections into his data module?

  • edited March 2006

    You need to include a reference to the grid pack unit(s) in the 'uses'
    clause of your server, webtier, and client applications. That's the bottom
    line.

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited March 2006
    Hi Nard

    This is now working for the webtier and now I have another problem

    I cant get the grid to export when saving to a PDF using TExtraDevices

    Cheers

    Paul

  • edited March 2006


    Try contacting tech support for TExtraDevices and GridPack (this is not an
    RB issue.)

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited March 2006
    Hi, Paul

    In order to make TExtraDevices exporting the grids, you have to turn on
    the compile directive {$USEGRIDPACK} in one of unit of TExtraDevices.

    William

  • edited March 2006
    Hi William

    I have done that and I now get a range check error

    Cheers

    Paul

  • edited March 2006
    I am getting a stream read error from the report server

This discussion has been closed.