Zoeken in deze blog

dinsdag 14 december 2010

SQL: make reporting labels multilangual

You can make field labels multilangual. By doing this you avoid the proces of making one report for every language within your organization. By using the report parameter CRM_UILanguageId you can determine the language code for the user who is starting the report. By using an IIF-statement in your label, you can make the labels multilangual.

maandag 13 december 2010

SQL - Pass Multi-value parameter from master to subreport

To pass a Multi-value parameter from a master to a subreport, first add the parameter in both reports. Only the parameter in the master report has to contain the values.

In the master report in the Subreport Properties section, make a connection between both parameters:

Be carefull: when adding the parameter, BIDS will add it as =Parameter!Opp_Stat.Value(0). Change this in =Parameter!Opp_Stat.Value because else you will only see the first parameter value in your query result!

Your datasource should look something like this:

One thing I think worth to emphasize, since it's a multi-valued parameter, the query in the Subreport 's Datasource has to use the "in" syntax and not the "=" syntax.

donderdag 9 december 2010

SQL Server: "All Values" option in Queried parameter

To add the option "All" in a Queried SQL parameter change your (list) dataset like this:


The dataset where you use the parameter should look something like this:

SELECT statecodename, statecode
FROM FilteredOpportunity AS CRMAF_FilteredOpportunity
WHERE (accountid = @CRM_Accountid) AND (statecode = @CRM_Opp_Statt) OR
(accountid = @CRM_Accountid) AND (@CRM_Opp_Statt = - 1)

For Text variables:
Use a (list) dataset, similar to this:







The dataset where you use the parameter should look something like this:


dinsdag 7 december 2010

SQL Server: "All Values" option in Non-queried parameter

To add the option "All" in a Non-queried SQL parameter change your dataset like this:

SELECT statecodename, statecode
FROM FilteredOpportunity AS CRMAF_FilteredOpportunity
WHERE (accountid = @CRM_Accountid) AND (statecode = @CRM_Opp_Statt) OR
(accountid = @CRM_Accountid) AND (@CRM_Opp_Statt = - 1)

Next step is to add the option "All" to your Non-queried parameter:


 
 
 
 
 
 
 
 
 
 
 
 
 


Works like a charm!
 
Original post: http://timothychenallen.blogspot.com/2007/06/sql-server-all-values-parameters-in.html