CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Grid issues

Print topic Send  topic

Author Message
2Code

Posts: 24
Posted: 03/31/2014, 12:15 AM

I have created a grid for my forum and everything works great accept one issue

my forums don't group under one category I have tried the grouping and it does not work either

like I said everything works good and looks good but here is how it shos

category 1
something

category 1
something

category 1
something

when it should be

category 1
something
something
something

category 2
something
something
something

here is my div set up

<div id="forum_wrapper">
<!-- BEGIN Grid forum_categories -->
<!-- BEGIN Row -->
<div class="forum_hdr_container">
<div>{cat_title}</div>
<div>Topics</div>
<div>Posts</div>
<div>Activity</div>
<div><a href="{forum_name_Src}"><span>{forum_name}</span></a><span>{forum_desc}</span></div>
<div>{forum_topics}</div>
<div>{forum_posts}</div>
<div>{date_add}</div>
</div>
<!-- END Row -->
<!-- BEGIN NoRecords -->
<div>No records</div>
<!-- END NoRecords --><!-- END Grid forum_categories --></div>
View profile  Send private message
ckroon

Posts: 869
Posted: 03/31/2014, 6:14 PM

Whats your SQL statement?
Pretty sure you can do this with a SQL WHERE
_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
eratech


Posts: 513
Posted: 04/02/2014, 1:39 AM

You won't be able to do this with both the {cat_title} and the {forum_name} both in the same <!-- Row --> - it will display the category and forum for each record in the result.

By the looks of it you are doing something like the Reporting 'Group by'.

Thinking solely in 'Before Show Row' events, you could set a global 'showheading' flag - and toggle the visible flag on the cat_title and forums

eg - very rough pseudo code - it checks if the cat_title changes and then toggles the visible flag on the fields, and stores the cat_title for the next

global lastheading = "nothing yet"   // somewhere outside loop  
// flag to show heading if cat_title changes  
if (cat_title <> lastheading) then showheading = 1  
  
if showheading = 1 then   
        cat_title.visible=true  
        showheading = 0  
end if  
forum_name.visible = not cat_title.visible  

As I said - very very rough. Anyone got anything, anything better?

Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.