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
Related
I am using the answer of this question How to automatically generate unique id in sql server to create a custom id for a table.It worked perfectly.Now I have a column which holds the values such as UID00000001 UID00000002 and so on. Suppose the last value in this column is UID00000003.Now I want to calculate the value for the row which hasn't been inserted yet via C# in one of my .aspx pages.In this case UID00000004. How can I achieve this value?
Any help would be appreciated.
Thank you.
If you are not required to generate these identifier at database level (e.g. some other processes insert records there), you can pre-generate them within your application. Something like above:
class Generator
{
public static int UniqueId = 0;
public static int GetNextId()
{
return Interlocked.Increment(ref UniqueId);
}
}
Then, your code can preallocate these identifiers and also format those strings. If multiple users access the same functionality, they will receive other identifiers. However, if one does not (successfully) performs a save operation, those identifiers will be lost.
You need to execute this query to get the next identity which will be generated for the table:
SELECT IDENT_CURRENT('table_name')+1;
For your case, it will have some other info concatenated with the next identity so the query will be like this:
SELECT 'UID' + RIGHT('00000000' + CAST(IDENT_CURRENT('table_name')+1 AS VARCHAR(8)), 8)
Of course you will need to write the C# code to send that query to the SQL Server.
Having said that, keep this in mind: When you get the value from that call and hold onto it, if during the time you are holding the value a record is inserted into that table, then the value is no longer the next value.
If you need the identiy value after a record is inserted in your application, please refer this answer.
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)
If I have a regular database table, with no rows, and I query it, I still get back some metadata, like the column names. Is this possible in EF 6, because if it returns an empty result set, it doesn't include a 'meta-row' I can use for column names.
That doesn't make any sense. EF never returns metadata about your table, it just returns a collect of objects whose type you know at compile time.
If you want the real metadata for the table you need to use something like Tortuga Chain. Or you can query the database's schema information tables.
In my MVC app(c#) I have a url which returns an xml whose complete size is 1000+ records.
But it returns only 1000 records by default and further records can be retrieved using the resumptionToken taken from previous response.
My question is can i pass some filter criteria with this url to get the filtered data from 1000+ records at a time.(other than from ,set,until)Eg: to filter records whose type is "books". Please help.
OAI-PMH does not support any other filter than from, until and set, but some OAI-PMH interfaces implement custom filters via a special syntax in the set field. Check your provider's documentation to know if it is the case. Otherwise all you can do is to download all records and filter them by yourself.
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?