Showing posts with label parameters. Show all posts
Showing posts with label parameters. Show all posts

Wednesday, March 28, 2012

help getting parameters back from a stored procedure

Hello everyone,

I've been trying to use a stored procedure to return the names of some temporary tables that i put in the tempdb table in SQL Server.

--I've been getting the following error in visual basic 6 when i try to call this:
run-time error '-2147217900 (80040e14)': syntax access violation

--This is the error you get when you try to just run the code in query analyzer:
[Microsoft][ODBC SQL Server Driver]Syntax error or access violation

--what code i was trying to use (in query analyzer):
{call EXEC CreateTempTables (@.RQSodfil = 'a', @.BulkRan = 'a', @.BulkFor = 'a', @.BulkJit = 'a', @.ID = '0', @.RQSodfilFlag = '1', @.BulkRanFlag = '0', @.BulkForFlag = '0', @.BulkJitFlag = '0', @.DeleteFlag = '0', @.ErrorNum = '0')}

--code that i was trying to use in vb 6:
Public Sub TemporaryTables( _
ByVal bytRQSodfilFlag As Byte, _
ByVal bytBulkRanFlag As Byte, _
ByVal bytBulkForFlag As Byte, _
ByVal bytBulkJitFlag As Byte, _
ByVal bytDeleteFlag As Byte, _
ByVal cnPlant As String)

Dim objConn As ADODB.Connection
Dim objCmd As ADODB.Command
Dim objRQSodfil As Parameter
Dim objBulkRan As Parameter
Dim objBulkFor As Parameter
Dim objBulkJit As Parameter
Dim objParamID As Parameter
Dim objRQSodfilFlag As Parameter
Dim objBulkRanFlag As Parameter
Dim objBulkForFlag As Parameter
Dim objBulkJitFlag As Parameter
Dim objDeleteFlag As Parameter
Dim objErrorNum As Parameter
Dim intErrorNum As Integer

' setup command variable
Set objCmd = New ADODB.Command
Set objConn = New ADODB.Connection
objConn.Open cnPlant
objCmd.CommandText = "EXEC CreateTempTables"
objCmd.CommandType = adCmdStoredProc
objCmd.ActiveConnection = objConn

' setup parameters
Set objRQSodfil = objCmd.CreateParameter("@.RQSodfil", adVarChar, adParamInputOutput, 20, "a")
objCmd.Parameters.Append objRQSodfil
Set objBulkRan = objCmd.CreateParameter("@.BulkRan", adVarChar, adParamInputOutput, 20, "a")
objCmd.Parameters.Append objBulkRan
Set objBulkFor = objCmd.CreateParameter("@.BulkFor", adVarChar, adParamInputOutput, 20, "a")
objCmd.Parameters.Append objBulkFor
Set objBulkJit = objCmd.CreateParameter("@.BulkJit", adVarChar, adParamInputOutput, 20, "a")
objCmd.Parameters.Append objBulkJit
Set objParamID = objCmd.CreateParameter("@.ID", adChar, adParamInputOutput, 2, 0)
objCmd.Parameters.Append objParamID
Set objRQSodfilFlag = objCmd.CreateParameter("@.RQSodfilFlag", adTinyInt, adParamInput, , bytRQSodfilFlag)
objCmd.Parameters.Append objRQSodfilFlag
Set objBulkRanFlag = objCmd.CreateParameter("@.BulkRanFlag", adTinyInt, adParamInput, , bytBulkRanFlag)
objCmd.Parameters.Append objBulkRanFlag
Set objBulkForFlag = objCmd.CreateParameter("@.BulkForFlag", adTinyInt, adParamInput, , bytBulkForFlag)
objCmd.Parameters.Append objBulkForFlag
Set objBulkJitFlag = objCmd.CreateParameter("@.BulkJitFlag", adTinyInt, adParamInput, , bytBulkJitFlag)
objCmd.Parameters.Append objBulkJitFlag
Set objDeleteFlag = objCmd.CreateParameter("@.DeleteFlag", adTinyInt, adParamInput, , bytDeleteFlag)
objCmd.Parameters.Append objDeleteFlag
Set objErrorNum = objCmd.CreateParameter("@.ErrorNum", adInteger, adParamInputOutput, , 0)
objCmd.Parameters.Append objErrorNum

' execute command
Set rsTableInfo = objCmd.Execute(, , adExecuteRecord)

' find returned parameters
gstrRQSodfilName = rsTableInfo.Fields("@.RQSodfil")
gstrBulkRanName = rsTableInfo.Fields("@.BulkRan")
gstrBulkForName = rsTableInfo.Fields("@.BulkFor")
gstrBulkJitName = rsTableInfo.Fields("@.BulkJit")
gstrID = rsTableInfo.Fields("@.ID")
intErrorNum = rsTableInfo.Fields("@.ErrorNum")

End Sub

any help would be appreciatedactually i just solved my own problem:

at the end of the stored procedure i selected the columns i wanted to return and that did it.

select @.RQSodfil,@.BulkRan,@.BulkFor,@.BulkJit,@.ID,@.ErrorNum

i also just did a regular sql statement where i called the EXEC command to run my stored procedure.

EXEC CreateTempTables @.RQSodfil = 'a', @.BulkRan = 'a', @.BulkFor = 'a', @.BulkJit = 'a', @.ID = '0', @.RQSodfilFlag = '1', @.BulkRanFlag = '0', @.BulkForFlag = '0', @.BulkJitFlag = '0', @.DeleteFlag = '0', @.ErrorNum = '0'

hopefully if someone else has the same problem i've had they can see what i did.

Help for report(rsInvalidItemPath)

