Mike Yearwood
Toronto, Ontario, Canada
Information générale
Catégorie:
Gestionnaire de rapports & Rapports
>maybe combining into one cursor could be the answer, but i don't think that will be easy in this case.
SELECT * FROM tblServices WHERE INLIST(servicecode, serv1, serv2, serv3) INTO cursor reportcursor order by ServiceCode, servicedate
report form servicelog
What is easier than that?
>
>the report is to keep track of our accounts based on different type of services provided. I create a cursor that has the last name, amount charged, and more, for one service. Then I create a cursor with the same request for another service offered. There are a probably 10 different services, so 10 different cursors are created. Only the last select into cursor statement from the function is available to the report.
>
>I do it this way b/c it helps me keep my programming organized, and also to avoid inevitable (at least to me) error messages, stating things like "query too complex", or running into the 255 character limit for the select statement in merge documents with word and msquery. this way, i can do all my select statements in one function, call the function once, and have the results available.
>
>The reason combining into one cursor probably won't work is that I would have a field, for example "lastname", or "amountcharged", that is used in each cursor. in the combined cursor, I would need to have "select lastname from cursor_service1 as service1_lastname". I would have to repeat for each of the services, and also do that for "amountcharged", and it would get pretty messy.
>
>If there is not an easier way to have more than 1 cursor available to the report, I will have to give this a go. However, I have found that debugging my programs is much easier if I keep things organized and, for me, simple.
>
>Version is 8.0.
>
>Paul
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement