Using CR in .NET 2003...
I have a stored procedure that performs 2 different selects.
The first selects records to print in CR. The second selects report parms
entered into a asp.net form.
The trouble I'm having is that, in the page header of the CR, I want to print the parameters the user input from the asp.net form... but if it is a report with no data from the first select, the report parameters from the second select don't print either.
What I need to have happen is that the report parameters from the 2nd select print, regardless of whether there is any data for the report.
Here is what the SP looks like:
---------------------------------------------------
CREATE PROCEDURE spITIlocStockSummRpt
@sprojNum varchar(5),
@sprojName varchar(150),
@slocNum bigint,
@slocName varchar(150)
AS
DECLARE @parmItems TABLE
(
projCode varchar(25),
projName varchar(150),
locNum bigint,
locName varchar(150)
)
INSERT INTO @parmItems (projCode, projName, locNum, locName) VALUES (@sprojNum, @sprojName, @slocNum, @slocName)
SELECT pli.ITIprodCode, pli.qtyIN, p.prodName, p.vendprodCode, p.prodUOM, v.vndName, ptc.productTransactionCnt
FROM ProjectLocationInventory pli LEFT OUTER JOIN ITIProductTransCntByProject ptc ON ptc.projCode = pli.projCode AND ptc.ITIprodCode = pli.ITIprodCode AND ptc.projCode = @sprojNum, ITIProducts p, ITIvendors v
WHERE pli.projCode = @sprojNum
AND pli.plID = @slocNum
AND p.ITIprodCode = pli.ITIprodCode
AND v.vndCode = p.vendCode
ORDER BY p.prodName;
SELECT projCode, projName, locNum, locName
FROM @parmItems
GO
---------------------------------------------------
So, the values from the select against the @parmItems need to print in the report, regardless of whether there is data from the other select.
Both tables, with fields, show up in the CR database viewer.
Help, this is driving me nuts!