Hi
I have beening trying to build a report with 2 parameters. When I run it
under VS.net, it all went well, but after I deploy it to the server, I got
the message as following: **Reporting Services Error--The path of the item ''
is not valid. The full path must be less than 260 characters long, must start
with slash; other restrictions apply. Check the documentation for complete
set of restrictions. (rsInvalidItemPath) Get Online Help **
what went wrong, please help.
the URL as following:
http://localhost/reportserver?%2fRev_Stats%2fRev_Stats&rs:Command=Render
TIAThe url looks correct. Did you get this url by navigating to the
reportserver virtual directory? Is there anything more in the
reportserver_<timestamp>.log file?
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"wd1153" <wd1153@.discussions.microsoft.com> wrote in message
news:2B5DBCB5-B943-4675-997B-145DF0ECDF17@.microsoft.com...
> Hi
> I have beening trying to build a report with 2 parameters. When I run it
> under VS.net, it all went well, but after I deploy it to the server, I got
> the message as following: **Reporting Services Error--The path of the item
> ''
> is not valid. The full path must be less than 260 characters long, must
> start
> with slash; other restrictions apply. Check the documentation for complete
> set of restrictions. (rsInvalidItemPath) Get Online Help **
> what went wrong, please help.
> the URL as following:
> http://localhost/reportserver?%2fRev_Stats%2fRev_Stats&rs:Command=Render
> TIA
>sql

Friday, March 23, 2012

help docs for osql.exe parameters

Where can I find help files (.CHM) or other docs on the use of the various
osql.exe command line parameters ?BOL ?
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"John Grandy" <johnagrandy-at-yahoo-dot-com> schrieb im Newsbeitrag
news:udO%236FGbFHA.3932@.TK2MSFTNGP12.phx.gbl...
> Where can I find help files (.CHM) or other docs on the use of the various
> osql.exe command line parameters ?
>|||http://msdn.microsoft.com/library/d...br />
1wxl.asp
"John Grandy" wrote:

> Where can I find help files (.CHM) or other docs on the use of the various
> osql.exe command line parameters ?
>
>|||osql /?
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote in
message news:u8oRuNGbFHA.3032@.TK2MSFTNGP10.phx.gbl...
> BOL ?
> --
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "John Grandy" <johnagrandy-at-yahoo-dot-com> schrieb im Newsbeitrag
> news:udO%236FGbFHA.3932@.TK2MSFTNGP12.phx.gbl...
>|||Hi Mike, and thanks for the response.
Yes, osql -? gives the list of parameters, but isn't there some way to
interactively get help on each parameter?
"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:%23GhhXlGbFHA.3144@.TK2MSFTNGP14.phx.gbl...
> osql /?
> --
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote
> in message news:u8oRuNGbFHA.3032@.TK2MSFTNGP10.phx.gbl...
>|||In addition to the copy of the Books Online in MSDN that Cris linked to, you
can download a local copy from:
http://www.microsoft.com/downloads/...&displaylang=en
Alan Brewer [MSFT]
Content Architect
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights.|||at the command prompt type:
osql /?
"John Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:udO%236FGbFHA.3932@.TK2MSFTNGP12.phx.gbl...
> Where can I find help files (.CHM) or other docs on the use of the various
> osql.exe command line parameters ?
>|||Not from the SQL Server command prompt utilities like osql. The GUI tools
have their F1 help linked into topics in the Books Online, but not the
command prompt utilities. You get the short list from the utility itself if
you use the /? switch, and you get the more in-depth help from the Books
Online osql reference topic, either online in the MSDN Library or your local
copy.
Alan Brewer [MSFT]
Content Architect
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights.

Wednesday, March 21, 2012

Help again edit parameters from MDB to ADP

I need to convert this from Jet SqL to SQL Server. Moving out of an MDB to an ADP some of the queries I need to change over, I inherited this database and the bosses want all databases moved over from MDB to ADP.

SELECT Format$([Main Table].Date,'mmmm yyyy') AS [Date By Month], [Main Table].[Action Type], Count([Main Table].[Action Type]) AS [CountOfAction Type]
FROM [Main Table]
GROUP BY Format$([Main Table].Date,'mmmm yyyy'), [Main Table].[Action Type]
HAVING (((Format$([Main Table].[Date],'mmmm yyyy'))=[Enter the Month and the Year]));SELECT Format$([Main Table].Date,'mmmm yyyy') AS [Date By Month], [Main Table].[Action Type], Count([Main Table].[Action Type]) AS [CountOfAction Type]
FROM [Main Table]
GROUP BY Format$([Main Table].Date,'mmmm yyyy'), [Main Table].[Action Type]
HAVING (((Format$([Main Table].[Date],'mmmm yyyy'))=[Enter the Month and the Year]));

