Forums
This topic is locked
Detail page statement
Posted 24 Jul 2002 01:01:23
1
has voted
24 Jul 2002 01:01:23 Kerigan Ms posted:
<font face='Arial'></font id='Arial'><font size=2></font id=size2><font color=navy></font id=navy>I am a newbie at dynamic pages. I need to build a detail page that looks like a bank statement so to speak. I have a service table that lists the service and detail. I have another access table that lists all the rates associated with said service. I did a left join in access and all I get back on the move to specific record detail page is the service and the description listed with each rate. I just want to show the service/description once and all the related rates(transactions) on that same page.
Much like a form-subform in MS Access. Except I don't know how to code. I am learning, but not fast enough. Willing to pay up to $20.00 for help. I know it's not much, but I'm broke. Divorces and puppies will do that. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
k~
Replies
Replied 24 Jul 2002 01:09:03
24 Jul 2002 01:09:03 aegis kleais replied:
I don't know about everyone else, but I don't think any of us are here to make a profit. We're all aspiring webdevs who use each other's knowledge to further our skillsets.
I want to help but I really don't follow the problem here.
A detail page is known as a Master->Detail, in that one page (master) lists results, which clicking on a link takes you to the same page (detail) but with dynamic info added to the URL to change it's output (ie, detail.asp?id=5)
You say you have a service table, which I'll call tblService. But then you say you have another date with rates that are associated with it? The problem with most cases is that we're not using the same terminology; try explaining the entire process, as well as database structure and comments as much as possible. I'll try to monitor this post so if I see a reply, I can help out.
Aegis Kleais
New Media Web Developer
(DWMX : IIS5.1 : SQL2K : WXP : ASP[VB/JS])
I want to help but I really don't follow the problem here.
A detail page is known as a Master->Detail, in that one page (master) lists results, which clicking on a link takes you to the same page (detail) but with dynamic info added to the URL to change it's output (ie, detail.asp?id=5)
You say you have a service table, which I'll call tblService. But then you say you have another date with rates that are associated with it? The problem with most cases is that we're not using the same terminology; try explaining the entire process, as well as database structure and comments as much as possible. I'll try to monitor this post so if I see a reply, I can help out.
Aegis Kleais
New Media Web Developer
(DWMX : IIS5.1 : SQL2K : WXP : ASP[VB/JS])
Replied 24 Jul 2002 12:26:19
24 Jul 2002 12:26:19 Kerigan Ms replied:
<font face='Arial'></font id='Arial'><font size=2></font id=size2><font color=navy></font id=navy>
OK, on the results page, I pull all the records from the service tbl. tblservice includes fields servicenum(primary key) and service (text) servdesc (memo) << that is the master description on the service. The second tbl is tblrates (no primary key). In tblrates I have the fields servicenum (identical to the field in tblservice primary key) , monthlyrate, installrate, vendor. tblrates is always changing so I set it up like a transaction. ie.
We have a service called ATM and the servicenum is 385.
In tblrates I list transactions like this.
ATM, 385 rate, install, vendor1
ATM, 385 rate, install, vendor2
ATM, 385 rate, install, vendor3
...
So, here is my problem. The vendors and rates change all the time so the records (transactions) in tblrates are updated daily. I set up a left join query between the two tables and I get a list of all the services in tblservice and then all the matches in tblrates. So a typical query set record is returned like this:
ATM , description, vendor1, rate, install
ATM , description, vendor2, rate, install
ATM , description, vendor3, rate, install
....
When I set up my results page I pull all the records from tblservice to show a listing of just the service with a link to a detail page. Then I set up a detail page to pull the matching records from the qryserv recordset. That is where I run into a problem. What I would like to display on the detail page is a structure like this:
ATM - description
- rate, install, vendor1
- rate, install, vendor2
- rate, install, vendor3
What I get is exactly what the qry shows and it comes out looking like this:
ATM - description, rate, install, vendor1
ATM - description, rate, install, vendor2
ATM - description, rate, install, vendor3
...
The description field may be 2 paragraphs but it is the same information. It would be like getting a bank statement and next to every check would be your name, info, and account address with the check number instead of just listing your name, info and account address once and then below have a listing of all the checks.
Does that help any? Sorry, I am a newbie. I can send you any information you need. Thanks so much for helping out. I would never ask anyone to pay me either, but I thought I would ask anyway. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
k~
OK, on the results page, I pull all the records from the service tbl. tblservice includes fields servicenum(primary key) and service (text) servdesc (memo) << that is the master description on the service. The second tbl is tblrates (no primary key). In tblrates I have the fields servicenum (identical to the field in tblservice primary key) , monthlyrate, installrate, vendor. tblrates is always changing so I set it up like a transaction. ie.
We have a service called ATM and the servicenum is 385.
In tblrates I list transactions like this.
ATM, 385 rate, install, vendor1
ATM, 385 rate, install, vendor2
ATM, 385 rate, install, vendor3
...
So, here is my problem. The vendors and rates change all the time so the records (transactions) in tblrates are updated daily. I set up a left join query between the two tables and I get a list of all the services in tblservice and then all the matches in tblrates. So a typical query set record is returned like this:
ATM , description, vendor1, rate, install
ATM , description, vendor2, rate, install
ATM , description, vendor3, rate, install
....
When I set up my results page I pull all the records from tblservice to show a listing of just the service with a link to a detail page. Then I set up a detail page to pull the matching records from the qryserv recordset. That is where I run into a problem. What I would like to display on the detail page is a structure like this:
ATM - description
- rate, install, vendor1
- rate, install, vendor2
- rate, install, vendor3
What I get is exactly what the qry shows and it comes out looking like this:
ATM - description, rate, install, vendor1
ATM - description, rate, install, vendor2
ATM - description, rate, install, vendor3
...
The description field may be 2 paragraphs but it is the same information. It would be like getting a bank statement and next to every check would be your name, info, and account address with the check number instead of just listing your name, info and account address once and then below have a listing of all the checks.
Does that help any? Sorry, I am a newbie. I can send you any information you need. Thanks so much for helping out. I would never ask anyone to pay me either, but I thought I would ask anyway. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
k~
Replied 24 Jul 2002 18:46:53
24 Jul 2002 18:46:53 aegis kleais replied:
Results.asp
Pull all records from:
tblService
->ServiceNum (Index)
->Service (text)
->ServDesc (memo) - Master description on the service
tblRates
->ServiceNum
->MonthlyRate
->InstallRate
->Vendor
Make Recordset1 pull tblService and
make Recordset2 pull tblRates
So on the Results.asp page you want something like:
<%
Response.Write("<a href='detail.asp?serviceNum=" & Recordset1.Fields.Item"ServiceNum".Value & "'>" & Recordset1.Fields.Item"Service".Value & "</a>"
%>
Do a repeat region on this and the results page will show:
Service (which links to detail.asp?serviceNum=service)
Service2 (which links to detail.asp?serviceNum=service2)
Service3 (which links to detail.asp?serviceNum=service3)
Service4 (which links to detail.asp?service=Numservice4)
......
So on your detail page, the Recordset2 will be using the value passed in the URL to create itself.
Would be something like:
SELECT * from tblRates WHERE ServiceNum = Request.QueryString("serviceNum"
That will populate the recordset2 on the detail.asp page with the list of records in tblRates that have the same service number. Then just output it as you want, where you want, and apply a repeat region to it.
Recordset2.Fields.Item("ServiceNum".Value
Recordset2.Fields.Item("MonthlyRate".Value
Recordset2.Fields.Item("InstallRate".Value
Recordset2.Fields.Item("Vendor".Value
If I'm on the right path, let me know...otherwise, explain further and I'll see what I can do. I'm very naming-convention happy (ie, tables are tblName, fields are fldName, recordsets are rsName or rcdName, as well as my variables: myName, happyLittleGoat, and so are my functions: Sub funcName, etc. Worth the extra time.
Aegis Kleais
New Media Web Developer
(DWMX : IIS5.1 : SQL2K : WXP : ASP[VB/JS])
Pull all records from:
tblService
->ServiceNum (Index)
->Service (text)
->ServDesc (memo) - Master description on the service
tblRates
->ServiceNum
->MonthlyRate
->InstallRate
->Vendor
Make Recordset1 pull tblService and
make Recordset2 pull tblRates
So on the Results.asp page you want something like:
<%
Response.Write("<a href='detail.asp?serviceNum=" & Recordset1.Fields.Item"ServiceNum".Value & "'>" & Recordset1.Fields.Item"Service".Value & "</a>"
%>
Do a repeat region on this and the results page will show:
Service (which links to detail.asp?serviceNum=service)
Service2 (which links to detail.asp?serviceNum=service2)
Service3 (which links to detail.asp?serviceNum=service3)
Service4 (which links to detail.asp?service=Numservice4)
......
So on your detail page, the Recordset2 will be using the value passed in the URL to create itself.
Would be something like:
SELECT * from tblRates WHERE ServiceNum = Request.QueryString("serviceNum"
That will populate the recordset2 on the detail.asp page with the list of records in tblRates that have the same service number. Then just output it as you want, where you want, and apply a repeat region to it.
Recordset2.Fields.Item("ServiceNum".Value
Recordset2.Fields.Item("MonthlyRate".Value
Recordset2.Fields.Item("InstallRate".Value
Recordset2.Fields.Item("Vendor".Value
If I'm on the right path, let me know...otherwise, explain further and I'll see what I can do. I'm very naming-convention happy (ie, tables are tblName, fields are fldName, recordsets are rsName or rcdName, as well as my variables: myName, happyLittleGoat, and so are my functions: Sub funcName, etc. Worth the extra time.
Aegis Kleais
New Media Web Developer
(DWMX : IIS5.1 : SQL2K : WXP : ASP[VB/JS])