CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2016
    Posts
    2

    Need help understanding an existing report

    I have been charged with creating a MSSQL query that will produce the data now produced by a Crystal report. The C/R was created 11 or 12 years ago by a guy that is long gone. I have not worked in crystal for probably 6 or 7 years, so I am finding my skills lacking. Two questions...

    1) Seems to me that I remember a way to print out all the variables, their formulas and everything you could dream of knowing about a crystal report but I am having trouble finding it CR 2008. Did I make this up in my silly little brain, or does this function really exist?

    2) In one of the variables (say @variableName), the definition contains the following lines....

    //Subreport Shared Value
    WhilePrintingRecords;
    Shared numberVar EquipCost;

    (I know of no sub-report)

    I have searched through the whole report and can not find any other reference to "EquipCost" excelpt one line that sets it to "0", but yet when the report runs, @variableName returns data that proves to be correct. I am thinking maybe this is something that is updated as part of producing the report lines, but if that is the case, I am not finding anything with that name. Can anyone give me some ideas where to look?

    Sorry about the vagueness, but I would need some help as to how to be more specific.

    Charlie

  2. #2
    Join Date
    Aug 2007
    Posts
    179

    Re: Need help understanding an existing report

    Hello Charlie - try exporting the report definition... File->Export->Export Report, and choose Report Definition. This will output all the formulas, commands and formatting options used in the report, and should help you to find where your EquipCost variable is being used.

  3. #3
    Join Date
    Jun 2016
    Posts
    2

    Re: Need help understanding an existing report

    Quote Originally Posted by Ned Pepper View Post
    Hello Charlie - try exporting the report definition... File->Export->Export Report, and choose Report Definition. This will output all the formulas, commands and formatting options used in the report, and should help you to find where your EquipCost variable is being used.
    Thank you Ned...I did manage to find the report definition and printed it both hard and Txt so I could run searches on it. What I find is there are two references to a subreport with the name "Benefits" with two shared variables: "Benefits2" and "EquipCost". I have searched the whole server for a report named "Benefits.rpt" or just "Benefits" and it does not exist. I looked on a old version of the server to see if somehow it was recently delete and no evidence that it ever existed was found. I would think that if this report was build to use a subreport and that subreport did not exist, it would throw an error. No errors are being thrown.

    This may be a red herring. This report was modified by a half dozen people for a period of more than a decade, so this is turning out to be a real challenge. The fact is, it still works. But unfortunately, we are moving from a VFP app to a SQL based app with a different structure so we can't just keep using it.

    Sheesh.

    thanks for your response. I will probably be back with more questions when I figure out how to ask them.

  4. #4
    Join Date
    Aug 2007
    Posts
    179

    Re: Need help understanding an existing report

    Hello - Subreports do not necessarily have to be saved as separate report objects. If the report definition states there is a subreport, then there is a sub-report embedded within the report you are looking at. If you select File->Edit you should see the choice Subreport Links. If the Subreport Links choice is grayed out, then there is no sub report embedded. If the choice "Subreport Links" is not grayed out, then there is a subreport embedded in your report. You will have to closely examine the report to find the sub report as it could appear as, and be the size of a single field.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured