Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 334
  • Last Modified:

Array Parameter Problem.

Hi All.

1- I have a report to show all the Sales Product and Return Product  grouped with WSNumber , And I define Two Parameter as  shown below :
   A -  Transaction Type    ( String Parameter and have Three Default Value  ( All - Sales - Return )
   B -  WS Number  ( it's String Parameter and have default value ( ALL ) , but the data in DB for this Field is Number Format )

First Q :  please let me know how can i retrive the default value of WSNumber automatically based on Selection in TransactionType
 ( somthing like this :  I choose Sales and WSNumber Defult value show me the ComboBox With  All-1-2-3-7  , and if i choose Return  it shows  All-4-5-6-8-9 )

Second Q : And I want to choose Multiple WsNumber Based On Transaction . for that i define the WSNumber as  (Allow Multiple Value ) but when i use this Formulla to Retrive All or somthing i select in WS i have an Erorr :

The Formulla i Used to Accept Letter -All-  For my Selection  :


if {?Transaction Type} = "All"   AND  {?WS Number} = "All" Then  
      TRUE
else
if {?Transaction Type} = "All"   AND  {?WS Number}  <> "All" Then

   {Deposit.DepositNumber} = ToNumber({?WS Number})
else
if {?Transaction Type} <> "All"   AND  {?WS Number}  = "All" Then

   ({Deposit.TransactionType} = {?Transaction Type})
else
if {?Transaction Type} <> "All"   AND  {?WS Number}  <> "All" Then
   ({Deposit.TransactionType} = {?Transaction Type})
    AND
{Deposit.DepositNumber} = ToNumber({?WS Number})


I have a deadline to create this report ( i must prepare it for Monday Morning ....)

Please Help Me ... ( Sorry For Low Point I gave for this Q , I dont have any kind of Credit Card ( they are not allowed in My Country ) And I cant buy forther Points
 (I Collect this by answring  the other Q)  ... Please Forgive My Bad English, Low Point , High Emergency , and maybe dificult Soloution.

Mohammad Pourebtehaj
0
gad_fly
Asked:
gad_fly
  • 10
  • 9
1 Solution
 
gad_flyAuthor Commented:

I forgot To Say the Error is giving to me in Crystal Reports is

This Array Must Be Subscripted ...

I know i must define the WSnumber in my formulla as Array but i dont Know How and How can i check the user for  : ( if he select ALL and some number the report create with ALL Records and ignore other selection .  

Thanks
0
 
mlmccCommented:
Q1 - What version of Crystal.  YOu need CR XI to have dynamic parameters like you desire.  You could do it in an application by retrieving the values from the database and updating it when the user changes the selection of transaction type.

Q2 - I assume you only get the error if you pass in multiple values.
The problem is your  ToNumber({WS Number}) can't work on an array.  Try it this way

ToText({Deposit.DepositNumber},0) in {?WS Number}

mlmcc
0
 
gad_flyAuthor Commented:
Hi mlmcc :))

First of all thanks for your  help :)

I have Visual Studio Team  Edition  version 8.0.50727.42 (RTM.050727.4200) and My Crystal report is included in it  ( Crystal Reports for Visual Studio 2005  AAC60-G0CSA4B-V7000AY  ) is this CR XI ?!

for the second part  I'll go and change it ..  perhaps it's 99% right ! ( like the other suggestion  you gave to me . )

Thanks

Mohammad Pourebtehaj
0
Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

 
mlmccCommented:
>>is this CR XI ?!
As far as I know it is based on CR 10.

mlmcc
0
 
gad_flyAuthor Commented:
Oh no ............

is there any chance to do this Wihout the XI ?

 
0
 
gad_flyAuthor Commented:
For the second part , i have the WSNumber in number format ... you say i change it to :" ToText({Deposit.DepositNumber},0) in {?WS Number}"  

is it ok ?
0
 
mlmccCommented:
Only through the application by opening an recordset in code and presenting the list.

mlmcc
0
 
gad_flyAuthor Commented:
Hi again :)

I buy XI today , but now ,after install this i cant use XI from Visual Studio , it's been using 10 Version !!!

now i have another problem !! how can use the XI looks and programing inside my .Net and when it's solved :) how can i do your Suggestion aboat dynamic parameters ....


Thank you very much .

Mohammad Pourebtehaj
0
 
mlmccCommented:
What Visual Studio?

mlmcc
0
 
gad_flyAuthor Commented:

hi


Microsoft Visual Studio 2005 and i am using C# for my programing  and SQL 2000 for DB source .

thanks

Mohammad Pourebtehaj
0
 
mlmccCommented:
You need to download release 2 of CR XI.  I searched the Crystal site and can't find it.  Is the version you bought Release 2?

If not call Crystal.

mlmcc
0
 
gad_flyAuthor Commented:
i bought this  : Crystal Reports 11.0.0.895  
0
 
mlmccCommented:
I don't know if that is release 2 or not.  I just know that the Crystal XI first released wasn't compatible with VS 2005 and they issued a Release 2.  It used to be available on the web site but I couldn't find it or a reference to it.

mlmcc
0
 
mlmccCommented:
0
 
gad_flyAuthor Commented:
thanks for your advice :)

but can you tel me about :  " how can i do your Suggestion aboat dynamic parameters  "

thanks for your generous help .

Mohammad Pourebtehaj.

P.S : if you have plan to visit my country i am very glad to show you around . :)
0
 
mlmccCommented:
I don't have .Net but the basic idea would be

Add an option box (i think that is the right one) to the form that calls the report
Populate it from the database field you are trying to use
Have the user select one them pass the selection to the report

mlmcc
0
 
mlmccCommented:
Look at this code.  It is in Delphi but it may be useful

http://www.experts-exchange.com/Databases/Crystal_Reports/Q_21804955.html

mlmcc
0
 
gad_flyAuthor Commented:
Hi again.

i download the SP1 and install it but it dosn't work with .net i search everywhere , but i cant find it ...................

by the way, thanks for your all care.

Mohammad Pourebtehaj
0
 
mlmccCommented:
Glad i could help

mlmcc
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 10
  • 9
Tackle projects and never again get stuck behind a technical roadblock.
Join Now