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 ForumsReportsReportsReports with UDT as data sourceReports with UDT as data source
Previous
 
Next
New Post
4/18/2008 6:01 AM
 

I am trying to write reports using my udt as a data source but i am really struggling and dont know where to learn how to write the statements (filters). I have  tables holding sales figures for sales personell and would like to display this data elsewhere such as a top "5 sales people table", and also produce some charts. Any help on how to get started or ways around these sort of problems would be greatly appreciated!

Thaks alot

Sam

 
New Post
4/23/2008 10:44 AM
 

This is my report using UDT data:

I'm displaying a summary of workout data for my blackbelt test.  I enter in the date and amounts for that day and then display a summary including the Average # done each day, the Sum Total of each field and the Target number I need to do in order to reach my goals by the specified time.  If you just want to display the Top 5 values, then you wouldn't need to create the temp table, you would just run your query.

SELECT  CAST(CAST(d1.FieldValue As nvarchar(50)) AS DateTime) AS [Date], CAST(CAST(d2.FieldValue As nvarchar(4)) AS int) AS [Pushups], CAST(CAST(d3.FieldValue As nvarchar(4)) AS int) AS [Crunches], CAST(CAST(d4.FieldValue As nvarchar(4)) AS float) AS [Miles]
INTO #UBBTDetail
FROM   UserDefinedData   d1
        INNER JOIN  UserDefinedFields f1 ON d1.UserDefinedFieldId = f1.UserDefinedFieldId
        INNER JOIN UserDefinedData d2 ON d1.UserDefinedRowId = d2.UserDefinedRowId
        INNER JOIN UserDefinedFields f2 ON d2.UserDefinedFieldId = f2.UserDefinedFieldId
        INNER JOIN UserDefinedData d3 ON d1.UserDefinedRowId = d3.UserDefinedRowId
        INNER JOIN UserDefinedFields f3 ON d3.UserDefinedFieldId = f3.UserDefinedFieldId
        INNER JOIN UserDefinedData d4 ON d1.UserDefinedRowId = d4.UserDefinedRowId
        INNER JOIN UserDefinedFields f4 ON d4.UserDefinedFieldId = f4.UserDefinedFieldId
        WHERE    f1.[ModuleId]   =   506
        AND    f1.FieldTitle = 'Date'
        AND    f2.FieldTitle = 'Pushups'
        AND    f3.FieldTitle = 'Crunches'
        AND    f4.FieldTitle = 'Miles'

SELECT 'SUM' AS Detail, DateDiff(day,MIN([Date]), Max([Date])) As [Days], SUM([Pushups]) As [Pushups], SUM([Crunches]) As [Crunches], SUM([Miles]) As [Miles]
FROM #UBBTDetail Data
UNION
SELECT 'AVG' AS Detail, DateDiff(day,MIN([Date]), Max([Date])) As [Days], AVG([Pushups]) As [Pushups], AVG([Crunches]) As [Crunches], ROUND(AVG([Miles]), 2) As [Miles]
FROM #UBBTDetail Data
UNION
SELECT 'TARGET' AS Detail, DateDiff(day,MAX([Date]), '10/1/2008') As [Days], ROUND((52000 - SUM([Pushups])) / DateDiff(day,MAX([Date]), '10/1/2008'), 0) As [Pushups], ROUND((52000 - SUM([Crunches])) / DateDiff(day,MAX([Date]), '10/1/2008'), 0) As [Crunches], ROUND((1000 - SUM([Miles])) / DateDiff(day,MAX([Date]), '10/1/2008'), 2) As [Miles]
FROM #UBBTDetail Data

DROP TABLE #UBBTDetail

 
New Post
4/23/2008 2:04 PM
 

If you are using version 5.0 of the Reports Module, you can install the UDT Data Source and use the Filters setting to filter data by row. The contents of this field are similar to a SQL WHERE Clause (i.e. "Foo > 10 AND Bar < 50"). However, the filtering is actually done in-memory, after the data is retrieved from the database so if you have a large amount of data, you should probably use a SQL-based solution. Unfortunately, SQL solutions can be complicated (as evidenced by the above post, which was clearly written by someone with more SQL experience than me ).


Andrew Nurse
DotNetNuke Core Team Member and Reports Module Project Lead
Microsoft Certified Professional Developer

 
New Post
1/18/2009 12:48 PM
 

I encountered a problem, that I installed the UDT data source with the report module (5.0). I added a report module and set the active data source to "User Defined Table Module Data Source", but following, I can not select an existing UDT module in the same/or other pages. any one has the same problem? many thanks for the advices ~

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsReportsReportsReports with UDT as data sourceReports with UDT as data source


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