How do I log into a reporting service and download data in a table

I work for a company that is overwhelmed on their development end and can't deliver the tools I need to expedite the download of my report data. I currently log into our admin system and import into Excel using the Get External Data > From Web functionality. I want to build a web application locally on my test server that mimics the process of logging into the admin system, running a report and then downloading the data as a csv file or some other Excel compatible file. How do I do this?
futr_visionAsked:
Who is Participating?
 
Hugh McCurdyCommented:
This is a lot of work.  I'll provide a top level design.  You might need more details.

I don't know what level of security you want for login.  You can use the built in PHP encryption, which I understand doesn't work so well.  For starters, for writing the code, I'd store the password in the clear and worry about encrypting it later.  

Were I writing the login program (and I've done that), I'd make one PHP file.  First time through, there are no $_POST variables.  Generate the form.  Second time through, there are $_POST variables (use $_POST for this instead of $_GET).  Second time through, run the authentication.  If it fails, you just show the form again.  (Put the authentication code earlier in the program than the display form code).  If the user successfully authenticates, set a $_SESSION variable and load some other page (ideally one with navigation and perhaps some "hello" text so you know you are logged in.

The report would simply build an SQL query from the string and pass it to SQL.  Then get the results and print them.  (As I said, this is a top level design.  If you have specific questions, you'll need to ask them.)

You can have the download as part of the report.  I do that sometimes.  I just put a checkbox on my form but you could use, in your URL, &download=example.csv
PHP has good csv support.

If you want to do some general learning about PHP, I suggest this site    http://www.w3schools.com/php/
0
 
Hugh McCurdyCommented:
This is difficult to answer without more information about your background.  I'd tell myself - "just write the programs."  Clearly that's not the answer you seek.

Is your local server setup and running?  Does it provide PHP services?  Does it have sufficient SQL data to allow for testing?  How well do you know PHP?

It seems the simplest solution is to copy the PHP code (if it's PHP code) from your employer and install it on your computer.  Then make sure you have a good enough database for testing.  Modify the PHP code as needed to make sure it's not trying to leave the local server (and go to the company site).  Modifications might not be needed.

Anyway, I'm at a loss what step(s) you are missing based on what you've said so far.
0
 
futr_visionAuthor Commented:
Thanks. Here is what works out to.

1. login page - name and password.
2. Report query. I'll be accessing the reports using a URL with the parameters for the query included. i.e.  www.report.com?date=20110304&user=sdfsgsdg&server=server2......
3. Once the report is generated I want to identify a specific table and download all the data like Excel does.

Does this help any?

As for my local testing server it should be more than adequate to run this program and store the data.
0
 
futr_visionAuthor Commented:
Hmmm. The site already exists. I can go to it daily, log in and can run my reports through the interface or I can log into the site through Excel, run the report and select a table for Excel to download the data from. i basically want to do the same thing. I want to automate logging in, running a report and grabbing the data when the results are returned.
0
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.