Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

selection formula and parameter to create Crystal Report

Posted on 2008-10-24
2
Medium Priority
?
2,380 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

705 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