1. For FORMAT$, look in SQL BOL for Convert. Something like Convert(Varchar(7), [Main Table].[Date]

2. For your parameter ([Enter the Month and Year]), you will likely have to create the query as a stored procedure with an input parameter (or two). Something like:

CREATE PROC spMyProc (@.MonthYear varchar(7) )

AS

SELECT ...
FROM
WHERE
MyDateString = @.MonthYear

You would have to validate that @.MonthYear was valid (like mm/yyyy). I would not necessarily do it this way. I would use one of the following options:

1. Declare the incoming parameter as a datetime and calculate the first and last day of the month. Then use two local variables and a BETWEEN statement. This should render the best performance for large amounts of data.

2. or Declare the incoming parameter as two smallint variables. Then you could use DatePart function twice to get month and year.

Regards,

Hugh Scott

Friday, March 9, 2012

Help - using sp_executesql with dynamic query...dynamic parameters?

[posted and mailed, please reply in news]
Lisa Forde (1forde@.caribsurf.com) writes:
> Hi. I'm attempting to write a Stored Procedure that creates an SELECT
> statement. Belwo is an example of what I am tryign except that my actually
> query have many more parameters most of which can be eliminated.
>...
> EXEC sp_executesql @.sQuery,@.sParams, <WHAT DO I PUT HERE'>
> Can it even work?
You put the parameters. I have an example of a dynamic search routine
at http://www.sommarskog.se/dyn-search.html#sp_executesql which hopefully
can be of help for you.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.aspPerfect!
Thanks.
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns96F7A82091A39Yazorman@.127.0.0.1...
> [posted and mailed, please reply in news]
> Lisa Forde (1forde@.caribsurf.com) writes:
actually
> You put the parameters. I have an example of a dynamic search routine
> at http://www.sommarskog.se/dyn-search.html#sp_executesql which hopefully
> can be of help for you.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp
>

Monday, February 27, 2012

Help - How to validate parameters?

I need to validate a parameters Length to make sure it is 8 characters long
and whether it is of numeric value and if it is not to display a validation
error message. Is this possible. I'm using reporting service and SQL Server
2000.
Any help will greatly appreciated.Have you tried placing custom code to validate these, then placing a dummy
textbox at the top of the report to call the validate code?
Eg. =Code.ValidateParameters()
Get this to show a box or something if it fails.
"Ken" <Ken@.discussions.microsoft.com> wrote in message
news:D2458D65-E2C3-4C80-951E-D44B389929AA@.microsoft.com...
>I need to validate a parameters Length to make sure it is 8 characters long
> and whether it is of numeric value and if it is not to display a
> validation
> error message. Is this possible. I'm using reporting service and SQL
> Server
> 2000.
> Any help will greatly appreciated.|||Hi, Craig,
my code looks like this:
declare @.lastmonth char(7)
@.lastmonth = code.mycode() <-- will return '2006.02'
select comments from theTable
where yearmonth = @.lastmonth
I execute it and get an error "syntax error near @.lastmonth"
the program of mycode() is in layout, report, report properties, code.
Thanks!
Henry
"Ken" wrote:
> I need to validate a parameters Length to make sure it is 8 characters long
> and whether it is of numeric value and if it is not to display a validation
> error message. Is this possible. I'm using reporting service and SQL Server
> 2000.
> Any help will greatly appreciated.|||Well for starters you can't put multiple lines in the dataset. If you were
doing this you can only do:
="select comments from theTable where yearmonth = "& Code.mycode()
Which will return the SQL statement with the date included.
I thought the original question though was how to validate the parameters?
I was thinking of putting a Testbox on the form which has a value of
=Code.ValidateParameter(Parameters!DateParam.Value)
as an example. Then you can make this visible if the text box has anything
in it.
You can use the same syntax for the SQL statement if you wanted to check the
parameter before you passed it in to the database within the dataset.
Craig
"Henry Chen" <HenryChen@.discussions.microsoft.com> wrote in message
news:7F512BB0-8D5C-4E16-B1E2-6A0270BB0117@.microsoft.com...
> Hi, Craig,
> my code looks like this:
> declare @.lastmonth char(7)
> @.lastmonth = code.mycode() <-- will return '2006.02'
> select comments from theTable
> where yearmonth = @.lastmonth
> I execute it and get an error "syntax error near @.lastmonth"
> the program of mycode() is in layout, report, report properties, code.
> Thanks!
> Henry
>
> "Ken" wrote:
>> I need to validate a parameters Length to make sure it is 8 characters
>> long
>> and whether it is of numeric value and if it is not to display a
>> validation
>> error message. Is this possible. I'm using reporting service and SQL
>> Server
>> 2000.
>> Any help will greatly appreciated.

Friday, February 24, 2012

Help

I am using a SQL Server database to write a report on Crystal Reports
9. I am having trouble with the sql to set the parameters. namely from
the master.datetime field. I am trying to take the datetime field and
set it into 4 different parameters (BeginDate, EndDate, BeginTime,
EndTime).
I have tried this...
((Master.DateTime) Between ({?BeginDate} + TimeValue({?BeginTime})
) And
({?EndDate} + TimeValue({?EndTime}))) And
this gives give me an error stating that timevalue does not exist
and I've tried this...
((Master.DateTime) Between ({?BeginDate} + ({?BeginTime})) And
({?EndDate} +({?EndTime}))) And
no errors occur, but the report comes up completely blank...
Can anyone help me here...please!!!I think you are looking for getdate()
To get the current server time in sql server use getdate(). Also, you will
want to convert your sql concatenation back into a datetime type.
so it would be something like the following
WHERE getdate() BETWEEN CAST(BeginDate + ' ' + BeginTime AS DateTime) AND
CAST(EndDate + ' ' + EndTime AS DateTime)
HTH
--
Ryan Powers
Clarity Consulting
http://www.claritycon.com
"Mark" wrote:

> I am using a SQL Server database to write a report on Crystal Reports
> 9. I am having trouble with the sql to set the parameters. namely from
> the master.datetime field. I am trying to take the datetime field and
> set it into 4 different parameters (BeginDate, EndDate, BeginTime,
> EndTime).
> I have tried this...
>
> ((Master.DateTime) Between ({?BeginDate} + TimeValue({?BeginTime
})) And
> ({?EndDate} + TimeValue({?EndTime}))) And
>
> this gives give me an error stating that timevalue does not exist
> and I've tried this...
>
> ((Master.DateTime) Between ({?BeginDate} + ({?BeginTime})) And
> ({?EndDate} +({?EndTime}))) And
> no errors occur, but the report comes up completely blank...
> Can anyone help me here...please!!!
>|||Thanks for the reply. That didn't work either. What I am trying to do
is create a report for that allows the user to pick a BeginDate, an
EndDate, a BeginTime, and an EndTime. All of this comes from the field
DateTime on the master DB. I need to set those BeginTime, EndTime, etc
parameters so the user can bring up data for a particular time period.|||I guess I am a little confused.
Can you explain what you mean by DateTime field in the Master database?
What table in the master database are you looking at? Why are you querying
the master database at all?
I would imagine that you have a user database that contains the actual data
that you need. Can you explain what you are trying to get from the master
database.
You definitely can not reference a field in the master database without also
referencing the table that it resides in (and for that matter a specific row
in that table). But, I can imagine what you need to refer to the master
database for.
Can you send some more specifics?
--
Ryan Powers
Clarity Consulting
http://www.claritycon.com
"Mark" wrote:

> Thanks for the reply. That didn't work either. What I am trying to do
> is create a report for that allows the user to pick a BeginDate, an
> EndDate, a BeginTime, and an EndTime. All of this comes from the field
> DateTime on the master DB. I need to set those BeginTime, EndTime, etc
> parameters so the user can bring up data for a particular time period.
>|||It is the master table in the user database. Sorry...I have been
pulling my hair out over this for hours now. We have a giant
database...and all the info I need comes from the master table. I
will show you all the code written so far, so you have an idea what is
going on. I am writing a specific report to track local and toll
calls, which comes from the main (user) database. The one and only
field I am having trouble setting the parameters for is the DateTime
field in the master table. It was set up as two different fields as an
Access database, but now we switched over to an SQL Server database,
and it is all in one field. Out of master.DateTime, I need to be able
to set BeginDate, EndDate, BeginTime, and EndTime as parameters to make
it easier for the user to locate calls by date and time. It is all
grouped by departments.
Here is the code I have with the code that is crashing....I will a
major amount of spaces around the code I am having problems with:
Select
sum(case when Master.CallType='2' Then 1 else 0 end),
sum(case when Master.CallType='2' Then Master.Duration else 0 end) ,
sum(case when Master.CallType='2' Then Master.CostOfCall else 0 end),
sum(case when Master.CostOfCall > 0 Then 1 else 0 end),
sum(case when Master.CostOfCall > 0 Then Master.Duration else 0 end),
sum(case when Master.CostOfCall > 0 Then Master.CostOfCall else 0 end),
count(master.recordcontrolnumber), sum(master.duration),
sum(master.costofcall),
department.departmentname
FROM master LEFT JOIN (extension LEFT JOIN department ON
(extension.sitecode=department.sitecode) AND
(extension.departmentnumber=department.departmentnumber)) ON
(master.extension=extension.line) AND
(master.sitecode=extension.sitecode)
Where ('{?SiteCode}' = '*' Or Master.SiteCode Like '{?SiteCode}')
And
((Master.DateTime) Between ({?BeginDate} + TimeValue({?BeginTime})
) And
({?EndDate} + TimeValue({?EndTime}))) And
<--problem here!!!!!!!!
('{?DivisionName}' = '*' Or Department.DivisionName Like
'{?DivisionName}') And
('{?CostCenterName}' = '*' Or Department.CostCenterName Like
'{?CostCenterName}') And
('{?DepartmentName}' = '*' Or Department.DepartmentName Like
'{?DepartmentName}') And
('{?UserName}' = '*' Or Extension.UserName Like '{?UserName}') And
('{?AccountCode}' = '*' Or Master.AccountCode Like '{?AccountCode}
')
And
('{?City}' = '*' Or Master.City Like '{?City}') And
('{?State}' = '*' Or Master.State Like '{?State}') And
('{?TrunkGroup}' = '*' Or Master.GroupUsed Like '{?TrunkGroup}') A
nd
('{?Trunk}' = '*' Or Master.TrunkUsed Like '{?Trunk}') And
('{?CallType}' = '*' Or Master.CallType Like '{?CallType}') And
('{?DirectionFlag}' = '*' Or Master.DirectionFlag Like
'{?DirectionFlag}')
Group By Department.DepartmentName|||It only needs to be between 2 dates....for example....1/1/06 to
1/4/06....my boss just explained it to me now after a meeting...he
said not to worry about the time|||Okay. It is making more sense now.
Can you provide me a couple more things?
1) What datatype is DateTime in the Master table?
2) What is the datatype of the 4 parameters that you are using to construct
the begin and end dates?
3) Can you give me an example of what each parameter might typically look
like?
With this information, I will hopefully be able to help.
Ryan Powers
Clarity Consulting
http://www.claritycon.com
"Mark" wrote:

