i am using the express version of report sharpshooter. i can create simple reports with no parent/child relations by just dropping a BBS onto the form and setting it up. Tho i dont see a possibility to set up a parent-child relationship between two bbs objects in a way that report sharpshooter understands.
any ideas ?
thanks.
Hi Philipp,
I handle that scenario by creating an SQL statement that will allow me to get the child records for the selected parent PK. Here is one of my method for a Service Call Profile report:
''' <summary>''' Retrieves all of the recods that will be used within the Service Call Profile Report (rptServiceCallProfile.rst)''' </summary>''' <param name="PK_ServiceCalls"></param>''' <param name="includeServiceCallRecord"></param>''' <returns></returns>''' <remarks></remarks>Public Shared Function ServiceCallProfileReport_AllData(ByVal PK_ServiceCalls As Integer, ByVal includeServiceCallRecord As Boolean) As SqlCommand '-- Establish Locals Dim cmd As New SqlCommand() '-- Determine if the Service Call record will be included If includeServiceCallRecord Then cmd.CommandText = "SELECT dbo.ServiceCalls.* FROM dbo.ServiceCalls WHERE dbo.ServiceCalls.PK_ServiceCalls = @PK_ServiceCalls;" End If '-- Add the Service Call Appliances query for the selected Service Call PK, ordered by the Appliance Service Date. cmd.CommandText &= "SELECT dbo.SC_Appliances.* " & _ "FROM dbo.SC_Appliances " & _ "LEFT JOIN dbo.ServiceCalls ON (dbo.ServiceCalls.PK_ServiceCalls = dbo.SC_Appliances.FK_ServiceCalls) " & _ "WHERE (dbo.ServiceCalls.PK_ServiceCalls = @PK_ServiceCalls)" & _ "ORDER BY dbo.SC_Appliances.ServicedDate;" '-- Add the Service Call Appliance items for the selected service all PK. cmd.CommandText &= "SELECT dbo.SC_AppliancesItems.* FROM dbo.SC_AppliancesItems " & _ "LEFT JOIN dbo.SC_Appliances ON (dbo.SC_AppliancesItems.FK_SC_Appliances = dbo.SC_Appliances.PK_SC_Appliances) " & _ "LEFT JOIN dbo.ServiceCalls ON (dbo.SC_Appliances.FK_ServiceCalls = dbo.ServiceCalls.PK_ServiceCalls) " & _ "WHERE (dbo.ServiceCalls.PK_ServiceCalls = @PK_ServiceCalls)" & _ "ORDER BY dbo.SC_AppliancesItems.ItemType, dbo.SC_AppliancesItems.ServicedDate;" '-- Create the parms cmd.Parameters.AddWithValue("@PK_ServiceCalls", PK_ServiceCalls).SqlDbType = SqlDbType.Int '-- Return the results Return cmdEnd Function
cmd.CommandText =
cmd.CommandText &=
cmd.Parameters.AddWithValue(
Hope this help you out!