473,546 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

rpt.recordselec tionformula and subrpt.recordse lectionformula

VB .NET 2002
Crystal Reports 9

Hello:
OK, I'm getting closer with this. Can someone please help with this last piece?

Main report oracle 7 db
Subreport totally unrelated historical Access .mdb

I need to take the user's input in a text box and pass the result (wildcard) to the record selection formula prior to refreshing the crystal report.

When I set the report source to the main report, I get all the results from the main report, but the subreport isn't being read correctly.

When I set the report source to the subreport, I get results in the subreport, I only get results in the subreport.

Makes sense, right?

But I NEED results in both whenever they exist.

How do I have the report source look at both reports? Or whatever I need to do to get results from both?

I'd really appreciate your feedback!
In Public Class:

Dim rpt As New CBOPARTSDESCFOR MULA2()
Dim subrpt As New ReportDocument( )
Here's the code in my display click button:

Dim mySubReport As CrystalDecision s.CrystalReport s.Engine.Report Document
Dim mySubReportObje ct As CrystalDecision s.CrystalReport s.Engine.Subrep ortObject
Dim MyReportObject As CrystalDecision s.CrystalReport s.Engine.Report Object

CrystalReportVi ewer1.ReportSou rce = rpt

Dim RecordSelection Formula As String
Dim reportName As String

CrystalReportVi ewer1.Selection Formula = RecordSelection Formula

CrystalReportVi ewer1.RefreshRe port()

If I change the report source = subrpt or reportdocument, I get results in the subreport.

What's the missing piece, please?

Thanks so much!

Helen
Nov 20 '05 #1
2 8195
Now, we're getting somewhere, I'm getting results in the subreport with this code, but for some reason it's bypassing the selection formula for the main report. Does anyone know what's wrong here, please?
==========
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As System.EventArg s) Handles btnDisplay.Clic k

Dim SelectFormula As String()
Dim reportName As String

subrpt = CBOPARTSDESCFOR MULAReport.Open Subreport("item desc")

CBOPARTSDESCFOR MULAReport.Reco rdSelectionForm ula = SelectFormula(" LowerCase({LINE _ITEM.CLIN_DESC }) LIKE '" & txtDesc().Text. ToLower & "' or LowerCase({LINE _ITEM.CLIN_EXT_ DESC}) LIKE '" & txtDesc().Text. ToLower & "' or LowerCase({PROC _OBJECT_1.DOC_T ITLE}) LIKE '" & txtDesc().Text. ToLower & "'")

CrystalReportVi ewer1.RefreshRe port()
End Sub

Tks,
-H

"Helen" wrote:
VB .NET 2002
Crystal Reports 9

Hello:
OK, I'm getting closer with this. Can someone please help with this last piece?

Main report oracle 7 db
Subreport totally unrelated historical Access .mdb

I need to take the user's input in a text box and pass the result (wildcard) to the record selection formula prior to refreshing the crystal report.

When I set the report source to the main report, I get all the results from the main report, but the subreport isn't being read correctly.

When I set the report source to the subreport, I get results in the subreport, I only get results in the subreport.

Makes sense, right?

But I NEED results in both whenever they exist.

How do I have the report source look at both reports? Or whatever I need to do to get results from both?

I'd really appreciate your feedback!
In Public Class:

Dim rpt As New CBOPARTSDESCFOR MULA2()
Dim subrpt As New ReportDocument( )
Here's the code in my display click button:

Dim mySubReport As CrystalDecision s.CrystalReport s.Engine.Report Document
Dim mySubReportObje ct As CrystalDecision s.CrystalReport s.Engine.Subrep ortObject
Dim MyReportObject As CrystalDecision s.CrystalReport s.Engine.Report Object

CrystalReportVi ewer1.ReportSou rce = rpt

Dim RecordSelection Formula As String
Dim reportName As String

CrystalReportVi ewer1.Selection Formula = RecordSelection Formula

CrystalReportVi ewer1.RefreshRe port()

If I change the report source = subrpt or reportdocument, I get results in the subreport.

What's the missing piece, please?

Thanks so much!

Helen

Nov 20 '05 #2
Well, here's the answer. Just need to add the following prior to refreshreport:

CrystalReportVi ewer1.ReportSou rce = CBOPARTSDESCFOR MULAReport

Had it misplaced in the pub class.

So, this one's done.
"Helen" wrote:
Now, we're getting somewhere, I'm getting results in the subreport with this code, but for some reason it's bypassing the selection formula for the main report. Does anyone know what's wrong here, please?
==========
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As System.EventArg s) Handles btnDisplay.Clic k

Dim SelectFormula As String()
Dim reportName As String

subrpt = CBOPARTSDESCFOR MULAReport.Open Subreport("item desc")

