+ Start a Discussion

Reports with two independent objects

How can I generate a report involving similar fields of two independent custom objects in salesforce?


Can anyone tell me the solution of this please?


Assuming there's no relationship or junction object between them then ... you can't. That's why god(or Salesforce in this case) created record types ... :-)


If you do have a relationship (i.e. lookup) between them, or a junction object, you may be able to create a report type to do what you want.


The only other option I can think of is to create another custom object that you populate that contains either a copy of the details, or lookups plus formula fields to access the data from the objects. You can then create your report on that new object.

I want to join these two objects through a SQL Query and want to generate the report from the resultset data obtained from that. Can it be done? then please tell me in details where I can write such query and how can I generate the report..
sorry it will be SOQL Query!!!

I am trying to go for a marriage between salesforce ajax and google chart tools in a visualforce is this possible. I have done this much of coding but it is not yielding any result



<apex:page > <html> <head> <script type="text/javascript"> var __sfdcSessionId = '{!GETSESSIONID()}'; </script> <script type='text/javascript' src='http://www.google.com/jsapi'></script> <script src="../../soap/ajax/18.0/connection.js" type="text/javascript"></script>

<script type='text/javascript'> window.onload = = setupPage; var records; function setupPage(){ try { var queryResult = sforce.connection.query("select Pack__Date_of_Entry__c,Pack__Sales__c from Pack__TCI__c LIMIT 13"); alert(queryResult); layoutResults(queryResult, output); } catch(error) { alert(error); queryFailed(error, output); } } function queryFailed(error, output) { output.innerHTML = "<font color=red>An error has occurred:</font> <p>" + error; alert(output); } function layoutResults(queryResult, output) { if (queryResult.size > 0) { records = queryResult.getArray('records'); alert(records); } } google.load('visualization', '1', {packages:['imagelinechart']}); google.setOnLoadCallback(drawChart); function drawChart() { var data = new google.visualization.DataTable(); data.addColumn('string', 'Date'); data.addColumn('number', 'Sales'); data.addRows(records.length); for (var i = 0; i < records.length; i++) { data.setValue(0, 0, records[i].Pack__Date_of_Entry__c); data.setValue(0, 1, records[i].Pack__Sales__c); } var chart = new google.visualization.ImageLineChart(document.getElementById('chart_div')); chart.draw(data, {width: 400, height: 240, min: 0}); } </script> </head> <body> <div id='chart_div'></div> </body> </html> </apex:page>





Hi Praz,


Did you achive the a single report on two different non related objects? can you pls tell me how did you achive this, i am also having a similar req where i have to create a report out of ideas & user object (2 std un related objects). Your response would be appreciated.




Hi All,


I stuck in the same requirement...

I want to create report from two unrelated objects.


Any Idea or Solution for this...??


Thanks in advance...


I was having a similar problem but the idea of VF charts hit me. Has anyone gone that route?


I am having the same issue. Anyone has a solution to this?