?
Solved

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

Posted on 2011-09-20
6
Medium Priority
?
297 Views
Last Modified: 2013-11-19
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?
0
Comment
Question by:futr_vision
  • 2
  • 2
5 Comments
 
LVL 13

Expert Comment

by:Hugh McCurdy
ID: 36568928
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
 

Author Comment

by:futr_vision
ID: 36569441
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
 
LVL 13

Accepted Solution

by:
Hugh McCurdy earned 2000 total points
ID: 36569552
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
 

Author Comment

by:futr_vision
ID: 36579722
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
 
LVL 50
ID: 37412249
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Suggested Courses
Course of the Month14 days, 12 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question