CBOPARTSDESCFOR MULAReport.Reco rdSelectionForm ula = SelectFormula(" LowerCase({LINE _ITEM.CLIN_DESC }) LIKE '" & txtDesc().Text. ToLower & "' or LowerCase({LINE _ITEM.CLIN_EXT_ DESC}) LIKE '" & txtDesc().Text. ToLower & "' or LowerCase({PROC _OBJECT_1.DOC_T ITLE}) LIKE '" & txtDesc().Text. ToLower & "'")

CrystalReportVi ewer1.RefreshRe port()
End Sub

Tks,
-H

"Helen" wrote:
VB .NET 2002
Crystal Reports 9

Hello:
OK, I'm getting closer with this. Can someone please help with this last piece?

Main report oracle 7 db
Subreport totally unrelated historical Access .mdb

I need to take the user's input in a text box and pass the result (wildcard) to the record selection formula prior to refreshing the crystal report.

When I set the report source to the main report, I get all the results from the main report, but the subreport isn't being read correctly.

When I set the report source to the subreport, I get results in the subreport, I only get results in the subreport.

Makes sense, right?

But I NEED results in both whenever they exist.

How do I have the report source look at both reports? Or whatever I need to do to get results from both?

I'd really appreciate your feedback!
In Public Class:

Dim rpt As New CBOPARTSDESCFOR MULA2()
Dim subrpt As New ReportDocument( )
Here's the code in my display click button:

Dim mySubReport As CrystalDecision s.CrystalReport s.Engine.Report Document
Dim mySubReportObje ct As CrystalDecision s.CrystalReport s.Engine.Subrep ortObject
Dim MyReportObject As CrystalDecision s.CrystalReport s.Engine.Report Object

CrystalReportVi ewer1.ReportSou rce = rpt

Dim RecordSelection Formula As String
Dim reportName As String

CrystalReportVi ewer1.Selection Formula = RecordSelection Formula

CrystalReportVi ewer1.RefreshRe port()

If I change the report source = subrpt or reportdocument, I get results in the subreport.

What's the missing piece, please?

Thanks so much!

Helen

Nov 20 '05 #3

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

Similar topics

2
2347
by: Darrin | last post by:
Hello, I am looking for a web reporting solution. I have researched some things on crystal reports but read that the version that is bundled with Visual Studio 2003 does not allow you to print them. I was able to create a sample looking report in ASP.NET using VS2003 but not able to print it. Is there some specific code a person could use...
2
2025
by: Barry Edmund Wright | last post by:
Hi, I have two reports that I want to attach to the same email: rptBugReport rptBugLog I can sent the one using: DoCmd.SendObject acOutputReport, "rptBugReport", acFormatSNP How can I add the second? I've tried:
2
3388
by: carmen | last post by:
i have the folowing code Dim y As New frmCobranz Dim MyReport As New RPTCobranz MyReport.DataDefinition.RecordSelectionFormula = "{CobH.RelNbr}= y.txtNoRelac.Text CrystalReportViewer1.ReportSource = MyRepor when run the report the following error rais error in formula <record selection
0
1076
by: hodgesp | last post by:
I have a c# web application. I have created a crystal report and report view er. I can get the report to display by itself but when I add a subreport I eithe r get a logon error or object not set to an instance of an object. I found sites that show the functions to login to a subreport but it doesn't seem to work.
0
1113
by: Rachana | last post by:
RecordSelectionFormula doesn't return correct records. every time Hi! I am working in VB6-CR8.5 Either I use RecordSelectionFormula or SqlQueryString, getting the same problem: My RecSeleStr is this STR2 = " {vexp_veh.veh_no} = ' " & mVeh & " ' "
16
11623
by: freedom | last post by:
How to use the record selection formula in CR9 programatically using vb.net? I have a combo box that displays the date. If I select date, I can generate a report based on the selected date. Thanks in advance
1
4312
by: justin00 | last post by:
I'm having some trouble whenever I'm trying to apply date queries to my report recordselectionformula. I'm using c# with an Access db. The report is a subquery with links already established between it and the parent report. "nextCycle" is a c# datetime object. My code for the formula is as follows: ...
15
4426
by: WhiteShore | last post by:
I'm kinda stuck of making this Report1.RecordSelectionFormula = "{Sales.Date} In (" & Format(cboMonth.Text, "MMMM") & ")" it wont work to display monthly report based on combobox (january, february, etc) im using vb6 and ms access and CR as for report do i miss anything?
3
1160
by: charvi | last post by:
i am using crystal reports 9 i want a report to know the time spent on each day for a client here i use cross tab report now if i want to see for a particular month how to query it pls help
0
7507
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7435
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7698
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7947
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7461
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5080
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3492
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1922
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1046
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.