Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 InputBox doesn't work when the report is deployed.

Author  Topic 

emzzz
Starting Member

15 Posts

Posted - 2008-01-28 : 07:25:54
Hello,

I have a report created in MS Reporting Services. Within Visual Studio, the code that I have written to display an InputBox works. However, when I deploy the report to the server, the InputBox is not displayed and the report hangs as it is waiting for my input.

Do I need to set up a security property?

Many thanks.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-01-28 : 10:59:38
where are putting the input box? Can you elaborate more on what you did exactly?
Go to Top of Page

emzzz
Starting Member

15 Posts

Posted - 2008-01-28 : 11:05:47
Yes, it is in the code tab from Report Properties within a function and called from a textbox.

This is the code:

Public Shared Function GetInput(title as String, location as String)
dim valid as boolean
valid = false
Do While (valid = false)
GetInput = InputBox("Enter " & title & " Amount for " & vbCrLf & vbCrLf & location, "Enter Actual Amount")
If (IsNumeric(GetInput)) then
valid = true
else
MsgBox("Please Enter a Valid Amount!", vbExclamation, "Input Error")
end if
Loop
end function

and this is what is the textbox:

=Format(CDbl(Code.GetInput(Fields!TransactionMethod.Value, Fields!LocationName.Value)), "#0.00")


Although this routine works on my local machine, when you go into the expression for the textbox, the GetInput is underlined as an unrecognized identifier.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-01-28 : 11:44:51
To be honest i've never done something like this before. It seems like you are trying to validate the content of textbox here and i think this may be done in a simpler way..I have used custom code but that is only for formatting,calculation of some values. Where's this textbox in report? is it inside some table or container? Also what's the intention behind validation step?
Go to Top of Page

emzzz
Starting Member

15 Posts

Posted - 2008-01-28 : 11:49:51
The textbox that calls the routine is within a table.

The purpose of the validation for the InputBox data entry is to ensure that only a number is passed.

I am trying to do a till reconcillation. My report details what has been taken for each method e.g. cash, cheque and I would like the user to enter what they have in the till. This value is then compared against the data in the database to inform the user whether or not their till balances.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-01-28 : 12:13:22
i dont think you can do like this. I think you could add this as a parameter and then compare this value with value in db.
Go to Top of Page
   

- Advertisement -