How to merge multiple datasets in reporting services
we are having difficulty in developing a report because the dataset we needed for the report is coming from 2 separate stored procedure. these 2 stored procedure are returninga single table each, and we need 5 columns in the first table and 4 columns from
the second table, and present these 9 fields into a table in the report.
To give an illustration, let's say that my first stored procedure returns the following 5 fields from the customer table: first name, last name, address, email, phone. While, the second stored procedure returns the following 4 fields from the orders table:
item name, quantity, unit price, discount. The two tables are related by customer_id field which is present in both tables. Customer table has a one to many relationship with orders table.
This could have been easily implemented by using an inner join and writing a sql query. However, due to business requirements we need to generate the report using the 2 stored procedure mentioned. Please let me know if there is any workaround for this. We
are using SSRS 2012. Many Thanks in advance
I can see 2 ways of achieving this.
1. Using LookupSet function for 1:N relationship.
Refer
http://www.bidn.com/blogs/DustinRyan/bidn-blog/2037/lookup-and-lookupset-functions-new-in-ssrs-2008-r2
Refer http://technet.microsoft.com/en-us/library/ee240819.aspx
2. Working with both stored procedure and creating a new dataset. For example, Create temp tables and then,
INSERT INTO #Table1 EXEC PROC1
INSERT INTO #Table2 EXEC PROC2
SELECT * FROM #Table1 A INNER JOIN #Table2 B ON A.CustomerID = B.CustomerID
Refer
http://stackoverflow.com/questions/12621469/sql-server-insert-stored-procedure-results-into-table-based-on-parameters
Regards, RSingh
Similar Messages
-
How to merge multiple XML or Text documents into 1 Word Document?
Hi all,
We're looking for a way to merge multiple XML or Text documents into 1 Word document.
All the XML or Text documents are oriented as a 'Paragraph', meaning smaller pieces of text.
By selecting some of these XML documents, the system should be able to create a new Word document with all the selected text paragraphs included.
The Word document can then be edited for applying a correct lay-out and the document is ready.
Actually, we are trying to do some kind of 'mail merge' but with multiple XML or Text documents!
Has anybody an idea whether something exist already or give us a direction how to proceed?
Thanks in advance,
Pascal DecockYou use Assembler for this purpose.
1) Assembler can be accessed through LC Java API. See http://help.adobe.com/en_US/enterpriseplatform/10.0/programLC/help/index.html
API Quick Starts (Code Examples) > Assembler Service API Quick Starts
2) Last week I posted on generating and merging PDF's from PostScript. Take a look at the assembly service instance in the .lca. Assembler uses DDX (Document Description XML) to describe document construction. NOTE the .lca was developed with ES 3 (aka ADEP). The .lca It contains the most basic DDX.
<?xml version="1.0" encoding="UTF-8"?>
<DDX xmlns="http://ns.adobe.com/DDX/1.0/">
<PDF result="out.pdf">
<PDF source="inDoc1"/>
<PDF source="inDoc2"/>
</PDF>
</DDX>
http://forums.adobe.com/message/4019760#4019760
DDX Reference at http://help.adobe.com/en_US/livecycle/9.0/ddxRef.pdf
Steve -
HI Forum
I am a newbie to both Acrobat and VB,
Basically a perl Developer,
I have created a application to Merge multiple PDF's into a Single PDF, but the problem I am facing is some pages are missed during Merging
For Example
I have 4 pdf's (1.pdf, 2.pdf, 3.pdf, 4.pdf), each PDF has 2 pages, totally 8 pages,
When i merge using my application, it is getting collapsed and then merged
Here is my Code
<code>
Imports System.IO
Imports Acrobat
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MergePDF()
End Sub
Sub MergePDF()
Dim gPDDoc1 As AcroPDDoc
Dim gPDDoc2 As AcroPDDoc
Dim gPDDoc3 As AcroPDDoc
Dim gPDDoc4 As AcroPDDoc
gPDDoc1 = CreateObject("AcroExch.PDDoc")
gPDDoc2 = CreateObject("AcroExch.PDDoc")
gPDDoc3 = CreateObject("AcroExch.PDDoc")
gPDDoc4 = CreateObject("AcroExch.PDDoc")
Dim chk1 = gPDDoc1.Open("D:\sathish\1.pdf")
Dim chk2 = gPDDoc2.Open("D:\sathish\2.pdf")
Dim chk3 = gPDDoc3.Open("D:\sathish\3.pdf")
Dim chk4 = gPDDoc4.Open("D:\sathish\4.pdf")
Dim mergefile As Boolean
Dim numpg1, numpg2, numpg3, numpg4
numpg1 = gPDDoc1.GetNumPages()
numpg2 = gPDDoc2.GetNumPages()
numpg3 = gPDDoc3.GetNumPages()
numpg4 = gPDDoc4.GetNumPages()
MsgBox(numpg1 & numpg2 & numpg3 & numpg4)
mergefile = gPDDoc1.InsertPages(numpg1 - 1, gPDDoc2, 0, 1, 0)
mergefile = gPDDoc1.InsertPages(numpg2 - 1, gPDDoc3, 0, 1, 0)
mergefile = gPDDoc1.InsertPages(numpg3 - 1, gPDDoc4, 0, 1, 0)
Dim savemergefile As Boolean
savemergefile = gPDDoc1.Save(1, "D:\sathish\merged.pdf")
End Sub
End Class
</code>
I Dont know how to give the correct page end to merge,
Thanks in Advance for your Kind replies,
Thanks & Regards
Sathish V.Great idea. do you have example code? I found some code but it its contingent upon the pages having a page number on them. the pdfs im dealing with have no page numbers on the pages. also this code deletes pages in a range. I need to delete all other pages except for the page numbers on the range. thanks! Option Explicit Sub Delete_PDF_Pages() ' Adobe code based on http://vbcity.com/forums/t/51200.aspx Dim xMsg As String Dim xInput As String Dim xOutput As String Dim xResponse As Long Dim xLast_Row As Long Dim xErrors As Long Dim xDeleted As Long Dim i As Long Dim j As Long Dim AcroApp As CAcroApp Dim AcroPDDoc As CAcroPDDoc Dim AcroHiliteList As CAcroHiliteList Dim AcroTextSelect As CAcroPDTextSelect Dim xarray() As Variant Dim PageNumber As Variant Dim PageContent As Variant Dim xContent As Variant xInput = "C:\Users\jaime\Desktop\Granado LLC\test\TestPages.pdf" xOutput = "C:\Users\jaime\Desktop\Granado LLC\test\TestPages_Output.pdf" xLast_Row = [A1].SpecialCells(xlLastCell).Row ReDim xarray(xLast_Row) xResponse = MsgBox("About to delete all pages which contain values from the range A1:A" & xLast_Row & Chr(10) _ & Chr(10) & "Input:" & Chr(9) & xInput _ & Chr(10) & "Output:" & Chr(9) & xOutput _ & Chr(10) & Chr(10) & "('OK' to continue, 'Cancel' to quit.)", vbOKCancel, "Delete Pages") If xResponse = 2 Then MsgBox "User chose not to continue. Run terminated." Exit Sub End If ' Files and data OK? If Dir(xInput) = "" Then xMsg = "Input file not found - " & xInput & Chr(10) If Dir(xOutput) <> "" Then xMsg = "Output file exists - " & xOutput & Chr(10) xarray = Application.Transpose(Range("A1:A" & xLast_Row)) For i = 1 To xLast_Row If Not IsNumeric(xarray(i)) Or xarray(i) = "" Then xMsg = "Non-numeric ""Delete"" value of """ & xarray(i) & """ found on row " & i & Chr(10) Exit For End If Next If xMsg <> "" Then MsgBox (xMsg & Chr(10) & "Run cancelled.") Exit Sub End If ' Open the PDF... Set AcroApp = CreateObject("AcroExch.App") Set AcroPDDoc = CreateObject("AcroExch.PDDoc") If AcroPDDoc.Open(xInput) <> True Then MsgBox (xInput & " couldn't be opened - run cancelled.") Exit Sub End If ' Read each page... For i = AcroPDDoc.GetNumPages - 1 To 0 Step -1 Set PageNumber = AcroPDDoc.AcquirePage(i) Set PageContent = CreateObject("AcroExch.HiliteList") 'Get up to 9,999 words from page... If PageContent.Add(0, 9999) <> True Then Debug.Print "Add Error on Page " & i + 1 xErrors = xErrors + 1 Else Set AcroTextSelect = PageNumber.CreatePageHilite(PageContent) If Not AcroTextSelect Is Nothing Then xContent = "" For j = 0 To AcroTextSelect.GetNumText - 1 xContent = xContent & AcroTextSelect.GetText(j) Next j For j = 1 To xLast_Row If InStr(1, xContent, xarray(j)) > 0 Then Debug.Print "Page " & i + 1 & " contains " & xarray(j) & " - " & xContent ' To avoid problems with the delete... Set AcroTextSelect = Nothing Set PageContent = Nothing Set PageNumber = Nothing If AcroPDDoc.DeletePages(i, i) = False Then MsgBox ("Error deleting page " & i + 1 & " - run cancelled.") Exit Sub End If xDeleted = xDeleted + 1 Exit For End If Next End If End If Next i If AcroPDDoc.Save(PDSaveFull, xOutput) = False Then MsgBox "Cannot save the modified document" Exit Sub Else MsgBox (xDeleted & " pages deleted. (" & xErrors & " errors.)") End If AcroPDDoc.Close AcroApp.Exit End Sub
-
How to select multiple lines in reports
Hi,
how to select multiple lines in a reports and process those selected lines to other activities like BDC.
Please paste sample report here. or any demo examples . (don't paste ALV report , paste only classical report)
suppose there are 10 records in output, i want to select 3 records and process other activities like bdc.
Point will awarded.Hi ,
the o/p in ur case will be a basic list output with a check box enabled in the left .
Now say there are 10 records in the list output and i have checked 3 of them where checkboxes are enabled .
And i press a button to submit this to the BDC .
Here u need to make use of
READ LINE statement to read the records from the list output and then pass them to the BDC .
The code would be something like this
DO .
Read line index <field> where checkbox <> ' '.
ENDO.
You can have a look at the F1 help on read line . This will mkae u clear .
Hope this gives u an idea.
Regards,
Vijay. -
How to maximize the performance of report service 9i?
I have a report running in Oracle 9iAS report service. The report is invoked from forms by PL/SQL function run_report_object and generated into PDF file. The report is so complex that the RDF file size reaches to 6MB.
Now it takes about 30 seconds to run the report. My form service and report service are installed on same machine which has 2 intel XEON 2G CPU and 4G memory. If i run the report twice at same time, the report jobs are put into a queue and runs one by one, so it take me 60 seconds. I find the CPU loading is about 20% during the report is running, it means the report service did not make the base of CPU.
How can report service process multi jobs at same on a multi CPU machine? What is the best config in report service about engine number?Hi,
Whenever you start a new Reports Server in 9iAS, by default it starts 1 Reports Engine (rwEng). You can increase the number of engines to 2 for processing the 2 jobs simultaneously. you can do this by using the Oracle Enterprise Manager (via the browser). You can also change the following parameters in the server config file directly
file name: OH/reports/conf/<your_reports_server_name>.conf
<engine id="rwEng" ... initEngine="1" maxEngine="1" minEngine="0" ... >
You can either increase both initEngine and maxEngine to 2, only maxEngine. In the latter case, the second reports engine will be started only when needed.
However, increasing the number of engines will obviously increase the overhead. The optimum value for number of engines depends on your machine, load, response characteristics required, etc. You can test with a few values to arrive at an optimum number.
I would recommend going through the Oracle Reports Tuning whitepaper
http://otn.oracle.com/products/reports/htdocs/getstart/whitepapers/cb_tuning8.pdf
Navneet. -
How to merge 2 or more Report Builder reports and output as one pdf
I'm in a J2E shop in which I develop Oracle reports that are called and published by the application as jsp's. I need display output multiple reports sequentially and then print them out (as one pdf). All component reports currently exist as their own jsp file so the desire is to string together these JSP's without recreating them in a single jsp thereby doubling maintenance.
Does report builder have an option to do this or is there code that can be added at the end of a Report Builder jsp file that will call the next jsp sequentially.Hello,
I do not believe that Report Builder has a way to merge multiple PDF's into a single output file. I found a FREE product that will merge multiple PDF's into a single file that you could use as long as merging the outputs one after another is acceptable.
Go to http://www.somepdf.com and look at their product.
Good luck,
Don. -
How to find if the SQL Reporting services are stand alone or clustered ?
Hi All,
Can any one tell me how do i find if the SQL Reporting services are stand alone or clustered ?
As there are no other SQL features installed on the server except for reporting.
Is there any GUI or CLI command to check this ?
Gautam.75801Hello,
Do not open cluster administrator since SSRS cannot take advantage of Windows Clustering Services.
You need see if the Network Load Balancing manager (NLB) (windows feature) is installed on the SSRS computer and open
it to see if a NLB cluster has been configured.
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com -
How to merge multiple live audio streams into a single stream in FMS?
I need to merge multiple live audio streams into a single stream so that i can pass this stream as input to VOIP through a softphone.
For this i tried the following approach:
Created a new stream (str1) on FMS onAppStart and recorded the live streams (sent throgh microphone) in that new stream.
Below is the code :
application.onAppStart = function()
application.myStream=Stream.get("foo");
application.myStream.record();
application.onPublish = function (client,stream)
var streamName = stream.name;
application.myStream.play(streamName,-2,-1};
The problem is that the Stream.play plays only 1 live stream at a time.As soon as a the 2nd live stream is sent to FMS then Stream.play stops playing the previous live stream.So,only the latest live stream is getting recorded.Whereas i need to record all the live streams in the new stream simultaneously.
Any pointers regarding this are welcome.
Thankswell i tried this once for one of my scripts and the final conclusion is its not possible to combine two streams into 1.....how would you time/encode the two voices......there is no know solution to this in flash. If you continue on despite me and find a solution please post it so we can explain to rest of world.
-
How to create multiple tabs of report in 1 crystal report file
Hi,
Is there any feature in Crystal report 2008 on creating multiple tabs of report similar to Web-I?
If there is, could you give me help on this.
Thank you in advance.
RoseHi Rose,
I think we cant achive the same functionality in Crystal Report designer.
Regards,
Shweta -
How to merge multiple spools in one PDF
hi all,
i have a requirement to merge multiple spools into one PDF.
I have the code to merge 2 spools into one PDF but acc to my requirement this number can be any( say 100). hence i need help to merge N number of spools in one PDF.
Regards
geeta guptaTake the data of all spools into a internal table then create a new spool with this data then downlad this data into pdf format.
By this method you can download any number of spools into a single pdf file. Please see the below code
Fetch spool number
Select rqident from tsp01 into table g_t_data
where...............
Read sool data and take this data into a internal table
Loop at g_t_data.
Call program to read spool as follows
SUBMIT rspolst2 EXPORTING LIST TO MEMORY AND RETURN
WITH rqident = g_t_data-rqident
WITH first = '1'
Read memory where spool data is stored
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = mem_tab
Convert spool data to Ascii
IF NOT mem_tab[] IS INITIAL.
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
list_index = -1
TABLES
listasci = g_t_text1(table type c length 10000)
listobject = mem_tab(LIKE TABLE OF abaplist)
APPEND LINES OF g_t_text1 TO g_t_text.
ENDIF.
ENDLOOP.
Create new spool with internal table data
NEW-PAGE PRINT ON
KEEP IN SPOOL l_keep(variable type c default u2018Xu2019)
LINE-SIZE 300
LIST NAME l_list (variable(30) TYPE c default 'combined_pdf')
NO DIALOG.
LOOP AT g_t_text.
WRITE: g_t_text-data.
ENDLOOP.
NEW-PAGE PRINT OFF.
COMMIT WORK.
Fetch this spool number from TSP01
SELECT rqident rqcretime FROM tsp01 INTO TABLE l_t_pdf(internal table having two fields rqident LIKE tsp01-rqident and rqcretime LIKE tsp01-rqcretime)
WHERE rqowner = sy-uname AND
rq2name = 'COMBINED_PDF'.
Download spool data into pdf format
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = l_t_pdf-rqident
IMPORTING
pdf_bytecount = l_size(variable type i)
TABLES
pdf = g_pdf(table like table of tline)
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = l_size "size
filename = l_data
filetype = 'BIN'
TABLES
data_tab = g_pdf.
Hope this will help you. -
I'm searching solutions to merge multiple documents (all stored in one folder) via command line or batch file to a single PDF-File...
Is there a way to do this?
Finaly I want to control this from a application written in MS-Access. So, perhaps there are some features already integrated in Access to do this?
Thanks for answer!If you have some programming experience you could probably do this using VBA from within MS Access to control Acrobat via OLE.
Lots of examples on the Web.
Hope this helps -
Sorry in advance for cross posting, but the Forum Admin for "SharePoint 2010 - Setup, Upgrade..." recommended I post this here as well.
Running "SharePoint 2010 SP1" and "SQL Server 2012" Integrated Reporting Services.
Assuming a total Farm failure requiring a new farm to be built, does anyone have any experience with restoring the 3 SharePoint Integrated SSRS databases to a the new farm from SQL Server level backups? Assuming of course the SSRS encryption key had
been exported. Many of the Service Applications can be provisioned with "pre-existing" restored service application databases (like the User Profile Service and Metadata Service databases). Just wondering if this can also be done with
the SharePoint Integrated SSRS databases.
The following Microsoft Document on setting up a SP DR site implies it's possible since the 3 databases are synced to a separate DR farm.
https://view.officeapps.live.com/op/view.aspx?src=http%3A%2F%2Fdownload.microsoft.com%2Fdownload%2FD%2F2%2F0%2FD20E1C5F-72EA-4505-9F26-FEF9550EFD44%2FPlanning%2520Disaster%2520Recovery%2520for%2520Reporting%2520Services%2520in%2520SharePoint%2520mode%2520.docx
Is this possible? Does any one have any actual experience with this, and what the steps would be?
Thanks!Hi mikea730,
It supposed to be possible. Please refer to the blog below:
http://blogs.technet.com/b/ptsblog/archive/2014/01/28/sla-and-disaster-recovery-planning-for-microsoft-busincess-intelligence.aspx
Best Regards,
Black -
How to merge multiple PDFs and display in a new window
Hi,
I'm trying to merge multiple PDFs into one PDF and display the output in a new window using PeopleCode. I have a button on a page, which when clicked should open a new window with the merged PDFs. I am able to succussfully merge the PDFs using the PDFmerger class (mergePDFs) but unable to display the result in a new window.
Please help.Thanks.
I also found this piece of code very helpful.
Local PSXP_RPTDEFNMANAGER:Utility &oUtil;
Local boolean &bRtn;
/* send the output to client */
/* &sFileName = the file path /file_name.extension */
&oUtil = create PSXP_RPTDEFNMANAGER:Utility();
&bRtn = &oUtil.zipAndViewAttachment(&sFileName);
Edited by: user8260115 on Sep 9, 2009 4:57 PM -
All,
I have recently started working on XML publisher and have developed 3 reports in last 2 days using XML Publisher and integrating them with Concurrent programs.
This is a great tool.
I have got another requirement, where i need to use xml file generated by multiple run of same report with various parameters and then merge all xml file to a single report. Developing the whole custom process will take very long time and sure will have bugs in it. Instead i was thinking to use xml file generated by Oracle report itself.
Report "US Gross to net summary" generates xml output in standard output directory and then show output in PDF file. I have 7 such file generated for each payroll. I want to merge output of xml into a single xml so that i can create single report having data from all 7 xml files showing me All payroll output in a single report.
Can someone please guide me , how can i read xml file data from the output directory of a seeded concurrent program and how to manipulate data in it.
Thanks
AnkurHi Tim,
Thanks for replying. I have looked for "PDFBookBinder class" in xml publisher user guide for ver 5.6.2. I didn't get any reference of this text. Can you please guide me to a tutorial/link where i can get more information about this class.
Also, i originally thought of similar to your second logic, as my design basis. Oracle process generates the xml file in output directory which i can get. What i didn't get is how do i "pick them up and merge" using publisher. Also, is there way to do this merging process using pl/sql ? Can you please give little more information on your second approach.
My original plan of action is that i will create a report set in which i will call oracle seeded report for all 7 payrolls in a sequential manner. Then using the child requests of the report set i will get to 7 xml files generated by seeded oracle process. Then the piece i am not sure of , i will use those 7 files to generate a single xml file having payroll name as tree top for each output. Once single xml is ready, i can easily design a template and register the process to generate output as Excel.This process will not require me to actually change any data or do any calculation. It will only reformatting the feilds we see and abiity to see all 7 payroll at one time rather then entering these numbers manually into an excel to do analysis.
Please provide your feedback, if you think above plan is not feasible or need corrections.
Best Regards,
Ankur -
How to use use the web report service to be consumed by web development?
Hi guys,
How can I pass the report server web service to web developers so they can use reports dataset data?
Can some one post me a clear example?
Thank youHi Swallow,
Thank you, it's helpful but from my own perspective, I would like to know how to use the methods on the url itself.
For instance, my webservice is in http://<servername>/ReportServer/ReportService2010.asmx
Now I would like to understand how I can add methods on the url itself like this (don't mind the incorrect syntax thats what I'm trying to figure it out)
http://srv-bisp-dev/ReportServer/ReportService2010.asmx?op=GetDataSetData=<DatasetName>
In the end,I would like to press enter and show the dataset result on the browser in xml tags.
I don't even know if this is possible so I'm sending clay to the wall.
Maybe you are looking for
-
Export global classes to a local file
Hi, is it possible to export a global class with all of its attributes, types, methods and more to a local file for archiving purposes? We are currently using ECC 6.0, btw. Michael
-
How to solve the middle dark line when I use officejet all in one the copy function?
The printer function is good, but only has problem in copy functioln. How to clear the middle dark line? This question was solved. View Solution.
-
Everytime it fails. I can't open zip files. Does anyone know why. I have my settings to allow all files when downloading something. When I go to download and it is complete it gives a setup exe. then I click on it and it does nothing..... Plesae help
-
Testversion stoppt immer bei 50% was läuft da falsch???
ich kann die testversion Id nicht install. stoppt immer bei 50%
-
KT4 Ultra "RAID?" controller
The S-ATA and ATA133 Promise controller on KT4 Ultra 1)Is it a RAID or an ATA (and S-ATA) controller? 2)Does it have RAID 0 performance level with ATA133 HDDs, same as that of the KT3 Ultra 2 RAID Controller, or it is just a RAID for S-ATA HDDs?