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 ForumsReportsReportsMultiple-row query in ReportsMultiple-row query in Reports
Previous
 
Next
New Post
7/23/2008 1:34 PM
 
With the deadline for my project growing closer, I've abandoned the idea of getting the UDT Data Source plugin working in my Reports module. Instead, I'm querying directly into the database to pull the data values I want to report on. There's just one huge problem: because of how UDT data is structured, I'm getting each row of data as 26 separate one-column rows. My first question: is there any way to write an HTML Visualizer template that displays a single logical record (as viewed in the HTML page) from more than one row in a SQL recordset? My next question: If one Visualizer record always equals one SQL recordset row, does anyone have an example of a query that 'flattens' a fixed-length set of rows returned from a base query into a single row to satisfy Visualizer? All of the solutions available out there involve adding the CASE and PIVOT clauses to my query in conjunction with a grouping, but none of these work on the alphanumeric data returned by my query. Both CASE and PIVOT require grouping with MAX or other aggegate functions, but none of these will cooperate with the ntext column data type generated by UDT.
 
New Post
7/23/2008 3:50 PM
 
Well, I got my crosstab query working, but now there's a new problem. By using CAST(), I was able to get the MAX() calls to acceptUDT fields, returning one row per UDT logical record: select uf.ModuleId, max(case when uf.UserDefinedFieldId = 6 then cast(ud.FieldValue as varchar) end) as BusinessName, max(case when uf.UserDefinedFieldId = 7 then cast(ud.FieldValue as varchar) end) as ContactName, max(case when uf.UserDefinedFieldId = 8 then cast(ud.FieldValue as varchar) end) as Email, max(case when uf.UserDefinedFieldId = 9 then cast(ud.FieldValue as varchar) end) as WebURL, max(case when uf.UserDefinedFieldId = 10 then cast(ud.FieldValue as varchar) end) as Phone1Type, max(case when uf.UserDefinedFieldId = 11 then cast(ud.FieldValue as varchar) end) as Phone1, max(case when uf.UserDefinedFieldId = 12 then cast(ud.FieldValue as varchar) end) as Phone2Type, max(case when uf.UserDefinedFieldId = 13 then cast(ud.FieldValue as varchar) end) as Phone2, max(case when uf.UserDefinedFieldId = 14 then cast(ud.FieldValue as varchar) end) as Address1, max(case when uf.UserDefinedFieldId = 15 then cast(ud.FieldValue as varchar) end) as Address2, max(case when uf.UserDefinedFieldId = 16 then cast(ud.FieldValue as varchar) end) as City, max(case when uf.UserDefinedFieldId = 17 then cast(ud.FieldValue as varchar) end) as StateProv, max(case when uf.UserDefinedFieldId = 18 then cast(ud.FieldValue as varchar) end) as PostCode, max(case when uf.UserDefinedFieldId = 19 then cast(ud.FieldValue as varchar) end) as Country, max(case when uf.UserDefinedFieldId = 20 then cast(ud.FieldValue as varchar) end) as ProductName, max(case when uf.UserDefinedFieldId = 21 then cast(ud.FieldValue as varchar) end) as ProductDescription, max(case when uf.UserDefinedFieldId = 24 then cast(ud.FieldValue as varchar) end) as FeaturedProduct, max(case when uf.UserDefinedFieldId = 25 then cast(ud.FieldValue as varchar) end) as WebAdvertising, max(case when uf.UserDefinedFieldId = 26 then cast(ud.FieldValue as varchar) end) as NewsletterCoverage, max(case when uf.UserDefinedFieldId = 31 then cast(ud.FieldValue as varchar) end) as ProductSummary, max(case when uf.UserDefinedFieldId = 32 then cast(ud.FieldValue as varchar) end) as MainGraphic, max(case when uf.UserDefinedFieldId = 33 then cast(ud.FieldValue as varchar) end) as SecondaryGraphic from UserDefinedData ud join UserDefinedFields uf on ud.UserDefinedFieldId = uf.UserDefinedFieldId where uf.ModuleId = 414 group by uf.ModuleId When I present this to the Reports query check link, it works fine. But when I Update, I get gibberish because the query gets truncated about three-fourths through. I tried loading the query from a file instead of cut/paste, with the same result. Please don't tell me that there's a chintzy query size limit in Reports! This query is not large by SQL Server standards. If we're going to see DNN used for real grown-up applications with large and complex data sets, we're going to have to do better than this.
 
New Post
7/23/2008 11:36 PM
 

Alan,  Try SQLGridSelectedview  from www.tressleworks.ca  ... it will handle up to 8000 characters in the primary Select.    I believe you will find this reporting / grid tool has other features you may like.  There is a free version, or for a modest fee, you can get the most recent.  The free version should be able to handle the query you listed.

Paul

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsReportsReportsMultiple-row query in ReportsMultiple-row query in Reports


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