Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
shantanu73
Creator II
Creator II

Want to know the Step to get particualar word printed at the End of Report

Hello Forums/Friends,

I had developed one report. There are lot of problem PFA of the same. Let me put the one problem first which is very important. It is 3 pages report.

In the 3rd/Last page I had written the words "End of Report" with the help of by ticking the Page Setting->Setting->Appendix Placement-Last Paper

and Appendx Height = 3 %

But problem is that word "End of Report" is get printed at the end of the page of Last/3rd Page. Pls see the attachment.

I want that As Soon As the Report End after 2nd or 3rd line the word "End of Report" should get printed in Last page.

I hope I had able to explain the scenario.

I had struk here. It will be greate help if anybody can show me the way.

Thanks in Advance

Shantanu

23 Replies
Not applicable

it's much more coplicated than i thought:/

I've got a problem with calculating size of Your chart in macro:/

by the way.... i've lost Qv licence for couple days so i can't  open any other files but my own

shantanu73
Creator II
Creator II
Author

Hello Pari,

That fine. But can u put your script on paper, give me some idea, some hint, some macro script/script, some type of help by assuming that there will one Pivot Chart Table with 2 columns having related Object ID and so on by keeping in mind my requirement. So, that I work on that.

OR

U can develop small report as per you convience and send same back to me. I can open here.

Thanks in Advance

Shantanu

Not applicable

ok

let's start from the beginnning

what i can suggest is to create a macro which:

- export bar chart to excell

- export straight/pivot chart to excell

- export/write  END OF REPORT text (just 1/2 rows below straight/pivot chart

then You have to do something:

- export excell as pdf or simply print that excell

we'll see...

so check attached sample (qvw file)

*macro code:

sub ExportExcel()

        Set xlApp = CreateObject("Excel.Application")

        xlApp.Visible = true

        Set xlDoc = xlApp.Workbooks.Add()

        'Create the new sheet and the content in the sheet

        Set xlSheet = xlDoc.Worksheets.Add

         xlSheet.Name = "testsheet"

         'copy bar chart

         ActiveDocument.GetSheetObject("CH02").CopyBitmapToClipboard

        XLDoc.Sheets("testsheet").Range("A" & 1).Select

        XLDoc.Sheets("testsheet").Paste

        'copy table  

        Set chart = ActiveDocument.GetSheetObject("CH01")   

        chart.CopyTableToClipboard true   

        xlSheet.Paste xlSheet.Range("A19")

        'count rows in chart

        x = chart.GetRowCount

        'Msgbox(x)

        'past END OF REPORT text below chart

        ActiveDocument.GetSheetObject("TX01").CopyTextToClipboard

        xlSheet.Paste xlSheet.Range("B"&x+20)

End sub

shantanu73
Creator II
Creator II
Author

Hello Pari

Thanks for response. But I want the output directly in PDF.

I had already developed the report which get saved in PDF.

My problem is Suppose the report get end at the 2nd pages and at  that time the word "END OF REPORT" is get print at the End of Page.

I want as soon as report get end the word "End of Report' should get printed at 1st or 2nd or 3rd line from the end of report. But not at the end of the last page. The way u have shown in Excel is perfect but I want in PDF.

U can develop only by takeing Pivot Chart Table with one or 2 column wihich will be ok for me with the word "End of Report" at the End of the report.

Thanks & Regards

Shantanu

Not applicable

Could You past Your macro code? I'll see

shantanu73
Creator II
Creator II
Author

Hello Pari

To Macro is very little. As follows :-

Sub PDF_Print_BILL
ActiveDocument.PrintReport "VABILL", "PDF-XChange 3.0", false
End Sub

Note:

FYI, Where  "VABILL" is Report ID fo the Report which I had created.

Let me know Incase of any more information require

Thanks

Shantanu

Not applicable

ok

victory is near:D

will this be ok if i use my macro(presented above) + add code to print that excell as pdf?

shantanu73
Creator II
Creator II
Author

Hello Pari,

Thanks for Idea. Which was already come in mind as soon as I had seen your macro. But I want the output directly in PDF not in Excel. As I had mention in above trailing mail.

The reason is assum that. Suppose we have to generat about more million on PDF of customer. At that time 1st we have to generate the Excel and then PDF. Which will be time consuming job.

And Secondly, The, desiging the report in Report Editor will be easy and comfort

Thanks

Shantanu

Not applicable

holly... who do you working for?:)

You generate millions pdf?

PS I'll try but this would be much more difficult:(

shantanu73
Creator II
Creator II
Author

Hello Pari,

It is the assumption suppose these situation occures then what will happen.

However, My requirment is that I want to generate PDF from QV directly without any bridge.

I only got struck off to get printed words "End of Report" after 1 or 2 line from the the place where

report get end.

Thanks & Regards

Shantanu