CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 CodeCharge Forum Fix - show Reply Count!

Print topic Send  topic

Author Message
Bubba

Posts: 33
Posted: 12/06/2007, 10:53 PM

Hi all,

thought I would share my work around with you. I have seen a lot people ask how to include reply counts in the CodeChargre forum. After a LOT of mucking around I figured it out.

Step 1
Change the data source of the "messages" grid to SQL

Step 2
Select the SQL source and put this query in:

SELECT DISTINCT forum_messages_1.message_id, forum_messages_1.message_title, Count(forum_messages.message_id_parent) AS CountOfmessage_id_parent, forum_messages_1.author, forum_messages_1.date_add, forum_messages_1.smile_id
FROM forum_messages INNER JOIN forum_messages AS forum_messages_1 ON forum_messages.message_id_parent = forum_messages_1.message_id
GROUP BY forum_messages_1.message_id, forum_messages_1.message_title, forum_messages_1.author, forum_messages_1.date_add, forum_messages_1.smile_id
HAVING (((Count(forum_messages.message_id_parent))<>0));

Step 3
Add a new label to your messages grid, and select "CountOfmessage_id_parent" as the control source. This will display a reply count for each message.

That's it!

I am using an Access DB.

If this doesn't work for you, I am sorry, but I will not be answering any questions about how to make it work for you.

This should be enough to help you figure it out, and maybe the developers from Yes Software may consider adding this function in the next CodeChargs update ;)

enjoy!

:-D
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.

MS Access to Web

Convert MS Access to Web.
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.