CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 Adding a variable to CF?

Print topic Send  topic

Author Message
Ann Harrell
Posted: 06/26/2001, 11:54 AM

I'm trying to duplicate this using CodeCharge:
http://www.bourbon.org/harrell/index.cfm

I successfully added the (Now()) -1 so only "current" events show. I know I
can modify the date in the generated code later. I have NOT figured out how
to do that CC.

My database is: Schedule
Table1: Bgames Table2 Bcode_Colors
Event_ID bCode
bCode bFont_Color
bEvent bName
bTime
bDay

I used the 4 page wizard again but can't seem to get the variable produces.

Ann Harrell

<CFQUERY NAME="GetEvents" DATASOURCE="schedule">
SELECT bGames.bCode, bEvent, bTime, bDay, bFont_Color
FROM bGames, bCode_Colors
WHERE bDay > (Now())-1 and bGames.bCode = BCode_Colors.BCode
Order BY bGames.bDay
</CFQUERY>
<cfinclude template="Toolbar.cfm"><BR>
<FONT FACE="Arial" SIZE="+1" COLOR="Red">Report for 6:00 PM game at 5:20 and
7:30 PM game at 6:50 per coach.</FONT><BR>
<TABLE WIDTH="85%" BORDER="1" ALIGN="left" BGCOLOR="White">
<TR>
<TH ALIGN="left" BGCOLOR="Navy"><FONT FACE="Arial" SIZE="+2"
COLOR="#FFFFDF">Event</font></TH>
<TH ALIGN="left" BGCOLOR="Navy"><FONT FACE="Arial" SIZE="+2"
COLOR="#FFFFDF">Time</font></TH>
<TH ALIGN="left" BGCOLOR="Navy"><FONT FACE="Arial" SIZE="+2"
COLOR="#FFFFDF">Date</font></TH>
</TR>
<CFOUTPUT QUERY="GetEvents">
<TR>
<TD><B><B><FONT FACE="Arial"
COLOR="#bFont_Color#"></B>#bEvent#</FONT></B></TD>
<TD><B><FONT FACE="Arial" COLOR="#bFont_Color#">#bTime#</FONT></B></TD>
<td><B><FONT FACE="Arial" COLOR="#bFont_Color#">#DateFormat(bDay, "mmmm
dd, yyyy dddd")#</FONT></B></td>
</TR>

</CFOUTPUT>
</TABLE>

</body>
</html>


Ann Harrell
Posted: 06/26/2001, 9:22 PM

Anybody home?


"Ann Harrell" <ann@hoosierlink.net> wrote in message
news:9halod$fj$1@news.codecharge.com...
> I'm trying to duplicate this using CodeCharge:
> http://www.bourbon.org/harrell/index.cfm
>
> I successfully added the (Now()) -1 so only "current" events show. I know
I
> can modify the date in the generated code later. I have NOT figured out
how
> to do that CC.
>
> My database is: Schedule
> Table1: Bgames Table2 Bcode_Colors
> Event_ID bCode
> bCode bFont_Color
> bEvent bName
> bTime
> bDay
>
> I used the 4 page wizard again but can't seem to get the variable
produces.
>
> Ann Harrell
>
> <CFQUERY NAME="GetEvents" DATASOURCE="schedule">
> SELECT bGames.bCode, bEvent, bTime, bDay, bFont_Color
> FROM bGames, bCode_Colors
> WHERE bDay > (Now())-1 and bGames.bCode = BCode_Colors.BCode
> Order BY bGames.bDay
> </CFQUERY>
> <cfinclude template="Toolbar.cfm"><BR>
> <FONT FACE="Arial" SIZE="+1" COLOR="Red">Report for 6:00 PM game at 5:20
and
> 7:30 PM game at 6:50 per coach.</FONT><BR>
> <TABLE WIDTH="85%" BORDER="1" ALIGN="left" BGCOLOR="White">
> <TR>
> <TH ALIGN="left" BGCOLOR="Navy"><FONT FACE="Arial" SIZE="+2"
> COLOR="#FFFFDF">Event</font></TH>
> <TH ALIGN="left" BGCOLOR="Navy"><FONT FACE="Arial" SIZE="+2"
> COLOR="#FFFFDF">Time</font></TH>
> <TH ALIGN="left" BGCOLOR="Navy"><FONT FACE="Arial" SIZE="+2"
> COLOR="#FFFFDF">Date</font></TH>
> </TR>
> <CFOUTPUT QUERY="GetEvents">
> <TR>
> <TD><B><B><FONT FACE="Arial"
> COLOR="#bFont_Color#"></B>#bEvent#</FONT></B></TD>
> <TD><B><FONT FACE="Arial" COLOR="#bFont_Color#">#bTime#</FONT></B></TD>
> <td><B><FONT FACE="Arial" COLOR="#bFont_Color#">#DateFormat(bDay, "mmmm
> dd, yyyy dddd")#</FONT></B></td>
> </TR>
>
> </CFOUTPUT>
> </TABLE>
>
> </body>
> </html>
>
>
>

CodeCharge
Posted: 06/27/2001, 12:47 AM

If you are directing this posting to CodeCharge Support, please submit it to
http://support.codecharge.com


"Ann Harrell" <ann@hoosierlink.net> wrote in message
news:9hbn1j$t8q$1@news.codecharge.com...
> Anybody home?
>
>
> "Ann Harrell" <ann@hoosierlink.net> wrote in message
>news:9halod$fj$1@news.codecharge.com...
> > I'm trying to duplicate this using CodeCharge:
> > http://www.bourbon.org/harrell/index.cfm
> >
> > I successfully added the (Now()) -1 so only "current" events show. I
know
> I
> > can modify the date in the generated code later. I have NOT figured out
> how
> > to do that CC.
> >
> > My database is: Schedule
> > Table1: Bgames Table2 Bcode_Colors
> > Event_ID bCode
> > bCode bFont_Color
> > bEvent bName
> > bTime
> > bDay
> >
> > I used the 4 page wizard again but can't seem to get the variable
> produces.
> >
> > Ann Harrell
> >
> > <CFQUERY NAME="GetEvents" DATASOURCE="schedule">
> > SELECT bGames.bCode, bEvent, bTime, bDay, bFont_Color
> > FROM bGames, bCode_Colors
> > WHERE bDay > (Now())-1 and bGames.bCode = BCode_Colors.BCode
> > Order BY bGames.bDay
> > </CFQUERY>
> > <cfinclude template="Toolbar.cfm"><BR>
> > <FONT FACE="Arial" SIZE="+1" COLOR="Red">Report for 6:00 PM game at 5:20
> and
> > 7:30 PM game at 6:50 per coach.</FONT><BR>
> > <TABLE WIDTH="85%" BORDER="1" ALIGN="left" BGCOLOR="White">
> > <TR>
> > <TH ALIGN="left" BGCOLOR="Navy"><FONT FACE="Arial" SIZE="+2"
> > COLOR="#FFFFDF">Event</font></TH>
> > <TH ALIGN="left" BGCOLOR="Navy"><FONT FACE="Arial" SIZE="+2"
> > COLOR="#FFFFDF">Time</font></TH>
> > <TH ALIGN="left" BGCOLOR="Navy"><FONT FACE="Arial" SIZE="+2"
> > COLOR="#FFFFDF">Date</font></TH>
> > </TR>
> > <CFOUTPUT QUERY="GetEvents">
> > <TR>
> > <TD><B><B><FONT FACE="Arial"
> > COLOR="#bFont_Color#"></B>#bEvent#</FONT></B></TD>
> > <TD><B><FONT FACE="Arial"
COLOR="#bFont_Color#">#bTime#</FONT></B></TD>
> > <td><B><FONT FACE="Arial" COLOR="#bFont_Color#">#DateFormat(bDay,
"mmmm
> > dd, yyyy dddd")#</FONT></B></td>
> > </TR>
> >
> > </CFOUTPUT>
> > </TABLE>
> >
> > </body>
> > </html>
> >
> >
> >
>
>

Ann Harrell
Posted: 06/27/2001, 8:51 AM

No, it was directed at the newsgroup, which doesn't seem to be very active
the last few days. I have 14 days left on my trial and I'm trying to see if
CodeCharge can handle the details.

Here is the code I created:
<td><B><FONT FACE="Arial" COLOR="#bFont_Color#">#DateFormat(bDay, "mmmm dd,
yyyy dddd")#</FONT></B></td>

Here is what I get after changing the DataFONT in the style sheet:
<font style="font-size: 12pt; color:
#bFont_Color#"><CFOUTPUT>#HTMLEditFormat(fldbDay)#</CFOUTPUT> </font></
td></tr>

Looks fine. Now, how do I enter the query information (see CF code) so it
works? One thing I notice is that CC may not like the fact that I have two
table fields with the same name. In CF you just add the table name

bGames.bCode = bCode_Colors.bCode

What am I missing here? Is there an example I can look at? Is Dr. Scott
going to be berating me soon?

Ann Harrell

"CodeCharge" <support@codecharge.com> wrote in message
news:9hc333$j47$1@news.codecharge.com...
> If you are directing this posting to CodeCharge Support, please submit it
to
> http://support.codecharge.com
>
>
> "Ann Harrell" <ann@hoosierlink.net> wrote in message
>news:9hbn1j$t8q$1@news.codecharge.com...
> > Anybody home?
> >
> >
> > "Ann Harrell" <ann@hoosierlink.net> wrote in message
> >news:9halod$fj$1@news.codecharge.com...
> > > I'm trying to duplicate this using CodeCharge:
> > > http://www.bourbon.org/harrell/index.cfm
> > >
> > > I successfully added the (Now()) -1 so only "current" events show. I
> know
> > I
> > > can modify the date in the generated code later. I have NOT figured
out
> > how
> > > to do that CC.
> > >
> > > My database is: Schedule
> > > Table1: Bgames Table2 Bcode_Colors
> > > Event_ID bCode
> > > bCode bFont_Color
> > > bEvent bName
> > > bTime
> > > bDay
> > >
> > > I used the 4 page wizard again but can't seem to get the variable
> > produces.
> > >
> > > Ann Harrell
> > >
> > > <CFQUERY NAME="GetEvents" DATASOURCE="schedule">
> > > SELECT bGames.bCode, bEvent, bTime, bDay, bFont_Color
> > > FROM bGames, bCode_Colors
> > > WHERE bDay > (Now())-1 and bGames.bCode = BCode_Colors.BCode
> > > Order BY bGames.bDay
> > > </CFQUERY>
> > > <cfinclude template="Toolbar.cfm"><BR>
> > > <FONT FACE="Arial" SIZE="+1" COLOR="Red">Report for 6:00 PM game at
5:20
> > and
> > > 7:30 PM game at 6:50 per coach.</FONT><BR>
> > > <TABLE WIDTH="85%" BORDER="1" ALIGN="left" BGCOLOR="White">
> > > <TR>
> > > <TH ALIGN="left" BGCOLOR="Navy"><FONT FACE="Arial" SIZE="+2"
> > > COLOR="#FFFFDF">Event</font></TH>
> > > <TH ALIGN="left" BGCOLOR="Navy"><FONT FACE="Arial" SIZE="+2"
> > > COLOR="#FFFFDF">Time</font></TH>
> > > <TH ALIGN="left" BGCOLOR="Navy"><FONT FACE="Arial" SIZE="+2"
> > > COLOR="#FFFFDF">Date</font></TH>
> > > </TR>
> > > <CFOUTPUT QUERY="GetEvents">
> > > <TR>
> > > <TD><B><B><FONT FACE="Arial"
> > > COLOR="#bFont_Color#"></B>#bEvent#</FONT></B></TD>
> > > <TD><B><FONT FACE="Arial"
> COLOR="#bFont_Color#">#bTime#</FONT></B></TD>
> > > <td><B><FONT FACE="Arial" COLOR="#bFont_Color#">#DateFormat(bDay,
> "mmmm
> > > dd, yyyy dddd")#</FONT></B></td>
> > > </TR>
> > >
> > > </CFOUTPUT>
> > > </TABLE>
> > >
> > > </body>
> > > </html>
> > >
> > >
> > >
> >
> >
>
>

Dr. Scott R. Senay
Posted: 06/27/2001, 5:59 PM

Hi Ann,

You know I looked at the sample you posted, and see no reason that
CodeCharge can't do it, in fact honestly it appears to be a very simple
application. What I can't figure out to help you with however is your
question. Honestly I have no idea what you are asking and that puzzles me
since I know I could build something exactly like the posted sample, but I
wouldn't need what you are asking for (that I know of since like I say, I'm
not sure what your asking...) to do it... So, if you could, let me know
what about the referenced example puzzles you about CodeCharge and I'll (if
I can) tell you how CodeCharge can get it done, or at least point you in the
right direction...

Scott...



Ann Harrell <ann@hoosierlink.net> wrote in message
news:9hcvdl$bm2$1@news.codecharge.com...
> No, it was directed at the newsgroup, which doesn't seem to be very active
> the last few days. I have 14 days left on my trial and I'm trying to see
if
> CodeCharge can handle the details.
>
> Here is the code I created:
> <td><B><FONT FACE="Arial" COLOR="#bFont_Color#">#DateFormat(bDay, "mmmm
dd,
> yyyy dddd")#</FONT></B></td>
>
> Here is what I get after changing the DataFONT in the style sheet:
> <font style="font-size: 12pt; color:
>
#bFont_Color#"><CFOUTPUT>#HTMLEditFormat(fldbDay)#</CFOUTPUT> </font></
> td></tr>
>
> Looks fine. Now, how do I enter the query information (see CF code) so it
> works? One thing I notice is that CC may not like the fact that I have two
> table fields with the same name. In CF you just add the table name
>
> bGames.bCode = bCode_Colors.bCode
>
> What am I missing here? Is there an example I can look at? Is Dr. Scott
> going to be berating me soon?
>
> Ann Harrell
>
> "CodeCharge" <support@codecharge.com> wrote in message
>news:9hc333$j47$1@news.codecharge.com...
> > If you are directing this posting to CodeCharge Support, please submit
it
> to
> > http://support.codecharge.com
> >
> >
> > "Ann Harrell" <ann@hoosierlink.net> wrote in message
> >news:9hbn1j$t8q$1@news.codecharge.com...
> > > Anybody home?
> > >
> > >
> > > "Ann Harrell" <ann@hoosierlink.net> wrote in message
> > >news:9halod$fj$1@news.codecharge.com...
> > > > I'm trying to duplicate this using CodeCharge:
> > > > http://www.bourbon.org/harrell/index.cfm
> > > >
> > > > I successfully added the (Now()) -1 so only "current" events show. I
> > know
> > > I
> > > > can modify the date in the generated code later. I have NOT figured
> out
> > > how
> > > > to do that CC.
> > > >
> > > > My database is: Schedule
> > > > Table1: Bgames Table2 Bcode_Colors
> > > > Event_ID bCode
> > > > bCode bFont_Color
> > > > bEvent bName
> > > > bTime
> > > > bDay
> > > >
> > > > I used the 4 page wizard again but can't seem to get the variable
> > > produces.
> > > >
> > > > Ann Harrell
> > > >
> > > > <CFQUERY NAME="GetEvents" DATASOURCE="schedule">
> > > > SELECT bGames.bCode, bEvent, bTime, bDay, bFont_Color
> > > > FROM bGames, bCode_Colors
> > > > WHERE bDay > (Now())-1 and bGames.bCode = BCode_Colors.BCode
> > > > Order BY bGames.bDay
> > > > </CFQUERY>
> > > > <cfinclude template="Toolbar.cfm"><BR>
> > > > <FONT FACE="Arial" SIZE="+1" COLOR="Red">Report for 6:00 PM game at
> 5:20
> > > and
> > > > 7:30 PM game at 6:50 per coach.</FONT><BR>
> > > > <TABLE WIDTH="85%" BORDER="1" ALIGN="left" BGCOLOR="White">
> > > > <TR>
> > > > <TH ALIGN="left" BGCOLOR="Navy"><FONT FACE="Arial" SIZE="+2"
> > > > COLOR="#FFFFDF">Event</font></TH>
> > > > <TH ALIGN="left" BGCOLOR="Navy"><FONT FACE="Arial" SIZE="+2"
> > > > COLOR="#FFFFDF">Time</font></TH>
> > > > <TH ALIGN="left" BGCOLOR="Navy"><FONT FACE="Arial" SIZE="+2"
> > > > COLOR="#FFFFDF">Date</font></TH>
> > > > </TR>
> > > > <CFOUTPUT QUERY="GetEvents">
> > > > <TR>
> > > > <TD><B><B><FONT FACE="Arial"
> > > > COLOR="#bFont_Color#"></B>#bEvent#</FONT></B></TD>
> > > > <TD><B><FONT FACE="Arial"
> > COLOR="#bFont_Color#">#bTime#</FONT></B></TD>
> > > > <td><B><FONT FACE="Arial" COLOR="#bFont_Color#">#DateFormat(bDay,
> > "mmmm
> > > > dd, yyyy dddd")#</FONT></B></td>
> > > > </TR>
> > > >
> > > > </CFOUTPUT>
> > > > </TABLE>
> > > >
> > > > </body>
> > > > </html>
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>

CodeCharge
Posted: 06/28/2001, 1:21 AM

Are you trying to display lookup values from another table ? In such case
you can click on field properties and select the lookup table in the "JOIN"
tab.

If you are trying to place two fields with the same name on one form, you
can click on field properties and change the name of one of them.

If you are trying to include values from two tables on one form, you can use
an SQL query instead of single table. I usually go to MS Access, design my
query visually, then view the SQL and paste it into CodeCharge Form
Properties/SQL tab. Although some databases like MySQL cannot handle more
complex queries, for example nested.

If you are trying to add a competely new variable to your generated code,
you can do this by placing your own function/code in the Form Properties /
Event section.
Usually you'd use "Before Show" Event to execut your function for each row
displayed in the grid.



"Ann Harrell" <ann@hoosierlink.net> wrote in message
news:9hcvdl$bm2$1@news.codecharge.com...
> No, it was directed at the newsgroup, which doesn't seem to be very active
> the last few days. I have 14 days left on my trial and I'm trying to see
if
> CodeCharge can handle the details.
>
> Here is the code I created:
> <td><B><FONT FACE="Arial" COLOR="#bFont_Color#">#DateFormat(bDay, "mmmm
dd,
> yyyy dddd")#</FONT></B></td>
>
> Here is what I get after changing the DataFONT in the style sheet:
> <font style="font-size: 12pt; color:
>
#bFont_Color#"><CFOUTPUT>#HTMLEditFormat(fldbDay)#</CFOUTPUT> </font></
> td></tr>
>
> Looks fine. Now, how do I enter the query information (see CF code) so it
> works? One thing I notice is that CC may not like the fact that I have two
> table fields with the same name. In CF you just add the table name
>
> bGames.bCode = bCode_Colors.bCode
>
> What am I missing here? Is there an example I can look at? Is Dr. Scott
> going to be berating me soon?
>
> Ann Harrell
>
> "CodeCharge" <support@codecharge.com> wrote in message
>news:9hc333$j47$1@news.codecharge.com...
> > If you are directing this posting to CodeCharge Support, please submit
it
> to
> > http://support.codecharge.com
> >
> >
> > "Ann Harrell" <ann@hoosierlink.net> wrote in message
> >news:9hbn1j$t8q$1@news.codecharge.com...
> > > Anybody home?
> > >
> > >
> > > "Ann Harrell" <ann@hoosierlink.net> wrote in message
> > >news:9halod$fj$1@news.codecharge.com...
> > > > I'm trying to duplicate this using CodeCharge:
> > > > http://www.bourbon.org/harrell/index.cfm
> > > >
> > > > I successfully added the (Now()) -1 so only "current" events show. I
> > know
> > > I
> > > > can modify the date in the generated code later. I have NOT figured
> out
> > > how
> > > > to do that CC.
> > > >
> > > > My database is: Schedule
> > > > Table1: Bgames Table2 Bcode_Colors
> > > > Event_ID bCode
> > > > bCode bFont_Color
> > > > bEvent bName
> > > > bTime
> > > > bDay
> > > >
> > > > I used the 4 page wizard again but can't seem to get the variable
> > > produces.
> > > >
> > > > Ann Harrell
> > > >
> > > > <CFQUERY NAME="GetEvents" DATASOURCE="schedule">
> > > > SELECT bGames.bCode, bEvent, bTime, bDay, bFont_Color
> > > > FROM bGames, bCode_Colors
> > > > WHERE bDay > (Now())-1 and bGames.bCode = BCode_Colors.BCode
> > > > Order BY bGames.bDay
> > > > </CFQUERY>
> > > > <cfinclude template="Toolbar.cfm"><BR>
> > > > <FONT FACE="Arial" SIZE="+1" COLOR="Red">Report for 6:00 PM game at
> 5:20
> > > and
> > > > 7:30 PM game at 6:50 per coach.</FONT><BR>
> > > > <TABLE WIDTH="85%" BORDER="1" ALIGN="left" BGCOLOR="White">
> > > > <TR>
> > > > <TH ALIGN="left" BGCOLOR="Navy"><FONT FACE="Arial" SIZE="+2"
> > > > COLOR="#FFFFDF">Event</font></TH>
> > > > <TH ALIGN="left" BGCOLOR="Navy"><FONT FACE="Arial" SIZE="+2"
> > > > COLOR="#FFFFDF">Time</font></TH>
> > > > <TH ALIGN="left" BGCOLOR="Navy"><FONT FACE="Arial" SIZE="+2"
> > > > COLOR="#FFFFDF">Date</font></TH>
> > > > </TR>
> > > > <CFOUTPUT QUERY="GetEvents">
> > > > <TR>
> > > > <TD><B><B><FONT FACE="Arial"
> > > > COLOR="#bFont_Color#"></B>#bEvent#</FONT></B></TD>
> > > > <TD><B><FONT FACE="Arial"
> > COLOR="#bFont_Color#">#bTime#</FONT></B></TD>
> > > > <td><B><FONT FACE="Arial" COLOR="#bFont_Color#">#DateFormat(bDay,
> > "mmmm
> > > > dd, yyyy dddd")#</FONT></B></td>
> > > > </TR>
> > > >
> > > > </CFOUTPUT>
> > > > </TABLE>
> > > >
> > > > </body>
> > > > </html>
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


   


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

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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