Showing posts with label cant. Show all posts
Showing posts with label cant. Show all posts

Friday, March 9, 2012

IIS/MS SQL/ASP... cant connect

I have an ASP script with the following code in the global.asa:

Application("DBConnectString")="DSN=Test_Server;UID=Michael;PWD=xxxx"

But I get the error:

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/TheResort/i_asputils.asp, line 8

Problem:

I setup the ODBC portion and it correctly saw the MS SQL server, and the test connection worked fine. Yet when I ever I enter that ODBC name "Test_Server", and the password of the Win XP Pro user I am signed in as, it fails to connect.

How can I be sure what domain,user,password I need to enter?Ttry using "DSN=asset;UID=;PWD=" and don't forget to insert the user id and password.

Also, when you set up the odbc "system" dsn, remember to click on the test connection button to verify the connection.

http://www.google.com/url?sa=U&start=9&q=http://support.microsoft.com/support/kb/articles/Q169/3/77.asp&e=7415 information.

IIS Synchronizing Data Error

hi..need help here,
I sometime get error when syncronizing data at New Subscription Wizard, and sometime I dont.but right now i cant sync, this is me error messages :
"Synchronizing Data (Error)
Messages
A request to send data to the computer running IIS has failed. For more information, see HRESULT.
HRESULT 0x80070002 (28037)
The operation could not be completed."

I've turn off the firewall, turn off the antivirus, plug the LAN cable but still error (Maybe it has to do with it).A long time a go I've had this error, and then I decided to reinstall SQL Server and try it again and it work, now it back to me again, do I have to reinstalled it again(hopefully it solved my problem)?or any otherway?

And want to ask about SQL Mobile, When I choose the Merge, the uniqueidentifier will be add at my table right?what should I do at inserting query process, I cant just insert it with NULL value right?
After my subscription doing input data, is it my publications will be automatic updated?
I'm little lost here..need advise

Its a miracle.. "_" now I can sync it without any changes on my computer, I give one more shot try to sync after I write this thread and then it works!!

but still curious why sometime I can, sometime I cant?

and still know about uniqueidentifier, please..

Friday, February 24, 2012

iif to case for sql server 2000

I am trying to convert this query to slq server 2000 and I cant figure
out how to get rid of the IIF statements and make them case statements.

If anyone could help I would greatly appreciate it!

Thanks!

spafa

