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 CBOPARTSDESCFORMULA2()
Dim subrpt As New ReportDocument()
Here's the code in my display click button:
Dim mySubReport As CrystalDecisions.CrystalReports.Engine.ReportDocum ent
Dim mySubReportObject As CrystalDecisions.CrystalReports.Engine.SubreportOb ject
Dim MyReportObject As CrystalDecisions.CrystalReports.Engine.ReportObjec t
CrystalReportViewer1.ReportSource = rpt
Dim RecordSelectionFormula As String
Dim reportName As String
CrystalReportViewer1.SelectionFormula = RecordSelectionFormula
CrystalReportViewer1.RefreshReport()
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 2 8183
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(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisplay.Click
Dim SelectFormula As String()
Dim reportName As String
subrpt = CBOPARTSDESCFORMULAReport.OpenSubreport("itemdesc" )
CBOPARTSDESCFORMULAReport.RecordSelectionFormula = 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_TITLE}) LIKE '" & txtDesc().Text.ToLower & "'")
CrystalReportViewer1.RefreshReport()
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 CBOPARTSDESCFORMULA2() Dim subrpt As New ReportDocument()
Here's the code in my display click button:
Dim mySubReport As CrystalDecisions.CrystalReports.Engine.ReportDocum ent Dim mySubReportObject As CrystalDecisions.CrystalReports.Engine.SubreportOb ject Dim MyReportObject As CrystalDecisions.CrystalReports.Engine.ReportObjec t
CrystalReportViewer1.ReportSource = rpt
Dim RecordSelectionFormula As String Dim reportName As String
CrystalReportViewer1.SelectionFormula = RecordSelectionFormula
CrystalReportViewer1.RefreshReport()
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
Well, here's the answer. Just need to add the following prior to refreshreport:
CrystalReportViewer1.ReportSource = CBOPARTSDESCFORMULAReport
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(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisplay.Click
Dim SelectFormula As String() Dim reportName As String
subrpt = CBOPARTSDESCFORMULAReport.OpenSubreport("itemdesc" )
CBOPARTSDESCFORMULAReport.RecordSelectionFormula = 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_TITLE}) LIKE '" & txtDesc().Text.ToLower & "'")
CrystalReportViewer1.RefreshReport() 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 CBOPARTSDESCFORMULA2() Dim subrpt As New ReportDocument()
Here's the code in my display click button:
Dim mySubReport As CrystalDecisions.CrystalReports.Engine.ReportDocum ent Dim mySubReportObject As CrystalDecisions.CrystalReports.Engine.SubreportOb ject Dim MyReportObject As CrystalDecisions.CrystalReports.Engine.ReportObjec t
CrystalReportViewer1.ReportSource = rpt
Dim RecordSelectionFormula As String Dim reportName As String
CrystalReportViewer1.SelectionFormula = RecordSelectionFormula
CrystalReportViewer1.RefreshReport()
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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,...
|
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
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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,...
|
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...
|
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |