Report query parameters
Trying to get this query to ask the user for a text field (logonID) but
it wants a number (int) for US_MD_ID.
Can I make it work;
SELECT
vw_US_User_Software_Assign.sc_sw_Manufacturer,
vw_US_User_Software_Assign.sc_sw_name,
vw_US_User_Software_Assign.sc_sw_Version,
vw_US_User_Software_Assign.US_Empl_ID,
vw_US_User_Software_Assign.MD_Description,
vw_User_Data.Txt_ID,
vw_User_Data.Lastname,
vw_User_Data.Firstname,
vw_rpt_Users_Workstations.Computername,
vw_rpt_Users_Workstations.IPAddress,
vw_rpt_Users_Workstations.Location_City,
vw_rpt_Users_Workstations.Location_State,
vw_rpt_Users_Workstations.MAC,
vw_rpt_Users_Workstations.WKS_Description,
vw_rpt_Users_Workstations.Wks_Lastupdate,
vw_rpt_Users_Workstations.SerialNumber,
vw_GetModelNames.Model,
vw_GetModelNames.Description
FROM
vw_US_User_Software_Assign vw_US_User_Software_Assign
INNER JOIN vw_User_Data vw_User_Data ON
(vw_User_Data.ID = vw_US_User_Software_Assign.US_UD_ID)
INNER JOIN vw_rpt_Users_Workstations vw_rpt_Users_Workstations ON
(vw_rpt_Users_Workstations.UD_ID = vw_US_User_Software_Assign.US_UD_ID)
INNER JOIN vw_GetModelNames vw_GetModelNames ON
(vw_GetModelNames.ID = vw_rpt_Users_Workstations.Model_ID)
WHERE
( vw_US_User_Software_Assign.US_MD_ID =
(SELECT TOP (1) US_MD_ID FROM vw_US_User_Software_Assign AS
vw_US_User_Software_Assign_1
WHERE
(US_UD_ID =
(SELECT TOP (1) ID FROM vw_User_Data AS vw_User_Data_1
WHERE (Txt_ID LIKE '%LogonID%'))))
ORDER BY vw_US_User_Software_Assign.US_Empl_ID,
vw_US_User_Software_Assign.MD_Description,
vw_US_User_Software_Assign.sc_sw_Manufacturer,
vw_US_User_Software_Assign.sc_sw_name
--- posted by geoForum on http://www.newswhat.com
it wants a number (int) for US_MD_ID.
Can I make it work;
SELECT
vw_US_User_Software_Assign.sc_sw_Manufacturer,
vw_US_User_Software_Assign.sc_sw_name,
vw_US_User_Software_Assign.sc_sw_Version,
vw_US_User_Software_Assign.US_Empl_ID,
vw_US_User_Software_Assign.MD_Description,
vw_User_Data.Txt_ID,
vw_User_Data.Lastname,
vw_User_Data.Firstname,
vw_rpt_Users_Workstations.Computername,
vw_rpt_Users_Workstations.IPAddress,
vw_rpt_Users_Workstations.Location_City,
vw_rpt_Users_Workstations.Location_State,
vw_rpt_Users_Workstations.MAC,
vw_rpt_Users_Workstations.WKS_Description,
vw_rpt_Users_Workstations.Wks_Lastupdate,
vw_rpt_Users_Workstations.SerialNumber,
vw_GetModelNames.Model,
vw_GetModelNames.Description
FROM
vw_US_User_Software_Assign vw_US_User_Software_Assign
INNER JOIN vw_User_Data vw_User_Data ON
(vw_User_Data.ID = vw_US_User_Software_Assign.US_UD_ID)
INNER JOIN vw_rpt_Users_Workstations vw_rpt_Users_Workstations ON
(vw_rpt_Users_Workstations.UD_ID = vw_US_User_Software_Assign.US_UD_ID)
INNER JOIN vw_GetModelNames vw_GetModelNames ON
(vw_GetModelNames.ID = vw_rpt_Users_Workstations.Model_ID)
WHERE
( vw_US_User_Software_Assign.US_MD_ID =
(SELECT TOP (1) US_MD_ID FROM vw_US_User_Software_Assign AS
vw_US_User_Software_Assign_1
WHERE
(US_UD_ID =
(SELECT TOP (1) ID FROM vw_User_Data AS vw_User_Data_1
WHERE (Txt_ID LIKE '%LogonID%'))))
ORDER BY vw_US_User_Software_Assign.US_Empl_ID,
vw_US_User_Software_Assign.MD_Description,
vw_US_User_Software_Assign.sc_sw_Manufacturer,
vw_US_User_Software_Assign.sc_sw_name
--- posted by geoForum on http://www.newswhat.com
This discussion has been closed.
Comments
For future reference, please use your real name when posting to these
newsgroups.
I would suggest using a Report Parameter tied to an AutoSearch field in
DADE. You can manually place the parameter in the SQL statement using the
:ParameterName syntax.
http://www.digital-metaphors.com/rbWiki/End-User/Fundamentals/Report_Parameter_Fundamentals
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I replaced
WHERE (Txt_ID LIKE '%LogonID%')
with
WHERE (Txt_ID LIKE :LogonID)
and created a parameter in report designer called 'LogonID'
but depending on what setting it has I get different errors; mostly syntax
error near ')' when I try to save the changes to the SQL edit pane
(since I don't know how to do it on the search pane)
Thanks,
Brian
--- posted by geoForum on http://www.newswhat.com
--- posted by geoForum on http://www.newswhat.com