> It is the master table in the user database. Sorry...I have been
> pulling my hair out over this for hours now. We have a giant
> database...and all the info I need comes from the master table. I
> will show you all the code written so far, so you have an idea what is
> going on. I am writing a specific report to track local and toll
> calls, which comes from the main (user) database. The one and only
> field I am having trouble setting the parameters for is the DateTime
> field in the master table. It was set up as two different fields as an
> Access database, but now we switched over to an SQL Server database,
> and it is all in one field. Out of master.DateTime, I need to be able
> to set BeginDate, EndDate, BeginTime, and EndTime as parameters to make
> it easier for the user to locate calls by date and time. It is all
> grouped by departments.
> Here is the code I have with the code that is crashing....I will a
> major amount of spaces around the code I am having problems with:
> Select
> sum(case when Master.CallType='2' Then 1 else 0 end),
> sum(case when Master.CallType='2' Then Master.Duration else 0 end) ,
> sum(case when Master.CallType='2' Then Master.CostOfCall else 0 end),
> sum(case when Master.CostOfCall > 0 Then 1 else 0 end),
> sum(case when Master.CostOfCall > 0 Then Master.Duration else 0 end),
> sum(case when Master.CostOfCall > 0 Then Master.CostOfCall else 0 end),
> count(master.recordcontrolnumber), sum(master.duration),
> sum(master.costofcall),
> department.departmentname
> FROM master LEFT JOIN (extension LEFT JOIN department ON
> (extension.sitecode=department.sitecode) AND
> (extension.departmentnumber=department.departmentnumber)) ON
> (master.extension=extension.line) AND
> (master.sitecode=extension.sitecode)
> Where ('{?SiteCode}' = '*' Or Master.SiteCode Like '{?SiteCode}'
) And
>
>
> ((Master.DateTime) Between ({?BeginDate} + TimeValue({?BeginTime
})) And
> ({?EndDate} + TimeValue({?EndTime}))) And
> <--problem here!!!!!!!!
>
>
> ('{?DivisionName}' = '*' Or Department.DivisionName Like
> '{?DivisionName}') And
> ('{?CostCenterName}' = '*' Or Department.CostCenterName Like
> '{?CostCenterName}') And
> ('{?DepartmentName}' = '*' Or Department.DepartmentName Like
> '{?DepartmentName}') And
> ('{?UserName}' = '*' Or Extension.UserName Like '{?UserName}') A
nd
> ('{?AccountCode}' = '*' Or Master.AccountCode Like '{?AccountCod
e}')
> And
> ('{?City}' = '*' Or Master.City Like '{?City}') And
> ('{?State}' = '*' Or Master.State Like '{?State}') And
> ('{?TrunkGroup}' = '*' Or Master.GroupUsed Like '{?TrunkGroup}')
And
> ('{?Trunk}' = '*' Or Master.TrunkUsed Like '{?Trunk}') And
> ('{?CallType}' = '*' Or Master.CallType Like '{?CallType}') And
> ('{?DirectionFlag}' = '*' Or Master.DirectionFlag Like
> '{?DirectionFlag}')
> Group By Department.DepartmentName
>|||That will make it a bit easier.
Can you still post the items that I previously requested? (ie, the
datatypes and sample data). Thanks.
--
Ryan Powers
Clarity Consulting
http://www.claritycon.com
"Mark" wrote:

> It only needs to be between 2 dates....for example....1/1/06 to
> 1/4/06....my boss just explained it to me now after a meeting...he
> said not to worry about the time
>|||1)DateTime
2)there are only 2 now...BeginDateTime and EndDateTime
3)it will be a date/time like 1/4/06 14:30|||1)DateTime
2)there are only 2 now...BeginDateTime and EndDateTime
3)it will be a date/time like 1/4/06 14:30
Thank you for all of you help.....I am trying this right now...
Master.DateTime Between ({?BeginDateTime}) And ({?EndDateTime}) An
d
...for the line of code that is erroring....I am not getting an
error...but page 2 of my report where the data is grouped by
departments is all blank...I don't know if this is supposed to
happen...This is the first real Crystal Report I have ever written

Sunday, February 19, 2012

Help

I am using a SQL Server database to write a report on Crystal Reports
9. I am having trouble with the sql to set the parameters. namely from
the master.datetime field. I am trying to take the datetime field and
set it into 4 different parameters (BeginDate, EndDate, BeginTime,
EndTime).
I have tried this...
((Master.DateTime) Between ({?BeginDate} + TimeValue({?BeginTime})) And
({?EndDate} + TimeValue({?EndTime}))) And
this gives give me an error stating that timevalue does not exist
and I've tried this...
((Master.DateTime) Between ({?BeginDate} + ({?BeginTime})) And
({?EndDate} +({?EndTime}))) And
no errors occur, but the report comes up completely blank...
Can anyone help me here...please!!!
I think you are looking for getdate()
To get the current server time in sql server use getdate(). Also, you will
want to convert your sql concatenation back into a datetime type.
so it would be something like the following
WHERE getdate() BETWEEN CAST(BeginDate + ' ' + BeginTime AS DateTime) AND
CAST(EndDate + ' ' + EndTime AS DateTime)
HTH
Ryan Powers
Clarity Consulting
http://www.claritycon.com
"Mark" wrote:

> I am using a SQL Server database to write a report on Crystal Reports
> 9. I am having trouble with the sql to set the parameters. namely from
> the master.datetime field. I am trying to take the datetime field and
> set it into 4 different parameters (BeginDate, EndDate, BeginTime,
> EndTime).
> I have tried this...
>
> ((Master.DateTime) Between ({?BeginDate} + TimeValue({?BeginTime})) And
> ({?EndDate} + TimeValue({?EndTime}))) And
>
> this gives give me an error stating that timevalue does not exist
> and I've tried this...
>
> ((Master.DateTime) Between ({?BeginDate} + ({?BeginTime})) And
> ({?EndDate} +({?EndTime}))) And
> no errors occur, but the report comes up completely blank...
> Can anyone help me here...please!!!
>
|||Thanks for the reply. That didn't work either. What I am trying to do
is create a report for that allows the user to pick a BeginDate, an
EndDate, a BeginTime, and an EndTime. All of this comes from the field
DateTime on the master DB. I need to set those BeginTime, EndTime, etc
parameters so the user can bring up data for a particular time period.
|||I guess I am a little confused.
Can you explain what you mean by DateTime field in the Master database?
What table in the master database are you looking at? Why are you querying
the master database at all?
I would imagine that you have a user database that contains the actual data
that you need. Can you explain what you are trying to get from the master
database.
You definitely can not reference a field in the master database without also
referencing the table that it resides in (and for that matter a specific row
in that table). But, I can imagine what you need to refer to the master
database for.
Can you send some more specifics?
Ryan Powers
Clarity Consulting
http://www.claritycon.com
"Mark" wrote:

> Thanks for the reply. That didn't work either. What I am trying to do
> is create a report for that allows the user to pick a BeginDate, an
> EndDate, a BeginTime, and an EndTime. All of this comes from the field
> DateTime on the master DB. I need to set those BeginTime, EndTime, etc
> parameters so the user can bring up data for a particular time period.
>
|||It is the master table in the user database. Sorry...I have been
pulling my hair out over this for hours now. We have a giant
database...and all the info I need comes from the master table. I
will show you all the code written so far, so you have an idea what is
going on. I am writing a specific report to track local and toll
calls, which comes from the main (user) database. The one and only
field I am having trouble setting the parameters for is the DateTime
field in the master table. It was set up as two different fields as an
Access database, but now we switched over to an SQL Server database,
and it is all in one field. Out of master.DateTime, I need to be able
to set BeginDate, EndDate, BeginTime, and EndTime as parameters to make
it easier for the user to locate calls by date and time. It is all
grouped by departments.
Here is the code I have with the code that is crashing....I will a
major amount of spaces around the code I am having problems with:
Select
sum(case when Master.CallType='2' Then 1 else 0 end),
sum(case when Master.CallType='2' Then Master.Duration else 0 end) ,
sum(case when Master.CallType='2' Then Master.CostOfCall else 0 end),
sum(case when Master.CostOfCall > 0 Then 1 else 0 end),
sum(case when Master.CostOfCall > 0 Then Master.Duration else 0 end),
sum(case when Master.CostOfCall > 0 Then Master.CostOfCall else 0 end),
count(master.recordcontrolnumber), sum(master.duration),
sum(master.costofcall),
department.departmentname
FROM master LEFT JOIN (extension LEFT JOIN department ON
(extension.sitecode=department.sitecode) AND
(extension.departmentnumber=department.departmentn umber)) ON
(master.extension=extension.line) AND
(master.sitecode=extension.sitecode)
Where ('{?SiteCode}' = '*' Or Master.SiteCode Like '{?SiteCode}') And
((Master.DateTime) Between ({?BeginDate} + TimeValue({?BeginTime})) And
({?EndDate} + TimeValue({?EndTime}))) And
<--problem here!!!!!!!!
('{?DivisionName}' = '*' Or Department.DivisionName Like
'{?DivisionName}') And
('{?CostCenterName}' = '*' Or Department.CostCenterName Like
'{?CostCenterName}') And
('{?DepartmentName}' = '*' Or Department.DepartmentName Like
'{?DepartmentName}') And
('{?UserName}' = '*' Or Extension.UserName Like '{?UserName}') And
('{?AccountCode}' = '*' Or Master.AccountCode Like '{?AccountCode}')
And
('{?City}' = '*' Or Master.City Like '{?City}') And
('{?State}' = '*' Or Master.State Like '{?State}') And
('{?TrunkGroup}' = '*' Or Master.GroupUsed Like '{?TrunkGroup}') And
('{?Trunk}' = '*' Or Master.TrunkUsed Like '{?Trunk}') And
('{?CallType}' = '*' Or Master.CallType Like '{?CallType}') And
('{?DirectionFlag}' = '*' Or Master.DirectionFlag Like
'{?DirectionFlag}')
Group By Department.DepartmentName
|||It only needs to be between 2 dates....for example....1/1/06 to
1/4/06....my boss just explained it to me now after a meeting...he
said not to worry about the time
|||Okay. It is making more sense now.
Can you provide me a couple more things?
1) What datatype is DateTime in the Master table?
2) What is the datatype of the 4 parameters that you are using to construct
the begin and end dates?
3) Can you give me an example of what each parameter might typically look
like?
With this information, I will hopefully be able to help.
Ryan Powers
Clarity Consulting
http://www.claritycon.com
"Mark" wrote:

