One record three times

Khushalay

Registered User.
Local time
Today, 10:57
Joined
Apr 16, 2016
Messages
180
Hi friends

Is is possible to print one record, 3 times on a single paper. My requirement is to print same record three times on one sheet.

Thanks in advance
 
Yes - Either simply duplicate your report fields 3 times, within the space you have for one page, or get clever in the underlying query to repeat the same record 3 times.
 
Thanks Minty

But how to do that. Sorry dont know either. Please help
 
Well the first option is simple, copy and paste all your report fields back onto the same page...(not elegant but it actually works...) The second one is slightly more involved and would need you to show me the exact query you are using at the moment.
 
One way to get a query to produce the same records three times is to make a union query of the same query three times something like

Code:
SELECT * FROM SomeTable WHERE .......
UNION ALL
SELECT * FROM SomeTable WHERE .......
UNION ALL
SELECT * FROM SomeTable WHERE .......

Note that the key word ALL is important otherwise you'd end up with one copy of each record and of course if the output is to only have three records the WHERE clauses would have to select that single record.
 
SELECT order.SalesOrderNo, order.Customer, order.Description, order.CustomerOrderNo, order.CustomerRefNo, order.Shipped
FROM [order]
WHERE (((order.Shipped)<>True));
UNION ALL
SELECT order.SalesOrderNo, order.Customer, order.Description, order.CustomerOrderNo, order.CustomerRefNo, order.Shipped
FROM [order]
WHERE (((order.Shipped)<>True));
UNION ALL
SELECT order.SalesOrderNo, order.Customer, order.Description, order.CustomerOrderNo, order.CustomerRefNo, order.Shipped
FROM [order]
WHERE (((order.Shipped)<>True));

Here is my query, it gives synatx error in Order by clause.
 
I did this, now this doesn't show error but no difference in the report

SELECT order.SalesOrderNo, order.Customer, order.Description, order.CustomerOrderNo, order.CustomerRefNo, order.Shipped
FROM [order]
WHERE (((order.Shipped)<>True));

UNION ALL

SELECT SalesOrderNo,Customer, Description, CustomerOrderNo, CustomerRefNo, Shipped
FROM [order]
WHERE (((order.Shipped)<>True));

UNION ALL SELECT SalesOrderNo,Customer, Description, CustomerOrderNo, CustomerRefNo, Shipped
FROM [order]
WHERE (((order.Shipped)<>True));
 
It seems to be confused by the name of the table. If I change the table name to orders then it works. I'll see if I can figure out how to make it work with the table name of order.
 
as previously explained - order is a reserved word. The only way it might work is to put order in square brackets (in criteria), however not guaranteed this will work and better to not use a reserved word.
 
You can make it work by putting brackets around any instance of the name order like:

Code:
SELECT [order].SalesOrderNo, [order].Customer, [order].Description, [order].CustomerOrderNo, [order].CustomerRefNo, [order].Shipped
FROM [order]
WHERE ((([order].Shipped)=True))
UNION ALL
SELECT [order].SalesOrderNo, [order].Customer, [order].Description, [order].CustomerOrderNo, [order].CustomerRefNo, [order].Shipped
FROM [order]
WHERE ((([order].Shipped)=True))
UNION ALL SELECT [order].SalesOrderNo, [order].Customer, [order].Description, [order].CustomerOrderNo, [order].CustomerRefNo, [order].Shipped
FROM [order]
WHERE ((([order].Shipped)=True));
But if you can I suggest changing the table name to prevent problems in the future.
 
your last post has semi colons - so only the first select will work, go back to your previous post

edit, that has semi colons as well - there shouldn't be any

Maybe they shouldn't be any but oddly they works with them in so I've stop taking them out in the UNION queries I create.
 
I have put brackets and removed the semi colons as well, still nothing happened
 
Change the table name. Then if still not working, post up your code with the new name.
 
The attached database demonstrates that it works with brackets. Maybe you can figure out what's difference about yours from looking at it.

If you upload your database I'll see if I can figure out what's wrong.
 

Attachments

I copied the code in your db and pasted it in mine. Still it doesnt work
 
Last edited:
Oh great, its done, it was three times but all scattered, I just sorted my report and it done. thanks so much
 

Users who are viewing this thread

Back
Top Bottom