Janus GridEX SelfReferencing Setting - winforms

I want to Load my tree as Hirarchical in Janus GridEX , but when I set the setting it is not working , my table columns are:
TopicID nvarchar(50) ; --which is parent
ParentID nvarchar(50) ;--which is child
Description nvarchar(50);
and the setting window is like as following
Also I checked with GridEX tutorial every thing is ok but not working for me !!

I did following settings and it works like a charm .

Related

SSRS 2012 display Bing map image

I have created sql to retrieve information from our table and create the url for a Bing map. If I take the url from the query and paste it into a browser the map image appears.
Example: https://dev.virtualearth.net/REST/V1/Imagery/Map/Road?mapSize=600,600&mapLayer=TrafficFlow&format=png&pushpin=35.96981750,-85.03747790;64;1&key=xxx
But in SSRS if I use the url as an external image I get the red-X-in-box. No error message but no image either.
I read there should be a way to "enable external images". I've checked the box for the image. Is there another place to change the setting?
I can produce your map without any issues. Follow these instructions and make sure you can reproduce the same results, , then compare to your own report. Hopefully the issue will become apparent.
Create a new Report.
Create a new Dataset called BingMapSample and use the following dataset query, swapping the key for your Bing maps key
-- set up some static values
DECLARE #BingmapKey varchar(256) = 'XxXX-99x-
9XXXXX9XXxxxXXXxXxXxxxxXxXxx9X9XxxX9xxXxXX9xXXx99x9XXxx'
DECLARE #MapSize varchar(10) = '600'
DECLARE #Layer varchar(256) = 'TrafficFlow'
-- stick a few locations in a table, the first one is from your exmaple
DECLARE #mapLocations TABLE (coords varchar(256))
INSERT INTO #mapLocations VALUES
('35.96981750,-85.03747790'),
('50.998647,-0.105406')
-- now build up some urls to use in the report
SELECT
'https://dev.virtualearth.net/REST/V1/Imagery/Map/Road?mapSize=' + #MapSize + ',' + #MapSize
+ '&mapLayer=' + #Layer
+ '&format=png&pushpin=' + ml.coords
+ ';64;1&key=' + #BingmapKey
AS BingMapSampleURL
FROM #mapLocations ml
Now add an image to your report (use a sensible size) and set the following
Source = External
Value = =First(Fields!BingMapSampleURL.Value, "BingMapSample")
If you run the report you should see your map displayed.
To show both maps in a list, do the following
Add a 'List' to your report and set
DataSetName = BingMapSample
Resize the list's only cell to something sensible then inside the list 'cell' insert an image. Set the image properties as follows
Source = External
Value = =Fields!BingMapSampleURL.Value
The final design looked like this... (I shaded the list background just for clarity).
If you run the report you should now also see two more maps, three maps in total.
When I run the report I get this
Hope that helps...

dnn - Custom module for unexisting page redirect

I want to create dnn custom module that will redirect some old url-s to new pages.
I know how to create datatable and add records to this table. The table have old-url and new-url fields with required data. eg.: www.domain.com/oldurl, www.domain.com/newurl
if I use redirect inside module view then I can only redirect existing pages to new pages and for this I don't need to make custom module...
My question is: what to override or use that I can intercept request and make redirect with custom dnn module?
===== EDIT =====
I also find this : dnnurlproviders
https://archive.codeplex.com/?p=dnnurlproviders
Is this still maintained somewhere?
You could also do this without writing a module, and simply adding records to the TABURLS table in DNN.
INSERT INTO dbo.TabUrls ( TabId ,
SeqNum ,
Url ,
QueryString ,
HttpStatus ,
CultureCode ,
IsSystem ,
PortalAliasId ,
PortalAliasUsage ,
CreatedByUserID ,
CreatedOnDate ,
LastModifiedByUserID ,
LastModifiedOnDate
)
VALUES ( ###, -- TabId - int
3 , -- SeqNum - int
N'/OLDURLHERE' , -- Url - nvarchar(200)
N'' , -- QueryString - nvarchar(200)
N'301' , -- HttpStatus - nvarchar(50)
N'' , -- CultureCode - nvarchar(50)
1 , -- IsSystem - bit
null , -- PortalAliasId - int
0 , -- PortalAliasUsage - int
1 , -- CreatedByUserID - int
GETDATE() , -- CreatedOnDate - datetime
0 , -- LastModifiedByUserID - int
GETDATE() -- LastModifiedOnDate - datetime
)
The answer for making custom redirect is to create custom ExtensionUrlProvider.
Some helpful links are:
http://www.dnnsoftware.com/answers/getting-started-with-dnnfriendlyurl-in-dnn-72x
http://www.dnnsoftware.com/answers/custom-extensionurlprovider
and settings for custom ExtensionUrlProvider missing in dnn 9.0.0 and after dnn 9.0.1 are at:
SEO > URL Management
https://dnntracker.atlassian.net/browse/DNN-9148?attachmentOrder=desc
===========================
also for handling redirect for old .php links in iis you must create new Handler Mappings in IIS. Just take PageHandlerFactory and copy it with *.php Path.

