Solved

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

Posted on 2011-09-20
6
286 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:Ingeborg Hawighorst
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

910 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

23 Experts available now in Live!

Get 1:1 Help Now