Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2021 09:50 AM
Hi,
I want to filter out certain assetnames that have specific structure (first two letters, then 6 numbers). I want to use regex for this, but I can't get it to work. I'm sure my regex works (verified it at https://regexr.com/), but when I use it in a report query, it doesn't work. I used the following clause:
Where tblAssets.AssetName Like '^UI\d{6}$'
Can anybody tell me what is going wrong?
Thank you in advance!
I want to filter out certain assetnames that have specific structure (first two letters, then 6 numbers). I want to use regex for this, but I can't get it to work. I'm sure my regex works (verified it at https://regexr.com/), but when I use it in a report query, it doesn't work. I used the following clause:
Where tblAssets.AssetName Like '^UI\d{6}$'
Can anybody tell me what is going wrong?
Thank you in advance!
Labels:
- Labels:
-
Report Center
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2021 03:49 PM
I have tons of custom reports that don't work in the editor. What I do is create a new report with the default select statement and save it with whatever name I want.
This will create a view in the Lansweeper database and the name of the view is in the URL of the report such as: https://XXXXXXXXXXX/Report/editreport.aspx?det=web50rep7b10f76f50bd493ca4079b7ac525999e&title=Test%20Report
Then I go into the SQL database, right click the view, then select design. This lets me change the SQL query to whatever it is I want. SQL Server Management Studio will allow you to make the view as complicated as you like and when you're done, just save the view. Then the report should load normally on the website.
This will create a view in the Lansweeper database and the name of the view is in the URL of the report such as: https://XXXXXXXXXXX/Report/editreport.aspx?det=web50rep7b10f76f50bd493ca4079b7ac525999e&title=Test%20Report
Then I go into the SQL database, right click the view, then select design. This lets me change the SQL query to whatever it is I want. SQL Server Management Studio will allow you to make the view as complicated as you like and when you're done, just save the view. Then the report should load normally on the website.