> It is the master table in the user database. Sorry...I have been
> pulling my hair out over this for hours now. We have a giant
> database...and all the info I need comes from the master table. I
> will show you all the code written so far, so you have an idea what is
> going on. I am writing a specific report to track local and toll
> calls, which comes from the main (user) database. The one and only
> field I am having trouble setting the parameters for is the DateTime
> field in the master table. It was set up as two different fields as an
> Access database, but now we switched over to an SQL Server database,
> and it is all in one field. Out of master.DateTime, I need to be able
> to set BeginDate, EndDate, BeginTime, and EndTime as parameters to make
> it easier for the user to locate calls by date and time. It is all
> grouped by departments.
> Here is the code I have with the code that is crashing....I will a
> major amount of spaces around the code I am having problems with:
> Select
> sum(case when Master.CallType='2' Then 1 else 0 end),
> sum(case when Master.CallType='2' Then Master.Duration else 0 end) ,
> sum(case when Master.CallType='2' Then Master.CostOfCall else 0 end),
> sum(case when Master.CostOfCall > 0 Then 1 else 0 end),
> sum(case when Master.CostOfCall > 0 Then Master.Duration else 0 end),
> sum(case when Master.CostOfCall > 0 Then Master.CostOfCall else 0 end),
> count(master.recordcontrolnumber), sum(master.duration),
> sum(master.costofcall),
> department.departmentname
> FROM master LEFT JOIN (extension LEFT JOIN department ON
> (extension.sitecode=department.sitecode) AND
> (extension.departmentnumber=department.departmentn umber)) ON
> (master.extension=extension.line) AND
> (master.sitecode=extension.sitecode)
> Where ('{?SiteCode}' = '*' Or Master.SiteCode Like '{?SiteCode}') And
>
>
> ((Master.DateTime) Between ({?BeginDate} + TimeValue({?BeginTime})) And
> ({?EndDate} + TimeValue({?EndTime}))) And
> <--problem here!!!!!!!!
>
>
> ('{?DivisionName}' = '*' Or Department.DivisionName Like
> '{?DivisionName}') And
> ('{?CostCenterName}' = '*' Or Department.CostCenterName Like
> '{?CostCenterName}') And
> ('{?DepartmentName}' = '*' Or Department.DepartmentName Like
> '{?DepartmentName}') And
> ('{?UserName}' = '*' Or Extension.UserName Like '{?UserName}') And
> ('{?AccountCode}' = '*' Or Master.AccountCode Like '{?AccountCode}')
> And
> ('{?City}' = '*' Or Master.City Like '{?City}') And
> ('{?State}' = '*' Or Master.State Like '{?State}') And
> ('{?TrunkGroup}' = '*' Or Master.GroupUsed Like '{?TrunkGroup}') And
> ('{?Trunk}' = '*' Or Master.TrunkUsed Like '{?Trunk}') And
> ('{?CallType}' = '*' Or Master.CallType Like '{?CallType}') And
> ('{?DirectionFlag}' = '*' Or Master.DirectionFlag Like
> '{?DirectionFlag}')
> Group By Department.DepartmentName
>
|||That will make it a bit easier.
Can you still post the items that I previously requested? (ie, the
datatypes and sample data). Thanks.
Ryan Powers
Clarity Consulting
http://www.claritycon.com
"Mark" wrote:

> It only needs to be between 2 dates....for example....1/1/06 to
> 1/4/06....my boss just explained it to me now after a meeting...he
> said not to worry about the time
>
|||1)DateTime
2)there are only 2 now...BeginDateTime and EndDateTime
3)it will be a date/time like 1/4/06 14:30
|||1)DateTime
2)there are only 2 now...BeginDateTime and EndDateTime
3)it will be a date/time like 1/4/06 14:30
Thank you for all of you help.....I am trying this right now...
Master.DateTime Between ({?BeginDateTime}) And ({?EndDateTime}) And
....for the line of code that is erroring....I am not getting an
error...but page 2 of my report where the data is grouped by
departments is all blank...I don't know if this is supposed to
happen...This is the first real Crystal Report I have ever written

Help

