Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and Listretriving data from UDT tables and pass it to ReportViewerretriving data from UDT tables and pass it to ReportViewer
Previous
 
Next
New Post
12/31/2011 10:04 PM
 
one problem left:
i have a XML field in the generated table.
and it shows the tags on the ReportViewer every time
how can i remove those tags ????
any idea using SQL !!
 
New Post
1/3/2012 10:17 PM
 
Not as sophisticated as the prior posts, but here is what I use to get things into a table format for a given example of a FnL implementation. It has to be customized for each implementation obviously. Maybe it will help you.

SELECT
R.UserDefinedRowId as ID,
CONVERT(VARCHAR(10), max (cast((CASE WHEN F.FieldTitle = 'Start Date' THEN D.FieldValue ELSE '' END) as nvarchar(50))), 105) AS [Start Date],
max (cast((CASE WHEN F.FieldTitle = 'WMS' THEN D.FieldValue ELSE '' END) as nvarchar(50))) AS WMS,
max (''+ cast((CASE WHEN F.FieldTitle = 'Job Post Title' THEN D.FieldValue ELSE '' END) as nvarchar(50)) + '') as [Job Title],
MAX('$' + CAST((CASE WHEN F.FieldTitle = 'Hourly Rate (Up To)' THEN CONVERT(int, CONVERT(money, CONVERT(nvarchar(10), D .FieldValue))) ELSE '' END)
AS nvarchar(50))) AS [Rate],
max (cast((CASE WHEN F.FieldTitle = 'Need Duration (Months)' THEN D.FieldValue ELSE '' END) as nvarchar(50))) AS [Duration Months],
max (cast((CASE WHEN F.FieldTitle = 'Contact Company' THEN D.FieldValue ELSE '' END) as nvarchar(50))) AS [Contact Company]

FROM dbo.UserDefinedRows AS R LEFT OUTER JOIN
dbo.UserDefinedData AS D ON R.UserDefinedRowId = D.UserDefinedRowId INNER JOIN
dbo.UserDefinedFields AS F ON D.UserDefinedFieldId = F.UserDefinedFieldId
WHERE (F.ModuleId = 1111)
group by

R.UserDefinedRowId

order by [Start Date]

Chad
 
New Post
1/4/2012 1:37 PM
 
thank you very much Chad,
i solved this problem using "HTML view" in Field options in ReportViewer, but
the idea here is that when you have multiple value in XML column, all the values will appear in one cell in the report.
and i want to show each value in one row.
any ideas !!?
my XML terminate line tag is

thanks again
 
New Post
6/13/2012 1:49 PM
 

Old post, but thought I'd share what I created when I went looking for a quick dump of all the FnL data across multiple modules and portals, and found this post.

Using a dynamic query, I was able to pivot the data into columns.  This runs across all of my FnL modules, but could easily be adapted to take a moduleid parameter in that first "SELECT DISTINCT FieldTitle" subquery.

Hope it's helpful,

JR

--Create a dynamic list of distinct field names, putting Created/Changed at the front
declare @fieldlist varchar(max) = 
(
'[Created at],[Created by],[Changed at],[Changed by],'
+
(SELECT SUBSTRING(
(SELECT ',[' + FieldTitle + ']'
FROM (SELECT DISTINCT FieldTitle FROM UserDefinedFields WHERE FieldTitle NOT IN ('Created at','Created by','Changed at','Changed by')) as fieldnames
ORDER BY FieldTitle
FOR XML PATH('')),2,200000)))

--Use the field list to create a dynamic PIVOT query
declare @query varchar(max) =
'SELECT TabPath, ModuleTitle, UserDefinedRowId, ' + @fieldlist +
'from
(
select t.TabPath, tm.ModuleTitle, r.UserDefinedRowId, f.FieldTitle, CAST(d.FieldValue as varchar(MAX)) as FieldValue
FROM dbo.UserDefinedRows AS R LEFT OUTER JOIN
dbo.UserDefinedData AS D ON R.UserDefinedRowId = D.UserDefinedRowId INNER JOIN
dbo.UserDefinedFields AS F ON D.UserDefinedFieldId = F.UserDefinedFieldId
join dbo.TabModules tm on r.ModuleID = tm.ModuleID
join dbo.Tabs t on tm.TabID = t.TabID
) p
PIVOT
(
MAX(FieldValue)
FOR FieldTitle IN (' + @fieldlist + ')
) as pvt'

exec(@query)

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and Listretriving data from UDT tables and pass it to ReportViewerretriving data from UDT tables and pass it to ReportViewer


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out