I have a report in which I have a parameter that has the following Valid Values: value set to a query field and label set to the following calculated field ::
=Fields!RestaurantCode.Value & " - " & Fields!Name.Value
I then obtain in c# the valid values from the report (after it's been deployed), if I set the value and label to query fields everything works fine. However with a calculated field, ReportingService2010 .GetItemParameters returns null for the ValidValues.
I've tested the report and correctly see the calculated field displayed in the report. I've tried referencing only a field in the calculated field expression (=Fields!RestaurantCode.Value) and ValidValues is still null.
How can I correctly obtain a calculated field through .GetItemParameters ValidValues?
EDIT: forRendering parameter of the .GetItemParameters function is set to true
I don't think this is a valid scenario for SSRS - mixing Query values and static Labels for a single Parameter. I would move that calculation to the query as a new field.
Related
I have a report in crystal report.
In that report, I need to set the field to 'Go' if the value is 0, and set the field to 'NoGo' if the value is 1.
I have created an unbound field string and write formula as below:
if {?idline}=1 and tonumber({bevarage;1.torque})=0 then {#UnboundString2}='Go'
else if {?idline}=1 and tonumber({bevarage;1.torque})=1 then {#UnboundString2}='NoGo'
but this is not working and always returns an empty string from unbounded field.
Please help me to fix it.
Assignment operator in Crystal is := rather than =
Why not simply create a formula that depends on the parameter?
I want to use two options.
1- If users want to use dropdown list for order they should use dropdown list parameter and textbox must be invalid or textbox must be set in dropdown value.
2 - Or if users want to type with keyboard manuelly for order, dropdown list must be invalid or dropdown must be show just type in textbox value. I added screenshot.
Do you have some suggestions? How can I do like this? My customers want to use dropdown list and type in manuelly in textbox for same parameter(#order parameter) on one report.
Thanks.
As far as I am aware it is not possible to disable one parameter input control or another. Parameters are 1 directional. You can have one based on the results of another but only in one direction. However, you should be able to produce something close enough to be satisfactory.
Here's a step by step report, based on the NorthWind database. You should be able to modify this to suit your database. If you want to copy this example exactly you'll first need to download and restore the NorthWind sample database if you don't already have it. You can find the database here.
NorthWind database download on Codeplex
You can see the report design here, I'll explain each step.
Create a new, blank report
Create a datasource in your report and point it to the NorthWind database
Create a dataset called Order. This will be the final query containing the data that you want in the main body of the report. The query for this data set is.
SELECT * FROM [Order Details Extended]
WHERE OrderID = #ReportOrderID
Create another dataset called OrdersInDateRange. This will be the list of orders that you will see in your drop down list. It filters the available orders to only those that appear with a date range. Note It also contains a null entry so our final parameter can be edited without choosing anything from the list. The query looks like this.
SELECT NULL AS OrderID
UNION ALL
SELECT DISTINCT OrderID
FROM Orders
WHERE OrderDate BETWEEN #StartDate AND #EndDate
ORDER BY OrderID
This gets a list of all order IDs within a date range plus a NULL order id.
Create two new Parameters StartDate and EndDate and set them to be date time parameters.
You should now have 4 parameters, StartDate, EndDate, OrderID and ReportOrderID.
Edit the OrderID parameter, check the "Allow Null Value" option. Then set "Available Values" to a query and choose OrdersInDateRange as the dataset, choose OrderID as the Value and Label. Add a Default value of (Null). You need to set the default value as the final parameter (ReportOrderID) will not be enabled unless a value is selected in this parameter.
Edit the ReportOrderID parameter. Leave available values as none. For Default Values, choose "Specify Values" add a value, click the [fx] button and set the value to
=Parameters!OrderID.Value
This will set this parameter to the value choosen in the drop down so the user can pick from a list but allows the user to type in an order ID manually too.
The report uses the ReportOrderID parameter to fetch data, the drop down list only exists as a helper.
Add a table and design your report layout
That's it.
Here's the finished report choosing from the list.
Here it again with nothing chosen in the list (the default value NULL is shown)
Trying to query the RETs database to only show CONDOs. There is a lookup field in the METADATA-LOOKUP_TYPE of TYPEOFPROP, but I'm unable to pull the value. Query below:
http://connectmls-rets.mredllc.com/rets/server/search?SearchType=Property&Class=ResidentialProperty&QueryType=DMQL2&Format=COMPACT&StandardNames=0&Query=(LP=300000%2B)&Count=1&Limit=2
Using system names, filter on TPC. You can then add "&select=tpc" to the querystring and add the filter ",(TPC=C)".
Since its a look up, you need to use "|" symbol in the query.
Check this example,
Perform a query:
http://retsgw.flexmls.com/rets2_1/Search?SearchType=Property&Class=A&QueryType=DMQL2&Query=(LIST_15=|OV61GOJ13C0)&Count=0&Format=COMPACT-DECODED&StandardNames=0&RestrictedIndicator=****&Limit=50
The response will contain the records you requested (limited to 50 due to the Limit argument given at the end). The COLUMNS line indicates the field names of the records returned and all DATA rows represent the records with field values in the same order as shown by the COLUMN row. If you’re only interested in receiving certain fields back, you can add a “&Select=” parameter to the end of the URL. For example, if you only want to retrieve back the KeyName field (noted as “LIST_1”) and the Listing Status field (noted as “LIST_15”), add “&Select=LIST_1,LIST_15” to the end of that URL. Note a few ‘LIST_1’ values for the next example.
For further reference, check this flex documentation
I have a web application using a SSRS 2010 service, and I'm having an issue getting back the valid values for a parameter. The parameter allows multiple values and is of type Text. In the report I create, I am getting available values by query, as opposed to 'specify values'. When I call GetItemParameters the ValidValues property is empty.
If my Report specifies values instead of getting values from query, then the ValidValues property is filled in completely.
I'm hoping someone knows a way to get that property filled out when getting from query, because I'd hate to have my report writers specifying hundreds of (often changing) values individually.
Thanks!
Your link ReportingService2010.GetItemParameters gives following information
If any parameters values are based on a query and you are interested
in returning the query-based parameters' valid values list, set
ForRendering to true. In addition, for query-based parameters, you
must pass in all of the credential information required to return the
query parameters.
Did you set ForRendering to true value as it is said in this link?
I am very new to SSRS.
I have added one Parameter named Date on SQL Server Report
i have set parameter value from aspx.cs code behind file
i have drown that parameter on ReportHeader and i want display CurrentDate value on that parameter
and i tried =Join(Parameters!Date.Value,", ") but it displays #Error at runtime.
i also tried =Join(Parameters!Date.Label,", ") but it displays Nothing.
Please tell me how to display Parameter value on Report?
Not sure I understand what you are asking. To display the parameter value on the report, create a textbox on the report and then set it's expression to your parametername.value.
Something like this:
=Parameters!Date.Value(0)
Not sure what ur asking ...wheather u need report run date or parameter passing date ....
If u need report date .... follow this
Drag a textbox onto the report ...page header or footer
and ----> =Today()
If u need parameter value(date) what ur passing
Just the parameters!paraame.value ...
If I'm understanding your correctly you want to do:
=Parameters!Date.Value & ", "
& is the string concatentation operator in SSRS, you must have a space on each side of it FYI