I am using a SQL Server database to write a report on Crystal Reports
9. I am having trouble with the sql to set the parameters. namely from
the master.datetime field. I am trying to take the datetime field and
set it into 4 different parameters (BeginDate, EndDate, BeginTime,
EndTime).
I have tried this...
((Master.DateTime) Between ({?BeginDate} + TimeValue({?BeginTime})) And
({?EndDate} + TimeValue({?EndTime}))) And
this gives give me an error stating that timevalue does not exist
and I've tried this...
((Master.DateTime) Between ({?BeginDate} + ({?BeginTime})) And
({?EndDate} +({?EndTime}))) And
no errors occur, but the report comes up completely blank...
Can anyone help me here...please!!!I think you are looking for getdate()
To get the current server time in sql server use getdate(). Also, you will
want to convert your sql concatenation back into a datetime type.
so it would be something like the following
WHERE getdate() BETWEEN CAST(BeginDate + ' ' + BeginTime AS DateTime) AND
CAST(EndDate + ' ' + EndTime AS DateTime)
HTH
--
Ryan Powers
Clarity Consulting
http://www.claritycon.com
"Mark" wrote:
> I am using a SQL Server database to write a report on Crystal Reports
> 9. I am having trouble with the sql to set the parameters. namely from
> the master.datetime field. I am trying to take the datetime field and
> set it into 4 different parameters (BeginDate, EndDate, BeginTime,
> EndTime).
> I have tried this...
>
> ((Master.DateTime) Between ({?BeginDate} + TimeValue({?BeginTime})) And
> ({?EndDate} + TimeValue({?EndTime}))) And
>
> this gives give me an error stating that timevalue does not exist
> and I've tried this...
>
> ((Master.DateTime) Between ({?BeginDate} + ({?BeginTime})) And
> ({?EndDate} +({?EndTime}))) And
> no errors occur, but the report comes up completely blank...
> Can anyone help me here...please!!!
>|||Thanks for the reply. That didn't work either. What I am trying to do
is create a report for that allows the user to pick a BeginDate, an
EndDate, a BeginTime, and an EndTime. All of this comes from the field
DateTime on the master DB. I need to set those BeginTime, EndTime, etc
parameters so the user can bring up data for a particular time period.|||I guess I am a little confused.
Can you explain what you mean by DateTime field in the Master database?
What table in the master database are you looking at? Why are you querying
the master database at all?
I would imagine that you have a user database that contains the actual data
that you need. Can you explain what you are trying to get from the master
database.
You definitely can not reference a field in the master database without also
referencing the table that it resides in (and for that matter a specific row
in that table). But, I can imagine what you need to refer to the master
database for.
Can you send some more specifics?
--
Ryan Powers
Clarity Consulting
http://www.claritycon.com
"Mark" wrote:
> Thanks for the reply. That didn't work either. What I am trying to do
> is create a report for that allows the user to pick a BeginDate, an
> EndDate, a BeginTime, and an EndTime. All of this comes from the field
> DateTime on the master DB. I need to set those BeginTime, EndTime, etc
> parameters so the user can bring up data for a particular time period.
>|||It is the master table in the user database. Sorry...I have been
pulling my hair out over this for hours now. We have a giant
database...and all the info I need comes from the master table. I
will show you all the code written so far, so you have an idea what is
going on. I am writing a specific report to track local and toll
calls, which comes from the main (user) database. The one and only
field I am having trouble setting the parameters for is the DateTime
field in the master table. It was set up as two different fields as an
Access database, but now we switched over to an SQL Server database,
and it is all in one field. Out of master.DateTime, I need to be able
to set BeginDate, EndDate, BeginTime, and EndTime as parameters to make
it easier for the user to locate calls by date and time. It is all
grouped by departments.
Here is the code I have with the code that is crashing....I will a
major amount of spaces around the code I am having problems with:
Select
sum(case when Master.CallType='2' Then 1 else 0 end),
sum(case when Master.CallType='2' Then Master.Duration else 0 end) ,
sum(case when Master.CallType='2' Then Master.CostOfCall else 0 end),
sum(case when Master.CostOfCall > 0 Then 1 else 0 end),
sum(case when Master.CostOfCall > 0 Then Master.Duration else 0 end),
sum(case when Master.CostOfCall > 0 Then Master.CostOfCall else 0 end),
count(master.recordcontrolnumber), sum(master.duration),
sum(master.costofcall),
department.departmentname
FROM master LEFT JOIN (extension LEFT JOIN department ON
(extension.sitecode=department.sitecode) AND
(extension.departmentnumber=department.departmentnumber)) ON
(master.extension=extension.line) AND
(master.sitecode=extension.sitecode)
Where ('{?SiteCode}' = '*' Or Master.SiteCode Like '{?SiteCode}') And
((Master.DateTime) Between ({?BeginDate} + TimeValue({?BeginTime})) And
({?EndDate} + TimeValue({?EndTime}))) And
<--problem here!!!!!!!!
('{?DivisionName}' = '*' Or Department.DivisionName Like
'{?DivisionName}') And
('{?CostCenterName}' = '*' Or Department.CostCenterName Like
'{?CostCenterName}') And
('{?DepartmentName}' = '*' Or Department.DepartmentName Like
'{?DepartmentName}') And
('{?UserName}' = '*' Or Extension.UserName Like '{?UserName}') And
('{?AccountCode}' = '*' Or Master.AccountCode Like '{?AccountCode}')
And
('{?City}' = '*' Or Master.City Like '{?City}') And
('{?State}' = '*' Or Master.State Like '{?State}') And
('{?TrunkGroup}' = '*' Or Master.GroupUsed Like '{?TrunkGroup}') And
('{?Trunk}' = '*' Or Master.TrunkUsed Like '{?Trunk}') And
('{?CallType}' = '*' Or Master.CallType Like '{?CallType}') And
('{?DirectionFlag}' = '*' Or Master.DirectionFlag Like
'{?DirectionFlag}')
Group By Department.DepartmentName|||It only needs to be between 2 dates....for example....1/1/06 to
1/4/06....my boss just explained it to me now after a meeting...he
said not to worry about the time|||Okay. It is making more sense now.
Can you provide me a couple more things?
1) What datatype is DateTime in the Master table?
2) What is the datatype of the 4 parameters that you are using to construct
the begin and end dates?
3) Can you give me an example of what each parameter might typically look
like?
With this information, I will hopefully be able to help.
--
Ryan Powers
Clarity Consulting
http://www.claritycon.com
"Mark" wrote:
> It is the master table in the user database. Sorry...I have been
> pulling my hair out over this for hours now. We have a giant
> database...and all the info I need comes from the master table. I
> will show you all the code written so far, so you have an idea what is
> going on. I am writing a specific report to track local and toll
> calls, which comes from the main (user) database. The one and only
> field I am having trouble setting the parameters for is the DateTime
> field in the master table. It was set up as two different fields as an
> Access database, but now we switched over to an SQL Server database,
> and it is all in one field. Out of master.DateTime, I need to be able
> to set BeginDate, EndDate, BeginTime, and EndTime as parameters to make
> it easier for the user to locate calls by date and time. It is all
> grouped by departments.
> Here is the code I have with the code that is crashing....I will a
> major amount of spaces around the code I am having problems with:
> Select
> sum(case when Master.CallType='2' Then 1 else 0 end),
> sum(case when Master.CallType='2' Then Master.Duration else 0 end) ,
> sum(case when Master.CallType='2' Then Master.CostOfCall else 0 end),
> sum(case when Master.CostOfCall > 0 Then 1 else 0 end),
> sum(case when Master.CostOfCall > 0 Then Master.Duration else 0 end),
> sum(case when Master.CostOfCall > 0 Then Master.CostOfCall else 0 end),
> count(master.recordcontrolnumber), sum(master.duration),
> sum(master.costofcall),
> department.departmentname
> FROM master LEFT JOIN (extension LEFT JOIN department ON
> (extension.sitecode=department.sitecode) AND
> (extension.departmentnumber=department.departmentnumber)) ON
> (master.extension=extension.line) AND
> (master.sitecode=extension.sitecode)
> Where ('{?SiteCode}' = '*' Or Master.SiteCode Like '{?SiteCode}') And
>
>
> ((Master.DateTime) Between ({?BeginDate} + TimeValue({?BeginTime})) And
> ({?EndDate} + TimeValue({?EndTime}))) And
> <--problem here!!!!!!!!
>
>
> ('{?DivisionName}' = '*' Or Department.DivisionName Like
> '{?DivisionName}') And
> ('{?CostCenterName}' = '*' Or Department.CostCenterName Like
> '{?CostCenterName}') And
> ('{?DepartmentName}' = '*' Or Department.DepartmentName Like
> '{?DepartmentName}') And
> ('{?UserName}' = '*' Or Extension.UserName Like '{?UserName}') And
> ('{?AccountCode}' = '*' Or Master.AccountCode Like '{?AccountCode}')
> And
> ('{?City}' = '*' Or Master.City Like '{?City}') And
> ('{?State}' = '*' Or Master.State Like '{?State}') And
> ('{?TrunkGroup}' = '*' Or Master.GroupUsed Like '{?TrunkGroup}') And
> ('{?Trunk}' = '*' Or Master.TrunkUsed Like '{?Trunk}') And
> ('{?CallType}' = '*' Or Master.CallType Like '{?CallType}') And
> ('{?DirectionFlag}' = '*' Or Master.DirectionFlag Like
> '{?DirectionFlag}')
> Group By Department.DepartmentName
>|||That will make it a bit easier.
Can you still post the items that I previously requested? (ie, the
datatypes and sample data). Thanks.
--
Ryan Powers
Clarity Consulting
http://www.claritycon.com
"Mark" wrote:
> It only needs to be between 2 dates....for example....1/1/06 to
> 1/4/06....my boss just explained it to me now after a meeting...he
> said not to worry about the time
>|||1)DateTime
2)there are only 2 now...BeginDateTime and EndDateTime
3)it will be a date/time like 1/4/06 14:30|||1)DateTime
2)there are only 2 now...BeginDateTime and EndDateTime
3)it will be a date/time like 1/4/06 14:30
Thank you for all of you help.....I am trying this right now...
Master.DateTime Between ({?BeginDateTime}) And ({?EndDateTime}) And
...for the line of code that is erroring....I am not getting an
error...but page 2 of my report where the data is grouped by
departments is all blank...I don't know if this is supposed to
happen...This is the first real Crystal Report I have ever written|||Have you tried running the SQL outside of Crystal just to look and verify
that they look like you want?
I'm not sure if this is SQL passed to the db or in a stored procedure. But,
either way, one way to do this would be to use sql-profiler to profile either
the sp execution or TSQL execution. You can then use the TextData to see the
exact call being made on the SQL server.
You can then run this in query analyzer to view the result set that is being
returned.
From what I know, you can not regroup you data to redisplay on separate
pages of the reports. Since, Crystal would have already walked through your
data to bind to the report using the first grouping.
I definitely am not a Crystal expert. But, I would recommend running the
SQL outside of Crystal so you have a good idea of the Record Set that you are
ultimately binding to your report and to verify that your joins and WHERE
clause is working as you expect.
--
Ryan Powers
Clarity Consulting
http://www.claritycon.com
"Mark" wrote:
> 1)DateTime
> 2)there are only 2 now...BeginDateTime and EndDateTime
> 3)it will be a date/time like 1/4/06 14:30
>
> Thank you for all of you help.....I am trying this right now...
> Master.DateTime Between ({?BeginDateTime}) And ({?EndDateTime}) And
> ....for the line of code that is erroring....I am not getting an
> error...but page 2 of my report where the data is grouped by
> departments is all blank...I don't know if this is supposed to
> happen...This is the first real Crystal Report I have ever written
>|||Thank you so much for your help. You have been very helpful. I
finally got it all to work out with that last line of code...I just
had to check the dates on the db...that is why i was getting a blank
report. Right now I am just writting the formula fields and I will be
done with this report. Couldn't have done it without your help!!!!
Thanks again!!!!|||Cool. Glad I could help.
Best of luck.
--
Ryan Powers
Clarity Consulting
http://www.claritycon.com
"Mark" wrote:
> Thank you so much for your help. You have been very helpful. I
> finally got it all to work out with that last line of code...I just
> had to check the dates on the db...that is why i was getting a blank
> report. Right now I am just writting the formula fields and I will be
> done with this report. Couldn't have done it without your help!!!!
> Thanks again!!!!
>

