Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 14 of 14
  1. #1
    Join Date
    Feb 2003
    Location
    Hertfordshire - UK
    Posts
    172

    HTML reporting (again)

    Hi all - a while back I recieved some help from Worm and a few notable others regarding turning my sqlite queries into reports. I was given an example file which works fine but I am really battling with the output format. I would ideally like to be able to choose which fields to output - relevant to the query requested. The current report is also unprintable as it runs way over the page. I would really like to be able to have more control over the way the report looks but I am no HTML guru and d.weaver just complicates the issue by adding loads of its own code.

    I'm kinda after the following layout for each record:

    id number | firstname | surname | date joined | status
    address| contact num1|
    email1 | email2

    Can someone write a plugin to make this easier?
    With our fists clenched,
    We cannot shake hands

  2. #2
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Hi. Dreamweaver doesn't add tons of code. It adds a few extra font tags, which make no real world difference in both performance, and maintenance. It is the most used HTML tool anywhere and is the sole tool behind a large percentage of the internet's busiest web sites. Certainly for your usage it is the best, most appropriate tool available.

    In Dreamweaver using COMMAND > CLEAN UP HTML usually gets rid of the extra code altogether anyhow. Takes one click and you only need to do it once, i.e. last thing, just before you publish. The cleaning process itself only takes a couple seconds...

    In terms of writing a plug-in for writing simple HTML pages, it's probably not going to materialize due to the limit in demand caused by the ease of writing your own HTML using the TextFile actions. That doesn't mean it won't happen but on the surface it seems unlikely there would be enough sales to make it worthwhile for someone to create and support such a plug-in.

    Anyhow the good news is that HTML is a very simple issue and one can sit down and learn the ins and outs of it in a single afternoon, so that's definitely your best bet. In the long run, if you are seeking to control your delivery of HTML it's the "only" real solution. Actually it's kind of fun anyhow, everyone who learns HTML seems to enjoy the process for the most part.

    Corey Milner
    Creative Director, Indigo Rose Software

  3. #3
    Join Date
    Feb 2003
    Location
    Hertfordshire - UK
    Posts
    172
    Maybe it just seems like tons of code. I guess it's a little daunting trying to learn HTML as well as making it work in AMS. I have a shadow of an idea as to how to go about it, but I think it's gonna get complicated...

    I was hoping for a plugin as SQlite is such a massive boon to AMS, and a general reporting engine kinda goes hand in hand with that. You have one customer right here (flicking a thumb through a big, dirty wad of cash)...

    I'll keep plugin' away - no pun intended...

    Thanks, anyway.
    With our fists clenched,
    We cannot shake hands

  4. #4
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Hi. FWIW HTML is easy to learn, there's tons of free resources on Google. If you can learn AMS, HTML will be a breeze. HTML is not complicated, I have taught it personally to dozens and dozens of people in a few hours, many of whom displayed very limited aptitude. I have full confidence in your ability to learn it. Many of the free resources for learning HTML which are on Google are absolutely magnificient and are geared directly to people in your scenario.

    As for a plug-in to write HTML, who knows maybe some intrepid 3rd party will try it out. If you don't like Dreamweaver, there's a free tool called "Firstpage" out there which is similar and is very, very good... More or less like Dreamweaver except free.

    Anyhow HTML knowledge is a great asset for any multimedia designer and is definitely worth the afternoon it takes to learn. It's not just about knowing the code, it's also about building an efficient workflow and confidence in your abilities. Today is Sunday. Sundays are ideal for learning HTML.

    Corey Milner
    Creative Director, Indigo Rose Software

  5. #5
    Join Date
    Jun 2000
    Location
    England
    Posts
    200
    Firstpage is excellent, especially for free. I don't think there is much support for it now, but most of it is self explanatory. There is even a plugin FTP program.

    You could go hair-shirt and just use a text editor, I know people who do.

    As I used to be a DOS WordStar user, inserting formatting tags into a document came fairly easily, but once you've got the principle the hardest part is just remembering exactly which code to insert, which is where HTML editors come into their own.

    I would recommend this site which takes you through building a complete site with nothing more than a flask of coffee and Notepad, I prefer Textpad, (which has a HTML tag addin) but everyone has their own favourite text editor.

    Cheers

  6. #6
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Great link! Yep, that's the ticket.

    Corey Milner
    Creative Director, Indigo Rose Software

  7. #7
    Join Date
    Feb 2003
    Location
    Hertfordshire - UK
    Posts
    172
    Nice one - thanks for the great link. I think I may have confused you guys a bit here. I have some rudimentary HTML skills - although nearly all my web work takes place without using raw code. My real problem is creating a looping structure in AMS that will create the exact layout that I want. I'm sure I can manage this, it might just take some time...

    At the mo I am creating the page in Dweaver and then cutting and pasting the HTML into AMS in strings - it's just going horribly right now... I'm having to amend each line as i'm getting all sorts of errors - using '\' and so on. Would be nice to be able to tell AMS to 'ignore this code - is HTML' in much the same way as it ignores comments. That way I could just dump my HTML straight in and save myself a few more grey hairs...
    With our fists clenched,
    We cannot shake hands

  8. #8
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Hi. A simple global replace will turn all " into \" with one click. you can do this in any text editor or Dreamweaver...

    Corey Milner
    Creative Director, Indigo Rose Software

  9. #9
    Join Date
    Feb 2003
    Location
    Hertfordshire - UK
    Posts
    172
    Thanks - I guess the real problem here is I have just got lazy. AMS takes so much of the hard work out of development I have sort of got used to having it all on a plate for me.

    I have had some success with the following example -

    pagecode = String.Replace(pagecode, "~idnumber~", tblResult.Data[1]["MEMBERSHIPNO"], false);

    Of course, this only displays one item. What I ideally need to do is create a table populated by placeholders for each field I want to display and then have this table duplicated for every record returned by the query - does that sound about right?
    With our fists clenched,
    We cannot shake hands

  10. #10
    Join Date
    Feb 2003
    Location
    Hertfordshire - UK
    Posts
    172
    Can you guys have a look at this and tell me where I stink?

    --**CREATE LOOP FOR MAKING A TABLE AND REPORTING ALL RECORDS**
    for i = 1, tblResult.Rows do
    table = ""<table width="75%" border="0">
    \<tr>
    <td width="14%" bgcolor="#FFFFFF"><font color="#FF0000" size="3" face="Tahoma">~idnumber~</font></td>
    <td width="20%">~firstname~</td>
    <td width="66%">~surname~</td>
    </tr>
    </table>""

    --use stringreplace to replace the placeholders in the template with my fields
    pagecode = String.Replace(pagecode, "~idnumber~", tblResult.Data[i]["MEMBERSHIPNO"], false);
    end
    --
    Thanks - with your continued support I'll master this yet...
    With our fists clenched,
    We cannot shake hands

  11. #11
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Dulux,
    What in the sample I posted to you the other day are you having difficulty grasping? The sample I uploaded did basically this exact thing

    Thread

    Quote Originally Posted by dulux1309
    Can you guys have a look at this and tell me where I stink?

    --**CREATE LOOP FOR MAKING A TABLE AND REPORTING ALL RECORDS**
    for i = 1, tblResult.Rows do
    table = ""<table width="75%" border="0">
    \<tr>
    <td width="14%" bgcolor="#FFFFFF"><font color="#FF0000" size="3" face="Tahoma">~idnumber~</font></td>
    <td width="20%">~firstname~</td>
    <td width="66%">~surname~</td>
    </tr>
    </table>""

    --use stringreplace to replace the placeholders in the template with my fields
    pagecode = String.Replace(pagecode, "~idnumber~", tblResult.Data[i]["MEMBERSHIPNO"], false);
    end
    --
    Thanks - with your continued support I'll master this yet...

  12. #12
    Join Date
    Feb 2003
    Location
    Hertfordshire - UK
    Posts
    172
    The sample you kindly put up I have been using and trying to manipulate - it currently shows all fields in a format that I am having trouble printing out. I really need to change it so that I only get certain fields, depending on the query selected. I am sure I am coming across as extremely dense, but I did understand most of the code you posted, just having a problem amending it to suit my requirements. I think the loop that creates and formats the table also has a question mark over it, but maybe I need to spend more time on it.

    I hate to appear like one of those guys who just can't be bothered and wants everyone to drop everything, rally round and write my app for me. I do appreciate the help - even more when I learn from it and begin to grasp the concepts behind it...
    With our fists clenched,
    We cannot shake hands

  13. #13
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    using the sample I uploaded you could do the same. Instead of doing a :

    Select * from MEMBERS

    Do This:

    Select ID, FirstName, SurName from MEMBERS

    The code will create a table using whatever fields you choose in your Select statement.


    Quote Originally Posted by dulux1309
    The sample you kindly put up I have been using and trying to manipulate - it currently shows all fields in a format that I am having trouble printing out. I really need to change it so that I only get certain fields, depending on the query selected. I am sure I am coming across as extremely dense, but I did understand most of the code you posted, just having a problem amending it to suit my requirements. I think the loop that creates and formats the table also has a question mark over it, but maybe I need to spend more time on it.

    I hate to appear like one of those guys who just can't be bothered and wants everyone to drop everything, rally round and write my app for me. I do appreciate the help - even more when I learn from it and begin to grasp the concepts behind it...

  14. #14
    Join Date
    Feb 2003
    Location
    Hertfordshire - UK
    Posts
    172
    Thanks, Worm. I'll try it out and let you know.
    With our fists clenched,
    We cannot shake hands

Similar Threads

  1. Opening an HTML File in a Pop-Up Window
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 09-26-2003, 01:27 PM
  2. Mac autostart function???
    By Protocol in forum AutoPlay Media Studio 4.0
    Replies: 21
    Last Post: 06-26-2003, 10:25 AM
  3. HOWTO: Open an HTML Help File to a Specific Topic
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-01-2002, 02:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts