473,668 Members | 2,759 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Filtering data in CR

TS
Hi all,
In my windows form, I need the user to select a client name from a combo box
and click on a button that opens another form having CRViewer showing the
data for that client selected.
I connected to the SQL database where the cbo box gets the clients names
from and I can see the names in cbo box. I created my CR and put the CRViewer
on another windows form. What's next? I need help with the code.
Thanks in advance
--
TS
Nov 21 '05 #1
3 1165
Hi TS,

There are several ways to do this. Perhaps the most straightforward would
be to pass a parameter to the report and set the report's record selection
criteria to include only the client names who match the parameter.

HTH,

Bernie Yaeger

"TS" <TS@discussions .microsoft.com> wrote in message
news:68******** *************** ***********@mic rosoft.com...
Hi all,
In my windows form, I need the user to select a client name from a combo
box
and click on a button that opens another form having CRViewer showing the
data for that client selected.
I connected to the SQL database where the cbo box gets the clients names
from and I can see the names in cbo box. I created my CR and put the
CRViewer
on another windows form. What's next? I need help with the code.
Thanks in advance
--
TS

Nov 21 '05 #2
TS
Thanks for your response. Can you tell me how the code for this looks like.
Or do you know of any white papers that can help with that.

"Bernie Yaeger" wrote:
Hi TS,

There are several ways to do this. Perhaps the most straightforward would
be to pass a parameter to the report and set the report's record selection
criteria to include only the client names who match the parameter.

HTH,

Bernie Yaeger

"TS" <TS@discussions .microsoft.com> wrote in message
news:68******** *************** ***********@mic rosoft.com...
Hi all,
In my windows form, I need the user to select a client name from a combo
box
and click on a button that opens another form having CRViewer showing the
data for that client selected.
I connected to the SQL database where the cbo box gets the clients names
from and I can see the names in cbo box. I created my CR and put the
CRViewer
on another windows form. What's next? I need help with the code.
Thanks in advance
--
TS


Nov 21 '05 #3
Hi TS,

Here's an example of passing a global variable to the report in order to
filter that report. 'globals' is a module that has global scope and has a
string variable in it called 'gl_selectionst ring:

Dim mglobals As New globals
mglobals.gl_sel ectionstring = "{bnlsum.invnum } >= '" & startnumbox.Tex t &
Chr(39) & " and {bnlsum.invnum} <= '" & endnumbox.Text & Chr(39)

gl_browseprintv ar = "f:\imcapps\bnl inv.rpt"

Dim newmdichild As New reportprinter_v iewerparam

newmdichild.Tex t = "BNL Summary Invoice"

newmdichild.Sho w()

reportprinter_v iewerparam is a form that displays the report. In that form,
here's the code for that report:

CrystalReportVi ewer1.Selection Formula = mglobals.gl_sel ectionstring

CrystalReportVi ewer1.ReportSou rce = "f:\imcapps\bnl inv.rpt

HTH,

Bernie Yaeger

"TS" <TS@discussions .microsoft.com> wrote in message
news:5D******** *************** ***********@mic rosoft.com...
Thanks for your response. Can you tell me how the code for this looks
like.
Or do you know of any white papers that can help with that.

"Bernie Yaeger" wrote:
Hi TS,

There are several ways to do this. Perhaps the most straightforward
would
be to pass a parameter to the report and set the report's record
selection
criteria to include only the client names who match the parameter.

HTH,

Bernie Yaeger

"TS" <TS@discussions .microsoft.com> wrote in message
news:68******** *************** ***********@mic rosoft.com...
> Hi all,
> In my windows form, I need the user to select a client name from a
> combo
> box
> and click on a button that opens another form having CRViewer showing
> the
> data for that client selected.
> I connected to the SQL database where the cbo box gets the clients
> names
> from and I can see the names in cbo box. I created my CR and put the
> CRViewer
> on another windows form. What's next? I need help with the code.
> Thanks in advance
> --
> TS


Nov 21 '05 #4

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

Similar topics

1
2032
by: N.K. | last post by:
Hello, I'm trying to find a way to flexibly filter a column in a row of data read from a file. I will have data type of that column, the operation to be performed on it (like >, <, <= etc.) and the value to compare it to stored in a database. If I'm to write it in a procedural language it would be a big case statement like this: case int case <= return (value <= compare value) Can you think of a better way of doing it? I was thinking...
3
3151
by: Alex Ayzin | last post by:
Hi, I have a problem that might be easy to solve(possibly, I've just overlooked an easy solution). Here we go: I have a dataset with 2 datatables in it. Now, I need to do the following: if ds.table(0).rows(0).item("col1") = ds.table(1).rows(0).item("col2") then txtResult.text = ds.table(1).rows(0).item("col3")
3
11098
by: Jason | last post by:
I am trying to filter records in a primary form based on records in related tables. The data in the related tables is being displayed in the primary form through subforms. To be more specific, I have a primary form named TestResults, which is connected to data in a table named TestResults. There are basically two other tables that are related to the TestResults table (and the primary form) named Names-Normalized and SiteAddresses. The...
10
13341
by: milk-jam | last post by:
I'm trying to set my datagridview so that the first row will be left blank and to use it as a filtering filed for the datagridview. Until now I was using 2 datagridview the upper one with a header that sort and one row for filtering and the lower one with no header for the data. Only it is very complicated to work this way cause for example when the user click on sort on the upper datagridview I need to sort the lower grid and so on when...
7
14802
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I want to look at that data and filter it based on what is in it. I know that this could have been done with data sets and data views in asp.net 1.1 but how is this done now in asp.net 2.0?
2
3701
by: Jason Huang | last post by:
Hi, I use the ReadXML method in my C# Windows Form project. Here is some of my C# code: xmlDS.ReadXml(curDir + "\\Dept.xml") ; There're 20 rows and 5 columns in the Dept.xml. But now I just want some of the data in the Dept.xml, e.g., DeptLevel >1 AND Status=0. How do I filter the XML or xmlDS so that the output is what I need?
2
3087
by: JUAN ERNESTO FLORES BELTRAN | last post by:
Hi you all, I am developping a python application which connects to a database (postresql) and displays the query results on a treeview. In adittion to displaying the info i do need to implement filtering facility for all the columns of the treestore/liststore model in order to allow the user an easy search method to find the desired information. The treestore is created with information related to cars, the columns are:
3
1860
by: Shawn Ramirez | last post by:
As with most web applications speed is a huge deal to me in my applications. My customers don't really care if my app is a true 3 tier application or not, they just want it to be faster then it was yesterday. Because of this I try to limit my calls to the database by using a loading lookup data for a customer and then filtering down to what I need. (I have alot of recursive logic because of alot of tree controls). Here is my question. ...
3
6623
by: Harry Haller | last post by:
Hello, I want to implement a generic list which will be used to display 7 columns in a GridView. One should be able to sort, filter and page each of the 7 columns. Ideally the filter should be implemented simultaneously for multiple columns - but the data need only be sorted by a single column at a time. Sorting should be both ascending and descending. I'm currently using a DataView but it's far too slow, because there are a large...
0
1999
by: Lyn | last post by:
I have a problem using the form .Filter and .FilterOn properties which causes Access to crash (as detailed in a separate post). The form operates in continuous mode, displaying matching records from a file based on a search criterion. This basic functionality works just fine. I decided to allow the user to narrow down the output by providing some extra controls to allow the user to filter the recordset via the .Filter form property. ...
0
8381
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8797
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7401
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6209
isladogs
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5681
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4205
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2791
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
2
2023
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1786
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.