473,386 Members | 1,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Reports on the intranet

Hi
I wonder if there is any possibility to generate reports in form such a
pivot tables and make them available on the web, would be great if users
would be able to work on it as on pivot table in excel, is it possible ?
What would I need ?
Nov 13 '05 #1
1 1475
You can achieve your objective using ASP/ASPX. Using ASP/ASPX would
require the Microsoft IIS web server. Here is a sample using aspx which
displays an Excel Spreadsheet in a webpage. Note: This can also be
accomplished using ASP.

<%@ Import Namespace="System.IO" %>
<script language="VB" runat="server">
Sub Page_Load(Src as Object, E as EventArgs)
Try
GetFile()
Catch ex As Exception
End Try
End Sub

Private Sub GetFile()
Dim FilePath As String = Cache("strFile").ToString
If Not Dir(FilePath).Equals("") Then
Dim fs As New FileStream(FilePath, FileMode.Open, FileAccess.Read)
Dim bw As New System.IO.BinaryReader(fs)
Dim byt() As Byte, i As Integer
byt = bw.ReadBytes(CInt(fs.Length))
i = byt.Length()
Response.ContentType = "application/vnd.ms-excel"
Response.OutputStream.Write(byt, 0, i)
Response.OutputStream.Close()
End If
End Sub
</script>
<HTML>
<HEAD>
<title><%=Cache("strFileName")%></title>

</HEAD>
<body >
<form>
</form>
</body>
</HTML>
To use this as straight ASP, just comment out the words

'Try
...
'Catch

and leave out the import line
<%@ Import Namespace="System.IO" %>

Note: If you load the .Net Framework on the server with IIS (IIS 5),
then the above ASPX code should run fine. You can write it straight in
Notepad. This routine uses a byte array and the line

Response.ContentType = "application/vnd.ms-excel"

is where the magic happens. Where Access comes into the picture here is
that you generate the Excel Report from Access. All of my Access
reports operate this way: I generate the report and then copy it to the
web server for viewing. The Response.ContentType line displays the
Excel Sheet in its native format with tabs and all. The only caveat
with this is that if someone tries to edit the sheet from the Web
Browser, the Excel file becomes unusable/uneditable for anyone else -
becomes read-only if edited from the web. Have your users download the
file first and then make edits to it.
Rich

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Scott | last post by:
Our company intranet is strictly PHP-based. However, one of my new projects is to publish on-demand reports generated in Crystal Reports 9. Has anyone done this using PHP? Like many non-open...
3
by: Scott | last post by:
Hi Everyone, Does anyone know if it's possible to allow an end user of an Access DB to personalize the layout of their own reports. What we would like to do is allow them to select the...
3
by: Dmitry Karneyev | last post by:
Hi! I need to deploy .NET application (ADO.NET + Crystal Reports) in local intranet. All assemblies of application will be shared in the folder on the server so all users can execute this...
0
by: Sobhan Vezzu | last post by:
Hi All, We have recently migrated our intranet website from Windows 2000,IIS5.0 to Windows 2003, IIS 6.0. It is developed in ASP.NET We have give a new IP address for this website and we are...
3
by: serge calderara | last post by:
Dear all, Our customers request the need to be able to make data analysis and reporting over an intranet solution. And this for sure in a quite fast way like 2 to 3 month developement. Actually...
1
by: cb | last post by:
I've built a linked database with a series of reports that has a control which contains a field divided by the sum of a subreport field. This calculated control works on my home computer and on a...
1
by: Kbalz | last post by:
Having a really hard time finding solid examples on deploying a CR .NET applcation on my intranet. I'll explain what I've done so far, and toward the bottom is where I can't print using the report...
2
by: =?Utf-8?B?QWxvbnNv?= | last post by:
Hello. I developed an application which works in an Intranet. I use Crystal Reports. I have not been able to see the reports. Please note that I already downloaded and installed in my bin...
3
by: Miro | last post by:
Hi, Just wondering what a good book is on visual studios 2008 ( or 2005 if no 2008 ) that teaches you how to properly use crystal reports with it. Or im assuming that as long as I can create a...
0
by: kimbred | last post by:
I have a Crystal Report that requires several tables from a dataset to complete. The data from the first two sources seem to work fine but the data from the third doesn't seem to show up. I'm...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.