Wednesday, March 28, 2012

how to create pages on-the-fly

Hi,
Its a simple requirement but i have failed to figure it out.
I have a Report.rpt file which is printing some text inputted by the user and it is going to print the number of copy of the pages (like "Page N of M" in crystal report) which is also given by the user.

i.e. if the user inputs 3 as the number of copy it is going to print, the Report needs to be build with creating 3 pages and following text needs to be there :
Page 1 of 3
Page 2 of 3
Page 3 of 3

The problem is to create these 3 pages in the report.

There is no group inserted and connection with any source. Only the text value and the value for the number of pages send from VB6.

I could have send the report to the printer M# of times, depending on the value of M given by the user But it is not a good one and i also need to give the option to choose the printer to the user (crxRpt.PrinterSetup 0 ). And that solution is going to ask to choose the printer for each page.

May be its a dump question but i am in pain. Please think for a while to help me out.

Regards
-JoyshimaWhy do you want to do this?
I dont think this is possible
Can you explain more?|||Thanks for your responce. I was waiting for you.

I am doing it for a nursing home and they need to take print out of some kind of header card. Lets say they need to print 3 header card and they will be as follows :

------
Header 1 of 3
XXXXXX
------

------
Header 2 of 3
XXXXXX
------

------
Header 3 of 3
XXXXXX
------

So the input is the total number of the header card and the text they want to be printed on it. Also I need to give them the option to choose the printer before printing and number of copies they want.

Please suggest me something for it.|||Instead of Page 1 of 3 do you want to show it as header 1 of 3?|||"Page 1 of 3" or "Header 1 of 3" that text is not the problem. The problem is to create that 3 pages according to users input.

I have created two parameter on which i am sending (from VB6) the value for the text "XXXXXX" and the value that the user inputs (i.e. for the example it is 3).

Now with this information i need to create the pages (i.e. 3 page) and print the text and the header/Page text.

Any idea? how can i?|||You need to have a table having these information
Text
Header

When user inputs those say "XXXXXXX" and 3, insert three records to that table having
XXXXXXX header 1 of 3
XXXXXXX header 2 of 3
XXXXXXX header 3 of 3

Now design a report based on this table
Group it by first column
Right click on Group header and select Section Expert
Check the check box, "New Page After"

Try it and see what happens|||Yes Madhi, I have done this to give the solution, but couldn't like that. For a small amount of data you need to carry a database and table - too much heavy. And also it is simple task to print some text on page.

Is it possible to create recordset without any table from VB6? If i can put the data as three record inside that recordset and send it to the report file (rpt file), i may be able to have three pages from it.

Therefore the three record on the recordset would be :
XXXXXXX header 1 of 3
XXXXXXX header 2 of 3
XXXXXXX header 3 of 3
This is only my idea. Let me know your opinion.
-Joyshima|||I am not sure about your point

See if this supports your point
http://support.businessobjects.com/library/kbase/articles/c2011950.asp

No comments:

Post a Comment