help

When you have two parameters on a report, how do you get to where you can
choose one and not the other.Make sure both of your parameters have a default parameter, or that NULL and
/ or Blank is allowed, depending on what sort of parameters you have.
Kaisa M. Lindahl Lervik
"Ben Watts" <ben.watts@.aaronnickellhomes.com> wrote in message
news:uXoYBWCBHHA.3560@.TK2MSFTNGP03.phx.gbl...
> When you have two parameters on a report, how do you get to where you can
> choose one and not the other.
>|||Basically I have 2 parameters. I have JobNumber parameter and then I have
Subdivison parameter. If I choose subdivision I want the Jobnumber
parameter to gray out and not affect the report and vice versa. Hope this
explains a little better.
"Kaisa M. Lindahl Lervik" <kaisaml@.hotmail.com> wrote in message
news:Oe10VNbBHHA.3560@.TK2MSFTNGP04.phx.gbl...
> Make sure both of your parameters have a default parameter, or that NULL
> and / or Blank is allowed, depending on what sort of parameters you have.
> Kaisa M. Lindahl Lervik
> "Ben Watts" <ben.watts@.aaronnickellhomes.com> wrote in message
> news:uXoYBWCBHHA.3560@.TK2MSFTNGP03.phx.gbl...
>> When you have two parameters on a report, how do you get to where you can
>> choose one and not the other.
>