473,385 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Creating a selection formula based on a DateTime feild from crystal report

Hi,
I want to create a a crystal report based on the DAteTime Range.Can any one
tell me how do i pass the Values from the VB.NET.I am uasing
Crystalreportviewer control
My field is isin the format 2/12/2000 2:04:00 PM
Please help me out
Reny
Nov 20 '05 #1
1 10866
Hi Reny,

Here's an example of setting the date and other info in a string and passing
it to the viewer control:
Dim mglobals As New globals

mglobals.gl_selectionstring = "{bnlsum.inv_dt} >= #" & datevars & "#" & "
and {bnlsum.inv_dt} <= #" & datevare & "#"

Datevars is the start date of a date range; datevare is the end of the date
range (eg, 5/18/03 - 2/11/04).

Also, note that I am using the column names as you would inside crystal (eg,
{bnlsum.inv_dt}), so the viewer properly recognizes the string.

Also, when the report is called, add this:

CrystalReportViewer1.SelectionFormula = mglobals.gl_selectionstring

In this example, globals is simply a module which contains numerous global
variables that I use from time to time.

HTH,

Bernie Yaeger

"Reny J Joseph Thuthikattu" <re**@bxtech.com> wrote in message
news:O$**************@TK2MSFTNGP12.phx.gbl...
Hi,
I want to create a a crystal report based on the DAteTime Range.Can any one tell me how do i pass the Values from the VB.NET.I am uasing
Crystalreportviewer control
My field is isin the format 2/12/2000 2:04:00 PM
Please help me out
Reny

Nov 20 '05 #2

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

Similar topics

1
by: RedZebra | last post by:
Hi I am calling and viewing Crystal Reports in internet explorer(using ASP pages) by passing them the selection formula for the main report. Its working fine. The problem is when the report has...
1
by: B. Broadwell | last post by:
I have a report created in Crystal Reports 8 that I'm attempting to use in a ..NET application. I have the following formula that works in the Crystal 8 designer and when the report is run using...
2
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...
7
by: Helen | last post by:
vb .net 200 crystal reports Oracl Acces Hi, I have all selection formula results needed from the main crystal report, called in the vb form (Oracle db) I now need to build in the logic in...
0
by: Jasper Jones | last post by:
I have a Crystal report that shows me a list of sales and which customer bought them, I would like to get a distinct list of customers, is this possible with crystal's formulas? This is my...
0
by: zafar | last post by:
I need to Use selection formula for crystal report (user may give 1,2,3 ... or more criteria for report) what is the syntax for that. secondly how to use "views" in crystal report . Thanx if any...
0
by: nikhilshah01 | last post by:
Group ID 1 name, tool, history_action.timestamp name, tool, history_action.timestamp Group ID 2 name, tool, history_action.timestamp name, tool, history_action.timestamp I need to publish a...
0
by: mehtaprashant19 | last post by:
i have a problem with Crystal Report, i am giving a SelectionFormula to the Crystal Report Viewer, but it is giving me all the records If Session("Rep") Is Nothing Then Dim...
1
by: annemariearmour | last post by:
I am using Crystal reports version 11.2 to create reports. The data source is SQL Server, and I am using views rather than reporting directly from tables. I apply selection criteria to the incoming...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
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...
0
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...

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.