Link to home
Start Free TrialLog in
Avatar of StudmillGuy
StudmillGuyFlag for United States of America

asked on

How can I view where a report is pulling its data from?

This question is exactly what I want, unfortunately my knowledge of MSSQL is too basic to even understand the answer.

https://www.experts-exchange.com/questions/20890718/How-can-you-see-what-table-or-query-is-feeding-a-report.html

The accepted answer just said "Or you can look at the report in design view and go to properties to see the query that is feeding it".  For me this just triggers more questions.

1. "Design view" in which software?

As I look through the installed programs on the database host, I don't see anything leaping out, like Crystal Reports, to view the contents of a .rpt file.  I can connect to the SQL Server from MSSQL Management Studio, but that doesn't seem to allow me to open the .rpt file.  I have found some .log files on the host, and that is where I found the paths to the .rpt files.  I have tried opening the .rpt files with Notepad, but that results in a lot of ASCII salad.

I can't even promise that it is Crystal Reports producing the reports.  What I know is that our operator can click a button that says "Reports", configure some parameters for the report and then print it.  My ultimate objective is to get the data of the report that gets produced in its own table.  Of course that wouldn't even be necessary if I just knew where the data was stored and how to extract it.
Avatar of LinInDenver
LinInDenver
Flag of United States of America image

If it is a .RPT file extension, odds are it is Crystal Reports. I believe SSRS uses a different extension. I would recommend downloading the trial version of Crystal Reports (they have 30 day available). You could then attempt to open the file, click the Database Menu, and choose "view SQL"

You could post some screenshots and we could probably tell you pretty quickly from a look if it is Crystal or not. They have a very distinctive look and feel, especially the user parameter window.

If there is an export option once she has the report open, check to see what choices there are. Built in Crystal viewers typically show "Crystal Reports" as an export choice along side Excel, Word, PDF, etc.
Avatar of StudmillGuy

ASKER

Thanks Lin.  I am now quite certain that it IS crystal reports.  I am running a trial version of something called "The Report Viewer Pro" and it produced the attached error dialog when I tried to open the .rpt file of interest.

So where do you recommend I go from here?
Dialog.jpg
Take a look at this pdf file. It's step by step on how it is done. I think it may help in your situation, it did me.

http://gacounts.caes.uga.edu/help/documents/Helpsheet_Pulling_Reports.pdf
Wouldn't Crystal Reports have to be running on the host for it to be producing the reports?
Yes. It would, ignore that link, that may have been the wrong one.
It could be on a public server as well.
Avatar of Mike McCracken
Mike McCracken

Unless you have a copy of Crystal, there is no easy way to determine the source of the data.

The error from the Report Viewer Pro is because the report can't find the database or the database driver.

Ant idea where the RPT files came from?

mlmcc
ASKER CERTIFIED SOLUTION
Avatar of LinInDenver
LinInDenver
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank goodness.  I definitely couln't find what I needed in that document.
Hmmm.  I work for a pretty large company.  I'll see if our DBA can see what is in that rpt file.
Thanks all.  My It department had someone who could open the rpt file and that gave me enough info to get what I wanted.  It turned out that report depended on a rather elaborate stored procedure that created a temporary table that fed the report...and then the table disappeared.  That's why i could never find a table that contained ALL of the data.