473,413 Members | 1,801 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,413 software developers and data experts.

Calling Crystal Report from Asp


Hi,
I am new to crystal reports and I have to build some reports and call them from an ASP page and display them. I am using Crystal Reports Developer 9.0 and the client has Professional 9.0. I have been doing research on it and I can't figure it out. I am used to using com objects and active reports to display reports like this. I just need a basic explanation of what it takes to get this done. I want the reports to show as HTML, and all the user should have to do is click the button on the asp page and the report should generate and pop up. I understand that crystal can export to html but I only know how to do it by using File->Export.....and it needs to do this automatically.

Thanks everyone,
Jana.

************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
Jul 19 '05 #1
1 4215
swp
Janaina R. de Jesus (ja*****@prontomail.com) wrote in message news:<#L**************@TK2MSFTNGP11.phx.gbl>...
Hi,
I am new to crystal reports and I have to build some reports and call them from an ASP page and display them. I am using Crystal
Reports Developer 9.0 and the client has Professional 9.0. I have
been doing research on it and I can't figure it out. I am used to
using com objects and active reports to display reports like this. I
just need a basic explanation of what it takes to get this done. I
want the reports to show as HTML, and all the user should have to do
is click the button on the asp page and the report should generate and
pop up. I understand that crystal can export to html but I only know
how to do it by using File->Export.....and it needs to do this
automatically.
Thanks everyone,
Jana.

************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...


did you try using one of the many examples that business objects
(formerly crystal enterprise, formerly seagate software) provides on
their web site?

this is a very simple example for you (watch the line wrapping):
==================
front_screen.asp
==================
<%
Make_FrontEnd_Page "doit.asp", "some meaningful header for this
report"

' yes, this was meant to be reusable code and much has been stripped
from it
Sub Make_FrontEnd_Page(action, header)
wr "<HTML>" & vbcrlf
wr "<HEAD>" & vbcrlf
wr "<title>Report Front Screen for Parameters</title>" & vbcrlf
wr "</HEAD>" & vbcrlf
wr "<BODY bgcolor=#ADD8E6>" & vbcrlf
wr "<FORM name=f method=post runat=""server"" action=""" & action &
""" target='__new__'>" & vbcrlf
wr "<center>" & vbcrlf
wr "<h2>" & header & "</h2>" & vbcrlf
wr "<TABLE width=700 align=center border=0 cellpadding=0
cellspacing=0 bgcolor=#008800>" & vbcrlf
wr " <tr>" & vbcrlf
wr " <td align=center>" & vbcrlf
wr " <INPUT type=submit value="" Run Report "" id=submit
name=Button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" & vbcrlf
wr " <INPUT type=reset value="" Reset "" id=cancel
name=Button2>" & vbcrlf
wr " </td>" & vbcrlf
wr " </tr>" & vbcrlf
wr "</table>" & vbcrlf
wr "</FORM>" & vbcrlf
wr "</BODY>" & vbcrlf
wr "</center>" & vbcrlf
wr "</HTML>" & vbcrlf
end sub
%>

==================
doit.asp
==================
<%
DIM crDescendingOrder, crAscendingOrder
DIM xdsn, xdb, ruser, rpass
crDescendingOrder = 1
crAscendingOrder = 0
xdsn = "SYSTEM_DSN_NAME_GOES_HERE"
xdb = "database name used by system dsn goes here"
ruser = "username" ' ignored if using windows authentication only
rpass = "password" ' ignored if using windows authentication only

DIM reportname
reportname = "whatever.rpt"
' this assumes the rpt file lives in the
' same directory as the other asp pages
%>
<!-- #include file="AlwaysRequiredSteps.asp" -->
<%
set crtable = session("oRpt").Database.Tables.Item(1)
crtable.SetLogonInfo cstr(xdsn), cstr(xdb), cstr(ruser), cstr(rpass)
%>
<!-- #include file="MoreRequiredSteps.asp" -->
<!-- #include file="SmartViewerActiveX.asp" -->
<%
' the above 3 include files are available
' for free from crystal decisions
' just search on the file names on their
' support page to get them
%>

This is from a working system I have in production, minus some user
interface stuff. That system is using CR8.5, but it should work the
same with CR9.0 for you.

hth,
swp
Jul 19 '05 #2

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

Similar topics

1
by: Stephan | last post by:
Hi, I'm using Visual Studio 2003 (C#) with the integrated Crystal Report software and have the following question: How can I assign a value (string) to an unbound (string) field in Crystal...
13
by: kristoff plasun | last post by:
I have a problem with a C++ DCOM application that prints Crystal Reports with data from Oracle. The SQL query is relatively complex but when the report is printed from the Crystal Reports...
0
by: Dr. Indera | last post by:
hello, i previously posted the questions below on several crystal reports newsgroups, including the one for the company that makes crystal reports, but never got an answer, so i'm hoping that...
2
by: Mythran | last post by:
In .Net, how can I go about and set a Crystal Reports namespace? Right now they use the Root Namespace (VB) from the project. How can I extend the namespace for a single report (which will be set...
1
by: Karthic | last post by:
When i right click on the .rpt file in the VS 2003, i see a property printer setting. It says "No printer" on the top and there is option to select printer and paper settings etc.. I want to...
1
by: bthomas71chevy | last post by:
I have just setup a WebServer and all the applications work fine, but when every any of the applications try to generate a Crystal Report the page errors out. "File or assembly name...
0
by: Chris | last post by:
I have the following situation in a VB.Net App I am working on: 1.)A report created in VS.Net 2003 using the CR.Net component of VS 2003. 2.)The datasource for the report is a Stored Proc in a...
1
by: frisam | last post by:
Hi am from kenya and learning programming. lately, i have thought of switching from vb 6 report genarations to crystal report. my main problem, after creating report in crystal report and testing...
0
by: sunnydays | last post by:
Hi All I would appreciate some help with regards to the following requirement- Using c# .Net, I need to invoke reports that are already developed and deployed on a crystal report server. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.