Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 12:25 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Database Help
PostPosted: April 7th, 2013, 11:14 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
bizzybee wrote:
I am interested in learning how to handle the extra line.
Is it possible to generate a word doc from the publication?
writing a word .doc file? I would say 'no' (I think). You can write a .html file. Look in the help file for supported filetypes.

For the 'extra line' removal in displaying DB records, I will outline the concept. You may as well learn to put this into a Loop now too. ( I will go through it 'fast' )

a. create a page variable to hold a value for the number of records from a query. Then wherever you had the action to run the Query, add an Action below it to GetNumberOfRecords and store in that variable (e.g., Q1_numRec ).

b. create a Loop Action.
Use your var Q1_numRec -1 (minus 1) as the upper limit. [note: you will need to experiment with whether it is record number or the 'minus 1'. I do not use Std Actions much, so you must work to understand the logic (of zero-index concept). Generally, if the first record is considered record #1, then we do not use the 'minus 1'. If the first record is referred to by an Index, it is likely a zero-index so it is related to 'zero' and we will use the 'minus 1'.]

c. now for the Loop Action you can actually go back and Select and COPY the set of Actions you currently have under that 'Next Record' Button (which displayed the next line of a DB query or recordset). Once you do the COPY, come back to the Loop Action, Select it.... and the Ctrl-V to Paste the set of Actions.
Here you can drag the Actions up or down in the sequence.

continuing... create an IF Action as the first action in that loop.
...something to achieve the following logic:
Quote:
IF current_record_number is Less Than Q1_numRec
then aNewline equals "\n"
else
aNewline equals ""
//In other words, that variable will add a New Line as long as we have not reached the last record.


[ETA] Depending how you use the variable for record_number (for example one variable but used on multiple queries), you should consider setting it to zero after closing the query (or similar thinking).

That is it.

- - - - - - - - - -
The result should be the same populating of the Listbox, but run automatically once you initiate the Loop. (you can add a Delay action in the Loop to make the process more visible).

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 36 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group