I have RS 2005 SP1. I have a report model developed and deployed.
I have a scenario and I am not sure if it is possible to create a report for this scenario using the report builder. Let's say I have a customers entity and address entity that is related to the customer's entity as a 1-many relationship. I have the effective date on the address that specifies the date from which the address is effective. A customer will have multiple records in address with the latest effective date as the latest address of the customer.
Suppose, I need to create a report using the report builder to get the list of latest address for customers, how can I do it? I know it can be done using the report designer using a query that uses the group by clause. But can it be done using report builder?
Thanks in advance.
can someone help? Thanks.|||you can just do that in the SQL query in the data set:
Code Snippet
select [customer_name], [Address1],[Address2]
from customer_table ct
inner join (
select customerID,
max(effective_date) as max_date
from address_table
where effective_date < getdate()) as TopAddress
inner join address_table at
on ct.customerID = at.customerID
and at.customerID = TopAddress.CustomerID
and at.effective_date = TopAddress.max_date
This will return all customers with their latest address, excluding any addresses with a future effective date.
There are other ways, eg with embedded sub reports but then, why add the complexity?|||
Thanks for your response.
I know this can be done and I can build a report using this query with the report designer. I wanted to know if a report with the same output can be built using the report builder?
|||My mistake - mixed up the report builder/designer.Report builder is very very basic compared to the designer and is really meant for end users with some basic technical knowledge.
Expand your report model to add the data functionality you require
Use report builder to determine how to display that data.
No comments:
Post a Comment