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

Missing Data in ppVariable in Preview & Print

edited June 2005 in General
Hi,

Delphi 5 Pro
ReportBuilder 7.04

I have a user of a report that uses a ppDBPipeline and contains a
ppVariable using veTransverse that takes a first name field and a last
name field and combines the fields into a full name:

procedure TfrmWorker1.ppVariable2Calc(Sender: TObject; var Value: Variant);
var ownername : string;
begin
ownername := trim(vworker1.GetCField('first')) + ' ' +
trim(vworker1.GetCField('last'));
ppVariable2.Text := OwnerName;
end;

It works fine on my machine for both Preview & Printing but not theirs.
Since the database is created by the report, I had them send the file
to me. It does contain data in both fields but the 'calculated' name
does not appear on the report. What's even weirdier is they did a
'find' on a name, which was found and then the name appeared on the preview.

I have CharWrap and WordWrap = true. Any suggestions?

Marie

Comments

  • edited June 2005
    Hi Marie,

    Try placing a break point inside the OnCalc event of ppVariable2 and check
    the value of ownername after it is set. Also, be sure the ppVariable is set
    to a String DataType and instead of setting the ppVariable2.Text property
    you may just want to say Value := OwnerName.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2005
    Hi Nico,

    That didn't resolve the problem. I did place a breakpoint in the
    program and the 'ownername' is set correctly and shows correctly on my
    machine but not the user's.

    I'm attaching a zipfile which contains the following:
    1 - var2.gif Object Inspector settings for ppVariable2 plus Design
    screen of the report
    2 - Preview.gif Preview screen of the report where all ppVariables
    (1 & 2) are blank but the other fields are shown.
    3 - actual.gif The preview report that is generated by the program on
    my machine which shows all the correct values for the variables. The
    user gets the Preview.gif version except for ppVariable1 which is shown
    correctly.
    4 - vWorker1.dfm & vWorker1.pas actual units I'm using the logic
    employed by your 'Demos' and registering the report in the Main program.

    I'm totally at a loss since I can't duplicate the problem on my machine
    and the user is 500+ miles away. Any other suggestions?

    Marie

  • edited June 2005
    This is a multi-part message in MIME format.
  • edited June 2005
    Hi Marie,

    For future reference, please send all attachments to
    support@digital-metaphors.com.

    Looking at the screenshots and provided code, I cannot see any problems that
    would lead to this behavior. The fact that you are unable to recreate this
    issue on your own machine leads me to believe that this is a data access
    issue on your customer's end. ReportBuilder simply prints what you tell it
    to. The only reason your customer would not be seeing any text would be
    that the TppVariable.Visible is set to False (which it is not) or the data
    is not properly being retrieved in the OnCalc event.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2005
    Hi Nico,

    Sorry about the attachment, it was my first time.

    I know that the data exists on the user's machine, I had them send me
    the file. I could re-write the code to build the ownername while
    creating the database instead of using the ppVariable, but I'd like to
    resolve this for the future. I'm going to try some things, like
    dropping the Char & Word wraps. Do you think changing the 'Reset'
    properties would make any difference?
    If so, would this be correct?
    ResetComponent := ppDBPipline
    ResetType := veDataPipeline
    The CalcType := veTraversal with CalcComponent := ppReport1, do you
    think changing these to veDataPipelineTraversal & ppDBPipeline1
    would help?

    Any ideas for the 'data access issue'? Could it be a buffer problem?

    Thanks for confirming that I didn't do something stupid in the code.

    Marie

  • edited July 2005
    Hi Marie,

    Changing the reset component should not affect the output in your case. I
    would leave it where it is. Dropping the word wraps from the text may have
    an effect but it should not cause the behavior you are getting.

    Perhaps (if you are able to test with your user's computer) send them a test
    app that just access the data in the same manner without using ReportBuilder
    and see if they are able to see the correct output. This will isolate the
    problem as ReportBuilder specific or not.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2005
    Hi Nico,

    I sorta did what you suggested - I sent the user several versions of the
    program to test the output of the report. Here's the results:
    ppVariable2 Initial Settings: This didn't work - original program
    CharWrap := True
    WordWrap := True
    CalcComponent :=
    CalcType := veTraversal

    ppVariable2 Settings: These combinations DID work
    CharWrap := False
    WordWrap := False
    CalcComponent :=
    CalcType := veTraversal

    CharWrap := False
    WordWrap := False
    CalcComponent := ppDBPipeline1
    CalcType := veDataPipelineTraversal

    CharWrap := False
    WordWrap := True
    CalcComponent := ppDBPipeline1
    CalcType := veDataPipelineTraversal

    Conclusion - it seems that 'Wraping' was the problem - which doesn't
    make sense to me. I sure hope it just wasn't the 'CharWrap'.

    Marie

  • edited July 2005
    Hi Marie,

    I believe we added the CharWrap feature for a very select group of users.
    On my machine, the CharWrap feature does not function correctly unless
    WordWrap is set to True as well, and AutoSize is set to false. I am still
    as confused as you are about why this is not working on your user's
    computer. I tried all your combinations below and in every one, I was at
    least able to see the data. One not about your design... if you intend the
    variable text to wrap, you will need to size the component vertically
    because the TppVariable is incapable of stretching.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.