Solved

Problem in Crystal Report

Posted on 2004-04-23
4
221 Views
Last Modified: 2010-04-07
I've using ASP.NET with Crystal Report 8.5 which is included in the ASP.NET.
the report is working ok with the connection of SQL Server 2000. here we write the query in the Crystal Report (.RPT) for executing when we establishing the connection.

can i send a command query from the ASP.NET Page ????
and one more thing how we pass the parameters in the Crystal Report  and how to use for the same.
Please tell me step by step
0
Comment
Question by:amitverma12679
4 Comments
 
LVL 1

Accepted Solution

by:
warmach earned 100 total points
ID: 10902066
I would recommend putting your query inside a stored procedure.  It will be faster and easier to work with.  In Crystal, when ever you build your report, instead of connection to a table, use the stored procedure.  Crystal will then automatically ask the user for the parameters.

Hope it works out.
0
 

Expert Comment

by:kaleem01_pk
ID: 10905954
Hi,
I have not used Crystal Reports with ASP. But can give you an idea. U should use Crystal reports Viewer control. It as an active X control. Just embed it on the page and use RDC model  for this. i do this in VB like this
dim myApp as new craxdrt.Application
dim myRpt as new craxdrt.Report

myApp.logonserver(....)
Set myRpt=myApp.Openreport(App.path & "\r.rpt")
myRpt.ParameterFields(1).Addcurrentvale 123    ' for number
myRpt.ParameterFields(2).Addcurrentvale "123" ' for string
myRpt.ParameterFields(3).Addcurrentvale cdate(format(dtpFrom,"yyyy/MM/dd")) ' for date

myRpt.sqlquery = "select * from mytable"
' u can use recordeselection formula as well like
myRpt.recordselectionformula = "{mytable.dated}=?date"

crViewer1.reportsource= myrpt
crviewer1.showreport


you can convert it into ASP syntax
i think you have to use
myApp = server.CreateObjcet(craxdrt.Application)
myrprt=server.CreateObjcet(craxdrt.Report)

..........


regards
kaleem
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

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

932 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

8 Experts available now in Live!

Get 1:1 Help Now