Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

selection formula and parameter to create Crystal Report

Posted on 2008-10-24
2
Medium Priority
?
2,418 Views
Last Modified: 2013-11-07
Hello,
I have the following situation.
I am developing a web application to create Crystal Reports using CrystalReportViewer control.
Platform: ASP.NET (2.0), Code Behind: VB.NET, Database: Oracle 10G
In the form, I enter the search criteria and create a selection formula as well as parameter for the Crystal report. I know how to pass this selection formula and parameter in VB 6.0 but not in asp.net. Therefore, I am not looking for the answer in vb 6.0.
My question is after I creat the selection formula from the form's data entry, how can I call/pass this selection formula to create the crystal report using the crystal report viewer control.
Does anyone have a complete sample code which shows step by step of creating crystal reports using asp.net (vb.net) ?

For example, my selection formula is: strSelectionFormula (whatever is there)
my parameter is: strParam (whatever is there)
Next, I did the following lines
        Dim Report1 As ReportDocument
        Report1 = New ReportDocument()
        Report1.Load(Server.MapPath("CrystalReport\Sample.rpt"))

Then I do not know what to do. My crystal report viewer control is in the same page of web form. I am not calling a different page using response.redirect (reportpage.aspx). I hope my question is clear.

Thanks a ton in advance,
mamun

0
Comment
Question by:mamunahmed
2 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 22798277
Here is a tutorial for VS2005.  I believe the same ideas will work with VS2008.  I think the parameter passing starts on page 141.  Check the table of contents.

http://www.businessobjects.com/global/pdf/dev_zone/VS2005_Walkthroughs.pdf

mlmcc
0
 
LVL 4

Accepted Solution

by:
anipeddi earned 150 total points
ID: 22798375
Try This Code

Partial Class MyReport
    Inherits System.Web.UI.Page
 
    Private customerReport As ReportDocument
 
    Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
 
        ConfigureCrystalReports()
 
    End Sub
 
    Private Sub ConfigureCrystalReports()
 
        Dim Report1 as  ReportDocument()
        Report1=New ReportDocument()
        customerReport.Load(Server.MapPath("CrystalReport\Sample.rpt"))
                    CrystalReportViewer1.SelectionFormula = strSelectionFormula
         CrystalReportViewer1.ReportSource = customerReport
 
    End Sub
 
End Class

// Try this link for step by step instructions to create Crystal Reports with ASP.NET and VB.NET
http://www.aspfree.com/c/a/ASP.NET/Working-with-Parameters-with-Crystal-Reports-and-ASP-NET-2-0/

 
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Screencast - Getting to Know the Pipeline

886 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