I define a field as varchar(30) but I can insert character only 28

I don't understand I already define size of character as VARCHAR(30) and I try to insert data via web page = STIFF COMP,R FR DOOR SKIN CTR
but it can't
Error string or binary data would be truncated
If you create your column correctly, then it should work well
Let's see the simple example below:
CREATE TABLE [dbo].[Table_1](
[stringTest] [varchar](30) NULL
) ON [PRIMARY]
GO
Just a simple Table_1 with 1 row [stringTest] type [varchar](30)
Then I insert your string insert into Table_1(stringTest) values('STIFF COMP,R FR DOOR SKIN CTR')
It's working fine, so just a confirm: - your original text is fitted.
So other concern is:
You set up database wrongly (check my above simple table)
You use an application (asp.net per-harp) to add the value in. So you may check in debug mode to see the correct value (may be it's formatted or encoded, since i saw a comma , in your string)

SQL Server XP_READREG - Read default key value

I've used XP_READREG to read registry keys before and it's worked great. Now I need to read the default value for a key. What is the syntax to read "(Default)" from a registry key?
I have tried setting #value_name to '' or '.' or '(Default)' without success.
I can run the query without #value_name and I get back KeyExist = 1 indicating that the rootkey and key point correctly.
This is the general query that I'm using:
DECLARE #RegLoc VARCHAR(100)
select #RegLoc='TypeLib\{4BF5E120-AE37-4090-A83F-A1A8A5228371}\1.0\0\win64'
EXEC [master].[dbo].[xp_regread] #rootkey='HKEY_CLASSES_ROOT',
#key=#RegLoc,
#value_name=''
OK, #Alex K. pointed out the trick in the comment to the question, pass null for #value_name. I originally tried omitting it but the proc then defaults to an exists tests. Explicitly passing null causes xp_regread to return a registry keys default value. Like this:
DECLARE #RegLoc VARCHAR(100)
DECLARE #ValueName varchar(100) -- leave this unassigned to get the default value
select #RegLoc='TypeLib\{4BF5E120-AE37-4090-A83F-A1A8A5228371}\1.0\0\win64'
EXEC [master].[dbo].[xp_regread] #rootkey='HKEY_CLASSES_ROOT',
#key=#RegLoc,
#value_name = #ValueName

SQL Server - remove HTML Tag from a varchar

I know there are a few about similar topics on here but I can't find one related to my issue, this is it:
I have a table with an ID Column and a QRCode column. each time an item is added the primary key auto increments. The QRCode will scan in to be like the following:
"http://somewebsite.com/12345/987654321"
i want to be able to remove the "http://somewebsite.com/" from the string, I know how to do this in C# however I am unsure of how to do this in Sql Server. any guidance would be great, thanks
Regular formats are like the following, and used in the example below.
"http://somewebsite.com/12345/456564654"
"http://somewebsite.com/12345/989886765"
"http://somewebsite.com/12346/987654321"
the query returns the following results:
SELECT
REPLACE
(
REPLACE(QRCode, 'http://somewebsite.com/', '')
,'/', ' '
) AS QRCode
FROM
QRTable
WHERE
QRCode LIKE '%http://somewebsite.com/%'
"12345 456564654"
"12345 989886765"
"12346 987654321"
Now i need to update the table with those new results however as there's 3 results, i get the error message "Subquery returned more than 1 value". is there a way to replace the selected values in the table with the ones that exist based on the primary key field?
**Removed previous example
A more complete answer based on your updated question. This removes the first portion of the URL as well as the trailing / so that you get your desired output.
DECLARE #Variable VARCHAR(50)
SET #Variable = 'http://somewebsite.com/12345/456564654'
SET #Variable =
REPLACE
(
REPLACE(#Variable, 'http://somewebsite.com/', '')
,'/', ' '
)
PRINT #Variable
Output = 12345 456564654
Looking at your SQL statement you want this:
SELECT
REPLACE
(
REPLACE(QRCode, 'http://somewebsite.com/', '')
,'/', ' '
) AS QRCode
FROM
QRTable
WHERE
QRCode LIKE '%http://somewebsite.com/%'

Resources