Toad World® Forums

FastReport parameter pass from dialogbox to query

hi, i have a problem with parameter passing to my report’s query.

the whole query:

SELECT ROWID, USERID, LAUF_NR, TEXT_ZEILE
FROM KDBADM.KLBV151
Where USERID LIKE ‘%’ || :param1 || ‘%’;

the parameter:
Name: param1
Type: String
Value(Literal):
Value(Expression): [WUSERID.Text]

the dialog has only a textfield (WUSERID) and a button OK.

if i try run the report it say: ORA-00936: missing expression

and show me the :param1 value.

what do i wrong?

I can’t quite tell what you are trying to achieve. What is WUSERID? Is that a column in the same KLBV151 table? What is .Text? A column in that table? If so, you need to join these two tables, and you don’t need any parameters at all. If you just want to stick a value in for Param1, use “Value(Literal)” instead.

Look at some of the sample reports to see how Value(Expression) and Value(Literal) are meant to be used.

yes, you have right, i did not tell exactly, what i want.

if i start my report i want to start with the dialog box, where i can give an input for the query.

i call it in the query as param1 and in the dialogbox called WUSERID as Text field.

with the value(expression) i’d like they two variable bring together.

for example if i fill the textfield of dialog with ‘aaa’ then the report will list all the rows Where USERID LIKE ‘%’ || :param1 || ‘%’

i hope i wrote it clearly. is it possible to do it?

i searched a half day to found any query like i want, but i did not found…

Well, it’s not a popup dialog, but you can define variables like this (see attachment)

Main Menu -> Reports -> Reports Manager

From: tibro1977 [mailto:bounce-tibro1977@toadworld.com]

Sent: Thursday, September 04, 2014 7:41 AM

To: toadoracle@toadworld.com

Subject: RE: [Toad for Oracle - Discussion Forum] FastReport parameter pass from dialogbox to query

RE: FastReport parameter pass from dialogbox to query

Reply by tibro1977

yes, you have right, i did not tell exactly, what i want.

if i start my report i want to start with the dialog box, where i can give an input for the query.

i call it in the query as param1 and in the dialogbox called WUSERID as Text field.

with the value(expression) i’d like they two variable bring together.

for example if i fill the textfield of dialog with ‘aaa’ then the report will list all the rows Where USERID LIKE ‘%’ || :param1 || ‘%’

i hope i wrote it clearly. is it possible to do it?

i searched a half day to found any query like i want, but i did not found…

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.

this way i know already, but i wanted do a little bit user-friendly, because it will run by not DB-experte.

Sorry, there is no way to make a custom prompt for variables in the reports. But I do have a few suggestions on how to make it more user friendly:

  1. rather than param1, call the variable something meaningful

  2. Add some comments to the SQL, not to explain the SQL, but as a place for instructions to the user.

therefore did i not found any docs or videos for this solutions.

thank you!