Solved

selection formula and parameter to create Crystal Report

Posted on 2008-10-24
2
2,352 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 50 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

Stack Overflow Podcast - Frustrating Miracles

In this podcast, Stack Overflow interviewed Linux Academy CEO/Founder, Anthony James, and got his developer story!

"Follow your passion, be prepared to work hard and sacrifice, and, above all, don't let anyone limit your dreams."  - Donovan Bailey

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

622 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