<div dir="ltr">Hi Jaroslaw,<div><br></div><div>I implemeted following function which is called in 3 fuctions:</div><div><div style="font-family:arial,sans-serif;font-size:13px">1) KexiReportView::slotExportAsSpreadsheet()</div>
<div style="font-family:arial,sans-serif;font-size:13px">2) KexiReportView::slotExportAsTextDocument()</div><div style="font-family:arial,sans-serif;font-size:13px">3) KexiReportView::slotExportAsWebPage()</div></div><div>
<br></div><div><br></div><div><div>void KexiReportView::openexporteddocument(KUrl destination)</div><div>{</div><div>    const int answer =</div><div>        KMessageBox::questionYesNo(</div><div>            this,</div><div>
            i18n("Do you want to open exported document?"),</div><div>            "open document",</div><div>            KGuiItem(i18n("Yes")),</div><div>            KGuiItem(i18n("No")));</div>
<div><br></div><div>    if (answer == KMessageBox::Yes) {</div><div>        //KStandardGuiItem::open();</div><div>        (void)new KRun(destination, this->topLevelWidget());</div><div>    } </div><div>    else{</div><div>
        KStandardGuiItem::close();    </div><div>    }   </div><div>}</div></div><div><br></div><div>The above function is added under the private slots in kexireportview.h file.</div><div>I tested the code on my machine and it is running as it should be.</div>
<div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 11, 2014 at 2:33 AM, Jaroslaw Staniek <span dir="ltr"><<a href="mailto:staniek@kde.org" target="_blank">staniek@kde.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 10 March 2014 21:22, Vishwa Modi <<a href="mailto:vishwa9694@gmail.com">vishwa9694@gmail.com</a>> wrote:<br>

> Hi Jaroslaw,<br>
</div><div class="">> correct me if I'm wrong.<br>
> The current code opens the exported documents as soon as they are exported.<br>
> We are required to add the code for KMessageBox::YesNo in the<br>
> kexireportview.cpp file in 3 functions:<br>
> 1) KexiReportView::slotExportAsSpreadsheet()<br>
> 2) KexiReportView::slotExportAsTextDocument()<br>
> 3) KexiReportView::slotExportAsWebPage()<br>
><br>
> And the code for KMessageBox::YesNo needs to be added in the "else" section<br>
> of the following snippet in above 3 functions :<br>
><br>
> if (!renderer->render(cxt, m_reportDocument)) {<br>
>             KMessageBox::error(this,<br>
>                                i18n("Exporting the report as text document<br>
> to %1 failed.", cxt.destinationUrl.prettyUrl()),<br>
>                                i18n("Export Failed"));<br>
>         } else {<br>
>             (void)new KRun(cxt.destinationUrl, this->topLevelWidget());<br>
>         }<br>
><br>
<br>
</div>Hi Vishwa,<br>
That's correct.<br>
<br>
And I propose to move the code to a common private method.<br>
  "(void)new KRun(cxt.destinationUrl, this->topLevelWidget())" is used<br>
in exactly the same way three times.<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
><br>
> On Sat, Mar 8, 2014 at 2:00 PM, Vishwa Modi <<a href="mailto:vishwa9694@gmail.com">vishwa9694@gmail.com</a>> wrote:<br>
>><br>
>> Hi Jaroslaw,<br>
>> I have seen the task and I'll do it.<br>
>> My first step would be to search and go through the code that implements<br>
>> the dialog while importing CSV data.<br>
>><br>
>><br>
>><br>
>><br>
>> On Sat, Mar 8, 2014 at 3:47 AM, Jaroslaw Staniek <<a href="mailto:staniek@kde.org">staniek@kde.org</a>> wrote:<br>
>>><br>
>>> Hi Vishwa,<br>
>>> I propose first job. Please tell if it fits.<br>
>>><br>
>>><br>
>>> <a href="http://community.kde.org/Kexi/Junior_Jobs/Implement_%22Do_you_want_to_open%22_question_after_exporting_report" target="_blank">http://community.kde.org/Kexi/Junior_Jobs/Implement_%22Do_you_want_to_open%22_question_after_exporting_report</a><br>

>>><br>
>>> You can add content to that page if you find it useful for documenting to<br>
>>> task.<br>
>>><br>
>>> This is a small new feature, so it would go to the master git branch<br>
>>> of calligra, and eventually to Calligra 2.9.0.<br>
>>> Info on how to build, send a patch, etc. is linked at<br>
>>> <a href="http://community.kde.org/Calligra/First_Contact" target="_blank">http://community.kde.org/Calligra/First_Contact</a><br>
>>><br>
>>> In this thread I'll try to guide you through this first task.<br>
>>><br>
>>> --<br>
>>> regards / pozdrawiam, Jaroslaw Staniek<br>
>>>  Kexi & Calligra & KDE | <a href="http://calligra.org/kexi" target="_blank">http://calligra.org/kexi</a> | <a href="http://kde.org" target="_blank">http://kde.org</a><br>
>>>  Qt for Tizen | <a href="http://qt-project.org/wiki/Tizen" target="_blank">http://qt-project.org/wiki/Tizen</a><br>
>>>  Qt Certified Specialist | <a href="http://www.linkedin.com/in/jstaniek" target="_blank">http://www.linkedin.com/in/jstaniek</a><br>
>><br>
>><br>
><br>
<br>
<br>
<br>
--<br>
regards / pozdrawiam, Jaroslaw Staniek<br>
 Kexi & Calligra & KDE | <a href="http://calligra.org/kexi" target="_blank">http://calligra.org/kexi</a> | <a href="http://kde.org" target="_blank">http://kde.org</a><br>
 Qt for Tizen | <a href="http://qt-project.org/wiki/Tizen" target="_blank">http://qt-project.org/wiki/Tizen</a><br>
 Qt Certified Specialist | <a href="http://www.linkedin.com/in/jstaniek" target="_blank">http://www.linkedin.com/in/jstaniek</a><br>
</div></div></blockquote></div><br></div>