Solved

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

Posted on 2011-09-20
6
285 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
6 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 500 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

Expert Comment

by:teylyn
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now