SELECT Jeopardy.Main, Jeopardy.Name, Jeopardy.COMMENTS2,
Jeopardy.STATUS, Jeopardy.DENTAL_STATUS, Jeopardy.HLTH_INC,
Jeopardy.DNTL_INC, Jeopardy.COMP_HLTH, Jeopardy.COMP_HLTH_DISC,
Jeopardy.COMP_PLAN_DESIGN, Jeopardy.COMP_DNTL, Jeopardy.COMP_DNTL_DISC,
Jeopardy.OUT_TO_BID, IIf([COMP_HLTH]=\"Mass Blue
Cross\",\"YES\",IIf([COMP_HLTH]=\"Out of State Blue
Cross\",\"YES\",IIf([COMP_HLTH]=\"CT Blue
Cross\",\"YES\",IIf([COMP_HLTH]=\"Empire Blue Cross\",\"YES\",\"NO\"))))
AS OTHER_BC_PLAN, IIf([other_bc_plan]=\"yes\",[COMP_HLTH],\"\") AS
BC_PLAN, Jeopardy.LG_RANKING, Jeopardy.LG_SCORE, Jeopardy.DATE_NOTIFIED,
Jeopardy.DATE_UPDATED, Now()-([Jeopardy]![DATE_UPDATED]) AS DATEDIFF,
Now()-([Jeopardy]![DATE_ADDED]) AS DATEDIFF2,
IIf([DateDiff]<8,\"*\",Null) AS CHANGE, IIf([DateDiff2]<8,\"+\",Null) AS
[ADD], Jeopardy.Rep_Id, Jeopardy.Rep_Name, tblIRIP_QA_NAMES.ADMIN_NAME
AS MSS, AccountOwnership.ANALYST_NAME, AccountOwnership.UND_NAME,
AccountOwnership.DNTL_UND_NAME, AccountOwnership.SERVICE_REP,
AccountOwnership.SIZE, AccountOwnership.SIZE2, Jeopardy.CYCLE,
Jeopardy.DENTAL_CYCLE, IIf([Jeopardy]![cycle] Is Null,[Jeopardy]![DENTA-
L_CYCLE],IIf([Jeopardy]![cycle]=\"N/A\",[Jeopardy]![DENTAL_CYCLE],[Jeop-
ardy]![cycle])) AS CYCLE2, AccountOwnership.Canc_Date,
AccountOwnership.Dntl_Canc_Date, AccountOwnership.EFFDATE,
AccountOwnership.Dntl_EFFDATE, AccountOwnership.TOTALHLTH,
AccountOwnership.TOTALDNTL, [healthmate]+[classic] AS TotalCross,
AccountOwnership.HEALTHMATE, AccountOwnership.CHIP,
AccountOwnership.CLASSIC, AccountOwnership.BROKER,
AccountOwnership.HLTH_BROKER_1, AccountOwnership_DSC.DISPOSITION,
AccountOwnership_DSC.DISPOSITION_MONTH, IIf([DISPOSITION_month] Is Not
Null,\"YES\",\"NO\") AS OC, IIf([DISPOSITION_month] Is Not
Null,[DISPOSITION_month],Null) AS OC_MONTH

FROM ((AccountOwnership_DSC RIGHT JOIN AccountOwnership ON
AccountOwnership_DSC.Main = AccountOwnership.Main) RIGHT JOIN Jeopardy
ON AccountOwnership.Main = Jeopardy.Main) LEFT JOIN tblIRIP_QA_NAMES ON
AccountOwnership.REP_ID = tblIRIP_QA_NAMES.Rep_Id ORDER BY
Jeopardy.DATE_UPDATED DESC; " );

--
Posted via http://dbforums.comBelow are 2 examples taken directly from the SQL 2000 Books Online
<"tsqlref.chm::/ts_ca-co_5t9v.htm">. The first example uses the simple
CASE form where the specified expression is compared with each entry in
the list. The second example uses the searched CASE form where each
entry in the list specifies a Boolean condition.

USE pubs
GO

SELECT Category =
CASE type
WHEN 'popular_comp' THEN 'Popular Computing'
WHEN 'mod_cook' THEN 'Modern Cooking'
WHEN 'business' THEN 'Business'
WHEN 'psychology' THEN 'Psychology'
WHEN 'trad_cook' THEN 'Traditional Cooking'
ELSE 'Not yet categorized'
END,
CAST(title AS varchar(25)) AS 'Shortened Title',
price AS Price
FROM titles
WHERE price IS NOT NULL
ORDER BY type, price
COMPUTE AVG(price) BY type
GO

SELECT 'Price Category' =
CASE
WHEN price IS NULL THEN 'Not yet priced'
WHEN price < 10 THEN 'Very Reasonable Title'
WHEN price >= 10 and price < 20 THEN 'Coffee Table Title'
ELSE 'Expensive book!'
END,
CAST(title AS varchar(20)) AS 'Shortened Title'
FROM titles
ORDER BY price
GO

--
Hope this helps.

Dan Guzman
SQL Server MVP

--------
SQL FAQ links (courtesy Neil Pike):

http://www.ntfaq.com/Articles/Index...epartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
--------

"SPAFA" <member44362@.dbforums.com> wrote in message
news:3487057.1066269043@.dbforums.com...
> I am trying to convert this query to slq server 2000 and I cant figure
> out how to get rid of the IIF statements and make them case
statements.
>
> If anyone could help I would greatly appreciate it!
>
> Thanks!
> spafa
>
>
> SELECT Jeopardy.Main, Jeopardy.Name, Jeopardy.COMMENTS2,
> Jeopardy.STATUS, Jeopardy.DENTAL_STATUS, Jeopardy.HLTH_INC,
> Jeopardy.DNTL_INC, Jeopardy.COMP_HLTH, Jeopardy.COMP_HLTH_DISC,
> Jeopardy.COMP_PLAN_DESIGN, Jeopardy.COMP_DNTL,
Jeopardy.COMP_DNTL_DISC,
> Jeopardy.OUT_TO_BID, IIf([COMP_HLTH]=\"Mass Blue
> Cross\",\"YES\",IIf([COMP_HLTH]=\"Out of State Blue
> Cross\",\"YES\",IIf([COMP_HLTH]=\"CT Blue
> Cross\",\"YES\",IIf([COMP_HLTH]=\"Empire Blue
Cross\",\"YES\",\"NO\"))))
> AS OTHER_BC_PLAN, IIf([other_bc_plan]=\"yes\",[COMP_HLTH],\"\") AS
> BC_PLAN, Jeopardy.LG_RANKING, Jeopardy.LG_SCORE,
Jeopardy.DATE_NOTIFIED,
> Jeopardy.DATE_UPDATED, Now()-([Jeopardy]![DATE_UPDATED]) AS DATEDIFF,
> Now()-([Jeopardy]![DATE_ADDED]) AS DATEDIFF2,
> IIf([DateDiff]<8,\"*\",Null) AS CHANGE, IIf([DateDiff2]<8,\"+\",Null)
AS
> [ADD], Jeopardy.Rep_Id, Jeopardy.Rep_Name, tblIRIP_QA_NAMES.ADMIN_NAME
> AS MSS, AccountOwnership.ANALYST_NAME, AccountOwnership.UND_NAME,
> AccountOwnership.DNTL_UND_NAME, AccountOwnership.SERVICE_REP,
> AccountOwnership.SIZE, AccountOwnership.SIZE2, Jeopardy.CYCLE,
> Jeopardy.DENTAL_CYCLE, IIf([Jeopardy]![cycle] Is
Null,[Jeopardy]![DENTA-
L_CYCLE],IIf([Jeopardy]![cycle]=\"N/A\",[Jeopardy]![DENTAL_CYCLE],[Jeop-
> ardy]![cycle])) AS CYCLE2, AccountOwnership.Canc_Date,
> AccountOwnership.Dntl_Canc_Date, AccountOwnership.EFFDATE,
> AccountOwnership.Dntl_EFFDATE, AccountOwnership.TOTALHLTH,
> AccountOwnership.TOTALDNTL, [healthmate]+[classic] AS TotalCross,
> AccountOwnership.HEALTHMATE, AccountOwnership.CHIP,
> AccountOwnership.CLASSIC, AccountOwnership.BROKER,
> AccountOwnership.HLTH_BROKER_1, AccountOwnership_DSC.DISPOSITION,
> AccountOwnership_DSC.DISPOSITION_MONTH, IIf([DISPOSITION_month] Is Not
> Null,\"YES\",\"NO\") AS OC, IIf([DISPOSITION_month] Is Not
> Null,[DISPOSITION_month],Null) AS OC_MONTH
> FROM ((AccountOwnership_DSC RIGHT JOIN AccountOwnership ON
> AccountOwnership_DSC.Main = AccountOwnership.Main) RIGHT JOIN Jeopardy
> ON AccountOwnership.Main = Jeopardy.Main) LEFT JOIN tblIRIP_QA_NAMES
ON
> AccountOwnership.REP_ID = tblIRIP_QA_NAMES.Rep_Id ORDER BY
> Jeopardy.DATE_UPDATED DESC; " );
>
> --
> Posted via http://dbforums.com|||In addition to Dan's post, note that there may sometimes be neater
alternatives to CASE:

... COALESCE(NULLIF(Jeopardy.cycle,'N/A'),Jeopardy.dental_cycle) AS cycle2,
...

--
David Portas
----
Please reply only to the newsgroup
--

IIF Statement Failing... Why?

I think I am getting this error because it cant interpet the Dataset option?
Is this a bug or am I doing somthing wrong?
Statment:
=IIF (ReportItems!JobPriceS.Value / (Fields!Pieces.Value +
Fields!SetupPieces.Value) > (Fields!TrussPrices.Value, "DataSet1") /
(Fields!Pieces.Value + Fields!SetupPieces.Value)
,"Red","White"))
Error:
w:\trussworks reports\plant reports\Piece Compare.rdl The background color
expression for the textbox â'textbox13â' contains an error: [BC30455] Argument
not specified for parameter 'FalsePart' of 'Public Function IIf(Expression As
Boolean, TruePart As Object, FalsePart As Object) As Object'.
--
Thank You, LeoTry some more parends. It looks like it is including the > as part of the
calculation of what to divide. Add a set of parends on either side of the >.
=IIF ((ReportItems!JobPriceS.Value / (Fields!Pieces.Value +
Fields!SetupPieces.Value)) > ((Fields!TrussPrices.Value, "DataSet1") /
(Fields!Pieces.Value + Fields!SetupPieces.Value))
,"Red","White"))
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"TrussworksLeo" <Leo@.noemail.noemail> wrote in message
news:A9C729D2-FFF6-4A08-A920-C48BA786CA8A@.microsoft.com...
> I think I am getting this error because it cant interpet the Dataset
option?
> Is this a bug or am I doing somthing wrong?
> Statment:
> =IIF (ReportItems!JobPriceS.Value / (Fields!Pieces.Value +
> Fields!SetupPieces.Value) > (Fields!TrussPrices.Value, "DataSet1") /
> (Fields!Pieces.Value + Fields!SetupPieces.Value)
> ,"Red","White"))
> Error:
> w:\trussworks reports\plant reports\Piece Compare.rdl The background color
> expression for the textbox 'textbox13' contains an error: [BC30455]
Argument
> not specified for parameter 'FalsePart' of 'Public Function IIf(Expression
As
> Boolean, TruePart As Object, FalsePart As Object) As Object'.
>
>
> --
> Thank You, Leo|||Bruce,
That is not working. It still says
Argument not specified for parameter 'FalsePart' of 'Public Function
IIf(Expression As Boolean, TruePart As Object, FalsePart As Object) As
Object'.
I try to compare two fields from two different data sets and get:
w:\trussworks reports\plant reports\Piece Compare.rdl The background color
expression for the textbox â'PPPSâ' refers to the report item â'JPPPSâ'. Report
item expressions can only refer to other report items within the same
grouping scope or a containing grouping scope.
Thanks, Leo
"Bruce L-C [MVP]" wrote:
> Try some more parends. It looks like it is including the > as part of the
> calculation of what to divide. Add a set of parends on either side of the >.
> =IIF ((ReportItems!JobPriceS.Value / (Fields!Pieces.Value +
> Fields!SetupPieces.Value)) > ((Fields!TrussPrices.Value, "DataSet1") /
> (Fields!Pieces.Value + Fields!SetupPieces.Value))
> ,"Red","White"))
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>
> "TrussworksLeo" <Leo@.noemail.noemail> wrote in message
> news:A9C729D2-FFF6-4A08-A920-C48BA786CA8A@.microsoft.com...
> > I think I am getting this error because it cant interpet the Dataset
> option?
> > Is this a bug or am I doing somthing wrong?
> >
> > Statment:
> > =IIF (ReportItems!JobPriceS.Value / (Fields!Pieces.Value +
> > Fields!SetupPieces.Value) > (Fields!TrussPrices.Value, "DataSet1") /
> > (Fields!Pieces.Value + Fields!SetupPieces.Value)
> > ,"Red","White"))
> >
> > Error:
> > w:\trussworks reports\plant reports\Piece Compare.rdl The background color
> > expression for the textbox 'textbox13' contains an error: [BC30455]
> Argument
> > not specified for parameter 'FalsePart' of 'Public Function IIf(Expression
> As
> > Boolean, TruePart As Object, FalsePart As Object) As Object'.
> >
> >
> >
> >
> > --
> > Thank You, Leo
>
>|||Ahh yes, but notice that the error has changed. What I showed you was the
first problem. Now you are seeing a scoping issue. How many rows are in
these datasets. If there is just a single row in each then use First
function first(fields!trussprices.value, "DataSet1").
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"TrussworksLeo" <Leo@.noemail.noemail> wrote in message
news:E839C314-C674-42CD-8560-7756EA5F7BDC@.microsoft.com...
> Bruce,
> That is not working. It still says
> Argument not specified for parameter 'FalsePart' of 'Public Function
> IIf(Expression As Boolean, TruePart As Object, FalsePart As Object) As
> Object'.
> I try to compare two fields from two different data sets and get:
> w:\trussworks reports\plant reports\Piece Compare.rdl The background color
> expression for the textbox 'PPPS' refers to the report item 'JPPPS'.
Report
> item expressions can only refer to other report items within the same
> grouping scope or a containing grouping scope.
> Thanks, Leo
> "Bruce L-C [MVP]" wrote:
> > Try some more parends. It looks like it is including the > as part of
the
> > calculation of what to divide. Add a set of parends on either side of
the >.
> >
> > =IIF ((ReportItems!JobPriceS.Value / (Fields!Pieces.Value +
> > Fields!SetupPieces.Value)) > ((Fields!TrussPrices.Value, "DataSet1") /
> > (Fields!Pieces.Value + Fields!SetupPieces.Value))
> > ,"Red","White"))
> >
> > --
> > Bruce Loehle-Conger
> > MVP SQL Server Reporting Services
> >
> >
> > "TrussworksLeo" <Leo@.noemail.noemail> wrote in message
> > news:A9C729D2-FFF6-4A08-A920-C48BA786CA8A@.microsoft.com...
> > > I think I am getting this error because it cant interpet the Dataset
> > option?
> > > Is this a bug or am I doing somthing wrong?
> > >
> > > Statment:
> > > =IIF (ReportItems!JobPriceS.Value / (Fields!Pieces.Value +
> > > Fields!SetupPieces.Value) > (Fields!TrussPrices.Value, "DataSet1") /
> > > (Fields!Pieces.Value + Fields!SetupPieces.Value)
> > > ,"Red","White"))
> > >
> > > Error:
> > > w:\trussworks reports\plant reports\Piece Compare.rdl The background
color
> > > expression for the textbox 'textbox13' contains an error: [BC30455]
> > Argument
> > > not specified for parameter 'FalsePart' of 'Public Function
IIf(Expression
> > As
> > > Boolean, TruePart As Object, FalsePart As Object) As Object'.
> > >
> > >
> > >
> > >
> > > --
> > > Thank You, Leo
> >
> >
> >|||There are multiple rows.
I only get the scope error when I use the ReportItems Collection. Not when I
try without it.
"Bruce L-C [MVP]" wrote:
> Ahh yes, but notice that the error has changed. What I showed you was the
> first problem. Now you are seeing a scoping issue. How many rows are in
> these datasets. If there is just a single row in each then use First
> function first(fields!trussprices.value, "DataSet1").
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>
> "TrussworksLeo" <Leo@.noemail.noemail> wrote in message
> news:E839C314-C674-42CD-8560-7756EA5F7BDC@.microsoft.com...
> > Bruce,
> >
> > That is not working. It still says
> > Argument not specified for parameter 'FalsePart' of 'Public Function
> > IIf(Expression As Boolean, TruePart As Object, FalsePart As Object) As
> > Object'.
> >
> > I try to compare two fields from two different data sets and get:
> > w:\trussworks reports\plant reports\Piece Compare.rdl The background color
> > expression for the textbox 'PPPS' refers to the report item 'JPPPS'.
> Report
> > item expressions can only refer to other report items within the same
> > grouping scope or a containing grouping scope.
> >
> > Thanks, Leo
> > "Bruce L-C [MVP]" wrote:
> >
> > > Try some more parends. It looks like it is including the > as part of
> the
> > > calculation of what to divide. Add a set of parends on either side of
> the >.
> > >
> > > =IIF ((ReportItems!JobPriceS.Value / (Fields!Pieces.Value +
> > > Fields!SetupPieces.Value)) > ((Fields!TrussPrices.Value, "DataSet1") /
> > > (Fields!Pieces.Value + Fields!SetupPieces.Value))
> > > ,"Red","White"))
> > >
> > > --
> > > Bruce Loehle-Conger
> > > MVP SQL Server Reporting Services
> > >
> > >
> > > "TrussworksLeo" <Leo@.noemail.noemail> wrote in message
> > > news:A9C729D2-FFF6-4A08-A920-C48BA786CA8A@.microsoft.com...
> > > > I think I am getting this error because it cant interpet the Dataset
> > > option?
> > > > Is this a bug or am I doing somthing wrong?
> > > >
> > > > Statment:
> > > > =IIF (ReportItems!JobPriceS.Value / (Fields!Pieces.Value +
> > > > Fields!SetupPieces.Value) > (Fields!TrussPrices.Value, "DataSet1") /
> > > > (Fields!Pieces.Value + Fields!SetupPieces.Value)
> > > > ,"Red","White"))
> > > >
> > > > Error:
> > > > w:\trussworks reports\plant reports\Piece Compare.rdl The background
> color
> > > > expression for the textbox 'textbox13' contains an error: [BC30455]
> > > Argument
> > > > not specified for parameter 'FalsePart' of 'Public Function
> IIf(Expression
> > > As
> > > > Boolean, TruePart As Object, FalsePart As Object) As Object'.
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Thank You, Leo
> > >
> > >
> > >
>
>|||I'm having trouble understanding what you are trying to do. RS can have
multiple datasets but they each are in their own region and if you cross
regions you need to use First, or Sum or something like that. When I look at
the formula you have how would the system know which row you are referencing
if the datasets have multiple rows.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"TrussworksLeo" <Leo@.noemail.noemail> wrote in message
news:5FAABABF-5AD0-45D6-9F8A-B1B11DB67B95@.microsoft.com...
> There are multiple rows.
> I only get the scope error when I use the ReportItems Collection. Not when
> I
> try without it.
> "Bruce L-C [MVP]" wrote:
>> Ahh yes, but notice that the error has changed. What I showed you was the
>> first problem. Now you are seeing a scoping issue. How many rows are in
>> these datasets. If there is just a single row in each then use First
>> function first(fields!trussprices.value, "DataSet1").
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>>
>> "TrussworksLeo" <Leo@.noemail.noemail> wrote in message
>> news:E839C314-C674-42CD-8560-7756EA5F7BDC@.microsoft.com...
>> > Bruce,
>> >
>> > That is not working. It still says
>> > Argument not specified for parameter 'FalsePart' of 'Public Function
>> > IIf(Expression As Boolean, TruePart As Object, FalsePart As Object) As
>> > Object'.
>> >
>> > I try to compare two fields from two different data sets and get:
>> > w:\trussworks reports\plant reports\Piece Compare.rdl The background
>> > color
>> > expression for the textbox 'PPPS' refers to the report item 'JPPPS'.
>> Report
>> > item expressions can only refer to other report items within the same
>> > grouping scope or a containing grouping scope.
>> >
>> > Thanks, Leo
>> > "Bruce L-C [MVP]" wrote:
>> >
>> > > Try some more parends. It looks like it is including the > as part of
>> the
>> > > calculation of what to divide. Add a set of parends on either side of
>> the >.
>> > >
>> > > =IIF ((ReportItems!JobPriceS.Value / (Fields!Pieces.Value +
>> > > Fields!SetupPieces.Value)) > ((Fields!TrussPrices.Value, "DataSet1")
>> > > /
>> > > (Fields!Pieces.Value + Fields!SetupPieces.Value))
>> > > ,"Red","White"))
>> > >
>> > > --
>> > > Bruce Loehle-Conger
>> > > MVP SQL Server Reporting Services
>> > >
>> > >
>> > > "TrussworksLeo" <Leo@.noemail.noemail> wrote in message
>> > > news:A9C729D2-FFF6-4A08-A920-C48BA786CA8A@.microsoft.com...
>> > > > I think I am getting this error because it cant interpet the
>> > > > Dataset
>> > > option?
>> > > > Is this a bug or am I doing somthing wrong?
>> > > >
>> > > > Statment:
>> > > > =IIF (ReportItems!JobPriceS.Value / (Fields!Pieces.Value +
>> > > > Fields!SetupPieces.Value) > (Fields!TrussPrices.Value, "DataSet1")
>> > > > /
>> > > > (Fields!Pieces.Value + Fields!SetupPieces.Value)
>> > > > ,"Red","White"))
>> > > >
>> > > > Error:
>> > > > w:\trussworks reports\plant reports\Piece Compare.rdl The
>> > > > background
>> color
>> > > > expression for the textbox 'textbox13' contains an error: [BC30455]
>> > > Argument
>> > > > not specified for parameter 'FalsePart' of 'Public Function
>> IIf(Expression
>> > > As
>> > > > Boolean, TruePart As Object, FalsePart As Object) As Object'.
>> > > >
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > > Thank You, Leo
>> > >
>> > >
>> > >
>>|||I have the datasets in such an order where the data lines up like I would
like(Production Order to Sales Order) I need to compare a value from one to
the other and change the backround color if they dont match or if the wrong
one is greater than the other.
I cant use the first statement because it is not the only record returned. I
would like it to compare the current row against the current row.
Shouldnt this statement work?
=IIF(Fields!TrussPrices.Value, "DataSet1") / ((Fields!SetupPieces.Value,
"DataSet1") + (Fields!Pieces.Value, "DataSet1")))
>
(Fields!TrussPrices.Value, "ProductionOrders") / ((Fields!SetupPieces.Value,
"ProductionOrders") + (Fields!Pieces.Value, "ProductionOrders")))
Why am I getting this error? Cant it handle the Datset Parameter?
w:\trussworks reports\plant reports\Piece Compare.rdl The background color
expression for the textbox â'PPPSâ' contains an error: [BC30455] Argument not
specified for parameter 'FalsePart' of 'Public Function IIf(Expression As
Boolean, TruePart As Object, FalsePart As Object) As Object'.
To try to get around this problem I tried the ReportItems Collection but
this will not work either?
Thanks for the Help...
Leo
"Bruce L-C [MVP]" wrote:
> I'm having trouble understanding what you are trying to do. RS can have
> multiple datasets but they each are in their own region and if you cross
> regions you need to use First, or Sum or something like that. When I look at
> the formula you have how would the system know which row you are referencing
> if the datasets have multiple rows.
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "TrussworksLeo" <Leo@.noemail.noemail> wrote in message
> news:5FAABABF-5AD0-45D6-9F8A-B1B11DB67B95@.microsoft.com...
> > There are multiple rows.
> >
> > I only get the scope error when I use the ReportItems Collection. Not when
> > I
> > try without it.
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> Ahh yes, but notice that the error has changed. What I showed you was the
> >> first problem. Now you are seeing a scoping issue. How many rows are in
> >> these datasets. If there is just a single row in each then use First
> >> function first(fields!trussprices.value, "DataSet1").
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >>
> >> "TrussworksLeo" <Leo@.noemail.noemail> wrote in message
> >> news:E839C314-C674-42CD-8560-7756EA5F7BDC@.microsoft.com...
> >> > Bruce,
> >> >
> >> > That is not working. It still says
> >> > Argument not specified for parameter 'FalsePart' of 'Public Function
> >> > IIf(Expression As Boolean, TruePart As Object, FalsePart As Object) As
> >> > Object'.
> >> >
> >> > I try to compare two fields from two different data sets and get:
> >> > w:\trussworks reports\plant reports\Piece Compare.rdl The background
> >> > color
> >> > expression for the textbox 'PPPS' refers to the report item 'JPPPS'.
> >> Report
> >> > item expressions can only refer to other report items within the same
> >> > grouping scope or a containing grouping scope.
> >> >
> >> > Thanks, Leo
> >> > "Bruce L-C [MVP]" wrote:
> >> >
> >> > > Try some more parends. It looks like it is including the > as part of
> >> the
> >> > > calculation of what to divide. Add a set of parends on either side of
> >> the >.
> >> > >
> >> > > =IIF ((ReportItems!JobPriceS.Value / (Fields!Pieces.Value +
> >> > > Fields!SetupPieces.Value)) > ((Fields!TrussPrices.Value, "DataSet1")
> >> > > /
> >> > > (Fields!Pieces.Value + Fields!SetupPieces.Value))
> >> > > ,"Red","White"))
> >> > >
> >> > > --
> >> > > Bruce Loehle-Conger
> >> > > MVP SQL Server Reporting Services
> >> > >
> >> > >
> >> > > "TrussworksLeo" <Leo@.noemail.noemail> wrote in message
> >> > > news:A9C729D2-FFF6-4A08-A920-C48BA786CA8A@.microsoft.com...
> >> > > > I think I am getting this error because it cant interpet the
> >> > > > Dataset
> >> > > option?
> >> > > > Is this a bug or am I doing somthing wrong?
> >> > > >
> >> > > > Statment:
> >> > > > =IIF (ReportItems!JobPriceS.Value / (Fields!Pieces.Value +
> >> > > > Fields!SetupPieces.Value) > (Fields!TrussPrices.Value, "DataSet1")
> >> > > > /
> >> > > > (Fields!Pieces.Value + Fields!SetupPieces.Value)
> >> > > > ,"Red","White"))
> >> > > >
> >> > > > Error:
> >> > > > w:\trussworks reports\plant reports\Piece Compare.rdl The
> >> > > > background
> >> color
> >> > > > expression for the textbox 'textbox13' contains an error: [BC30455]
> >> > > Argument
> >> > > > not specified for parameter 'FalsePart' of 'Public Function
> >> IIf(Expression
> >> > > As
> >> > > > Boolean, TruePart As Object, FalsePart As Object) As Object'.
> >> > > >
> >> > > >
> >> > > >
> >> > > >
> >> > > > --
> >> > > > Thank You, Leo
> >> > >
> >> > >
> >> > >
> >>
> >>
> >>
>
>|||Although it makes sense to you because you know that the two datasets line
up, there is no way for RS to know this. There is no way to take the value
from row N from one table and row N from another table and do a calculation.
RS does not allow this sort of thing between two different data regions. You
need to look at the problem in some other way to solve it. Perhaps a stored
procedure? Also you can create a mega dataset and use lists. I have seen
people solve the two dataset problem this way but it is not a technique I
have personally used so I can't be of much more help (other than letting you
know that you can't solve it in the direction you are currently going).
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"TrussworksLeo" <Leo@.noemail.noemail> wrote in message
news:C1B943CA-4B5E-48F3-A86D-74E98F6A72B5@.microsoft.com...
> I have the datasets in such an order where the data lines up like I would
> like(Production Order to Sales Order) I need to compare a value from one
to
> the other and change the backround color if they dont match or if the
wrong
> one is greater than the other.
> I cant use the first statement because it is not the only record returned.
I
> would like it to compare the current row against the current row.
> Shouldnt this statement work?
> =IIF(Fields!TrussPrices.Value, "DataSet1") / ((Fields!SetupPieces.Value,
> "DataSet1") + (Fields!Pieces.Value, "DataSet1")))
> >
> (Fields!TrussPrices.Value, "ProductionOrders") /
((Fields!SetupPieces.Value,
> "ProductionOrders") + (Fields!Pieces.Value, "ProductionOrders")))
> Why am I getting this error? Cant it handle the Datset Parameter?
> w:\trussworks reports\plant reports\Piece Compare.rdl The background color
> expression for the textbox 'PPPS' contains an error: [BC30455] Argument
not
> specified for parameter 'FalsePart' of 'Public Function IIf(Expression As
> Boolean, TruePart As Object, FalsePart As Object) As Object'.
> To try to get around this problem I tried the ReportItems Collection but
> this will not work either?
> Thanks for the Help...
> Leo
>
>
> "Bruce L-C [MVP]" wrote:
> > I'm having trouble understanding what you are trying to do. RS can have
> > multiple datasets but they each are in their own region and if you cross
> > regions you need to use First, or Sum or something like that. When I
look at
> > the formula you have how would the system know which row you are
referencing
> > if the datasets have multiple rows.
> >
> > Bruce Loehle-Conger
> > MVP SQL Server Reporting Services
> >
> > "TrussworksLeo" <Leo@.noemail.noemail> wrote in message
> > news:5FAABABF-5AD0-45D6-9F8A-B1B11DB67B95@.microsoft.com...
> > > There are multiple rows.
> > >
> > > I only get the scope error when I use the ReportItems Collection. Not
when
> > > I
> > > try without it.
> > >
> > > "Bruce L-C [MVP]" wrote:
> > >
> > >> Ahh yes, but notice that the error has changed. What I showed you was
the
> > >> first problem. Now you are seeing a scoping issue. How many rows are
in
> > >> these datasets. If there is just a single row in each then use First
> > >> function first(fields!trussprices.value, "DataSet1").
> > >>
> > >> --
> > >> Bruce Loehle-Conger
> > >> MVP SQL Server Reporting Services
> > >>
> > >>
> > >> "TrussworksLeo" <Leo@.noemail.noemail> wrote in message
> > >> news:E839C314-C674-42CD-8560-7756EA5F7BDC@.microsoft.com...
> > >> > Bruce,
> > >> >
> > >> > That is not working. It still says
> > >> > Argument not specified for parameter 'FalsePart' of 'Public
Function
> > >> > IIf(Expression As Boolean, TruePart As Object, FalsePart As Object)
As
> > >> > Object'.
> > >> >
> > >> > I try to compare two fields from two different data sets and get:
> > >> > w:\trussworks reports\plant reports\Piece Compare.rdl The
background
> > >> > color
> > >> > expression for the textbox 'PPPS' refers to the report item
'JPPPS'.
> > >> Report
> > >> > item expressions can only refer to other report items within the sa
me
> > >> > grouping scope or a containing grouping scope.
> > >> >
> > >> > Thanks, Leo
> > >> > "Bruce L-C [MVP]" wrote:
> > >> >
> > >> > > Try some more parends. It looks like it is including the > as
part of
> > >> the
> > >> > > calculation of what to divide. Add a set of parends on either
side of
> > >> the >.
> > >> > >
> > >> > > =IIF ((ReportItems!JobPriceS.Value / (Fields!Pieces.Value +
> > >> > > Fields!SetupPieces.Value)) > ((Fields!TrussPrices.Value,
"DataSet1")
> > >> > > /
> > >> > > (Fields!Pieces.Value + Fields!SetupPieces.Value))
> > >> > > ,"Red","White"))
> > >> > >
> > >> > > --
> > >> > > Bruce Loehle-Conger
> > >> > > MVP SQL Server Reporting Services
> > >> > >
> > >> > >
> > >> > > "TrussworksLeo" <Leo@.noemail.noemail> wrote in message
> > >> > > news:A9C729D2-FFF6-4A08-A920-C48BA786CA8A@.microsoft.com...
> > >> > > > I think I am getting this error because it cant interpet the
> > >> > > > Dataset
> > >> > > option?
> > >> > > > Is this a bug or am I doing somthing wrong?
> > >> > > >
> > >> > > > Statment:
> > >> > > > =IIF (ReportItems!JobPriceS.Value / (Fields!Pieces.Value +
> > >> > > > Fields!SetupPieces.Value) > (Fields!TrussPrices.Value,
"DataSet1")
> > >> > > > /
> > >> > > > (Fields!Pieces.Value + Fields!SetupPieces.Value)
> > >> > > > ,"Red","White"))
> > >> > > >
> > >> > > > Error:
> > >> > > > w:\trussworks reports\plant reports\Piece Compare.rdl The
> > >> > > > background
> > >> color
> > >> > > > expression for the textbox 'textbox13' contains an error:
[BC30455]
> > >> > > Argument
> > >> > > > not specified for parameter 'FalsePart' of 'Public Function
> > >> IIf(Expression
> > >> > > As
> > >> > > > Boolean, TruePart As Object, FalsePart As Object) As Object'.
> > >> > > >
> > >> > > >
> > >> > > >
> > >> > > >
> > >> > > > --
> > >> > > > Thank You, Leo
> > >> > >
> > >> > >
> > >> > >
> > >>
> > >>
> > >>
> >
> >
> >|||Thank You....I appreciate your help.
"Bruce L-C [MVP]" wrote:
> Although it makes sense to you because you know that the two datasets line
> up, there is no way for RS to know this. There is no way to take the value
> from row N from one table and row N from another table and do a calculation.
> RS does not allow this sort of thing between two different data regions. You
> need to look at the problem in some other way to solve it. Perhaps a stored
> procedure? Also you can create a mega dataset and use lists. I have seen
> people solve the two dataset problem this way but it is not a technique I
> have personally used so I can't be of much more help (other than letting you
> know that you can't solve it in the direction you are currently going).
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "TrussworksLeo" <Leo@.noemail.noemail> wrote in message
> news:C1B943CA-4B5E-48F3-A86D-74E98F6A72B5@.microsoft.com...
> > I have the datasets in such an order where the data lines up like I would
> > like(Production Order to Sales Order) I need to compare a value from one
> to
> > the other and change the backround color if they dont match or if the
> wrong
> > one is greater than the other.
> >
> > I cant use the first statement because it is not the only record returned.
> I
> > would like it to compare the current row against the current row.
> >
> > Shouldnt this statement work?
> > =IIF(Fields!TrussPrices.Value, "DataSet1") / ((Fields!SetupPieces.Value,
> > "DataSet1") + (Fields!Pieces.Value, "DataSet1")))
> > >
> > (Fields!TrussPrices.Value, "ProductionOrders") /
> ((Fields!SetupPieces.Value,
> > "ProductionOrders") + (Fields!Pieces.Value, "ProductionOrders")))
> >
> > Why am I getting this error? Cant it handle the Datset Parameter?
> > w:\trussworks reports\plant reports\Piece Compare.rdl The background color
> > expression for the textbox 'PPPS' contains an error: [BC30455] Argument
> not
> > specified for parameter 'FalsePart' of 'Public Function IIf(Expression As
> > Boolean, TruePart As Object, FalsePart As Object) As Object'.
> >
> > To try to get around this problem I tried the ReportItems Collection but
> > this will not work either?
> >
> > Thanks for the Help...
> >
> > Leo
> >
> >
> >
> >
> > "Bruce L-C [MVP]" wrote:
> >
> > > I'm having trouble understanding what you are trying to do. RS can have
> > > multiple datasets but they each are in their own region and if you cross
> > > regions you need to use First, or Sum or something like that. When I
> look at
> > > the formula you have how would the system know which row you are
> referencing
> > > if the datasets have multiple rows.
> > >
> > > Bruce Loehle-Conger
> > > MVP SQL Server Reporting Services
> > >
> > > "TrussworksLeo" <Leo@.noemail.noemail> wrote in message
> > > news:5FAABABF-5AD0-45D6-9F8A-B1B11DB67B95@.microsoft.com...
> > > > There are multiple rows.
> > > >
> > > > I only get the scope error when I use the ReportItems Collection. Not
> when
> > > > I
> > > > try without it.
> > > >
> > > > "Bruce L-C [MVP]" wrote:
> > > >
> > > >> Ahh yes, but notice that the error has changed. What I showed you was
> the
> > > >> first problem. Now you are seeing a scoping issue. How many rows are
> in
> > > >> these datasets. If there is just a single row in each then use First
> > > >> function first(fields!trussprices.value, "DataSet1").
> > > >>
> > > >> --
> > > >> Bruce Loehle-Conger
> > > >> MVP SQL Server Reporting Services
> > > >>
> > > >>
> > > >> "TrussworksLeo" <Leo@.noemail.noemail> wrote in message
> > > >> news:E839C314-C674-42CD-8560-7756EA5F7BDC@.microsoft.com...
> > > >> > Bruce,
> > > >> >
> > > >> > That is not working. It still says
> > > >> > Argument not specified for parameter 'FalsePart' of 'Public
> Function
> > > >> > IIf(Expression As Boolean, TruePart As Object, FalsePart As Object)
> As
> > > >> > Object'.
> > > >> >
> > > >> > I try to compare two fields from two different data sets and get:
> > > >> > w:\trussworks reports\plant reports\Piece Compare.rdl The
> background
> > > >> > color
> > > >> > expression for the textbox 'PPPS' refers to the report item
> 'JPPPS'.
> > > >> Report
> > > >> > item expressions can only refer to other report items within the sa
> me
> > > >> > grouping scope or a containing grouping scope.
> > > >> >
> > > >> > Thanks, Leo
> > > >> > "Bruce L-C [MVP]" wrote:
> > > >> >
> > > >> > > Try some more parends. It looks like it is including the > as
> part of
> > > >> the
> > > >> > > calculation of what to divide. Add a set of parends on either
> side of
> > > >> the >.
> > > >> > >
> > > >> > > =IIF ((ReportItems!JobPriceS.Value / (Fields!Pieces.Value +
> > > >> > > Fields!SetupPieces.Value)) > ((Fields!TrussPrices.Value,
> "DataSet1")
> > > >> > > /
> > > >> > > (Fields!Pieces.Value + Fields!SetupPieces.Value))
> > > >> > > ,"Red","White"))
> > > >> > >
> > > >> > > --
> > > >> > > Bruce Loehle-Conger
> > > >> > > MVP SQL Server Reporting Services
> > > >> > >
> > > >> > >
> > > >> > > "TrussworksLeo" <Leo@.noemail.noemail> wrote in message
> > > >> > > news:A9C729D2-FFF6-4A08-A920-C48BA786CA8A@.microsoft.com...
> > > >> > > > I think I am getting this error because it cant interpet the
> > > >> > > > Dataset
> > > >> > > option?
> > > >> > > > Is this a bug or am I doing somthing wrong?
> > > >> > > >
> > > >> > > > Statment:
> > > >> > > > =IIF (ReportItems!JobPriceS.Value / (Fields!Pieces.Value +
> > > >> > > > Fields!SetupPieces.Value) > (Fields!TrussPrices.Value,
> "DataSet1")
> > > >> > > > /
> > > >> > > > (Fields!Pieces.Value + Fields!SetupPieces.Value)
> > > >> > > > ,"Red","White"))
> > > >> > > >
> > > >> > > > Error:
> > > >> > > > w:\trussworks reports\plant reports\Piece Compare.rdl The
> > > >> > > > background
> > > >> color
> > > >> > > > expression for the textbox 'textbox13' contains an error:
> [BC30455]
> > > >> > > Argument
> > > >> > > > not specified for parameter 'FalsePart' of 'Public Function
> > > >> IIf(Expression
> > > >> > > As
> > > >> > > > Boolean, TruePart As Object, FalsePart As Object) As Object'.
> > > >> > > >
> > > >> > > >
> > > >> > > >
> > > >> > > >
> > > >> > > > --
> > > >> > > > Thank You, Leo
> > > >> > >
> > > >> > >
> > > >> > >
> > > >>
> > > >>
> > > >>
> > >
> > >
> > >
>
>