<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to access jsreport from cross domain]]></title><description><![CDATA[<p>Hi,<br />
Sorry if similar question has already been asked. I looked before posting and couldn't find any posting. My jsreport is running on port 3000 and my other application is on port 2000. I am trying to call jsreport from <a href="http://localhost:2000" rel="nofollow">http://localhost:2000</a> and am setting up cors to allow origin</p>
<pre><code class="language-js">/// define the jsreport middleware
    let jsreport = require('jsreport')({
        express: { app :reportingApp, server: server },
        appPath: &quot;/reporting&quot;
    });
    app.use(cors({origin:'*'}));
    jsreport.init()
        .then(() =&gt; {
            console.log(`JSReport instance ${process.pid} started correctly.`);
        }).catch((e) =&gt; {
            console.error(e);
        });
</code></pre>
<p>but still I get this error<br />
Error: Error during processing request: <a href="http://localhost:3000/reporting/api/report" rel="nofollow">http://localhost:3000/reporting/api/report</a> details: Error during rendering report: Cannot use 'in' operator to search for '$ref' in Project Id TypeError: Cannot use 'in' operator to search for '$ref' in Project Id<br />
at recurse (C:\ifolder\iroot\jsReport\node_modules\jsreport\node_modules\jsreport-core\lib\render\resolveReferences.js:19:26)<br />
at module.exports (C:\ifolder\iroot\jsReport\node_modules\jsreport\node_modules\jsreport-core\lib\render\resolveReferences.js:52:5)</p>
<p>Is the error related to cross domain reference or its something else?</p>
<p>Thank you,<br />
Rashmi</p>
]]></description><link>https://forum.jsreport.net/topic/458/how-to-access-jsreport-from-cross-domain</link><generator>RSS for Node</generator><lastBuildDate>Sat, 12 Sep 2026 20:09:57 GMT</lastBuildDate><atom:link href="https://forum.jsreport.net/topic/458.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 26 Mar 2018 22:13:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to access jsreport from cross domain on Tue, 27 Mar 2018 09:27:25 GMT]]></title><description><![CDATA[<p>Hi,<br />
Sorry if similar question has already been asked. I looked before posting and couldn't find any posting. My jsreport is running on port 3000 and my other application is on port 2000. I am trying to call jsreport from <a href="http://localhost:2000" rel="nofollow">http://localhost:2000</a> and am setting up cors to allow origin</p>
<pre><code class="language-js">/// define the jsreport middleware
    let jsreport = require('jsreport')({
        express: { app :reportingApp, server: server },
        appPath: &quot;/reporting&quot;
    });
    app.use(cors({origin:'*'}));
    jsreport.init()
        .then(() =&gt; {
            console.log(`JSReport instance ${process.pid} started correctly.`);
        }).catch((e) =&gt; {
            console.error(e);
        });
</code></pre>
<p>but still I get this error<br />
Error: Error during processing request: <a href="http://localhost:3000/reporting/api/report" rel="nofollow">http://localhost:3000/reporting/api/report</a> details: Error during rendering report: Cannot use 'in' operator to search for '$ref' in Project Id TypeError: Cannot use 'in' operator to search for '$ref' in Project Id<br />
at recurse (C:\ifolder\iroot\jsReport\node_modules\jsreport\node_modules\jsreport-core\lib\render\resolveReferences.js:19:26)<br />
at module.exports (C:\ifolder\iroot\jsReport\node_modules\jsreport\node_modules\jsreport-core\lib\render\resolveReferences.js:52:5)</p>
<p>Is the error related to cross domain reference or its something else?</p>
<p>Thank you,<br />
Rashmi</p>
]]></description><link>https://forum.jsreport.net/post/2270</link><guid isPermaLink="true">https://forum.jsreport.net/post/2270</guid><dc:creator><![CDATA[rashmim00]]></dc:creator><pubDate>Tue, 27 Mar 2018 09:27:25 GMT</pubDate></item><item><title><![CDATA[Reply to How to access jsreport from cross domain on Invalid Date]]></title><description><![CDATA[<p>Hi, this error is not related to the cors.<br />
jsreport fails here when parsing your input data.<br />
We are parsing the input data in a way that we resolve references and circular structures in the input. This allows a smaller data transfer and more comfortable way to work with the data after wards. At this place it crashes. You likely have some invalid $ref props in your input json.</p>
<p>Check this for some info<br />
<a href="https://stackoverflow.com/questions/15312529/resolve-circular-references-from-json-object" rel="nofollow">https://stackoverflow.com/questions/15312529/resolve-circular-references-from-json-object</a></p>
<p>Jan</p>
]]></description><link>https://forum.jsreport.net/post/2272</link><guid isPermaLink="true">https://forum.jsreport.net/post/2272</guid><dc:creator><![CDATA[jan_blaha]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to How to access jsreport from cross domain on Invalid Date]]></title><description><![CDATA[<p>Thank you Jan. My input data was bad.</p>
]]></description><link>https://forum.jsreport.net/post/2273</link><guid isPermaLink="true">https://forum.jsreport.net/post/2273</guid><dc:creator><![CDATA[rashmim00]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>