How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask yourteqrepair Your Own Question

yourteqrepair
yourteqrepair, Computer Systems Analyst
Category: Programming
Satisfied Customers: 50
Experience:  I have earned my 13+ years of knowledge through self-taught repairs, research, studying and plain old trial and error.
71069233
Type Your Programming Question Here...
yourteqrepair is online now
A new question is answered every 9 seconds

I HAVE WRITTEN FUNCTION AND CONVERT IT TO CLICK EVENT

Customer Question

i HAVE WRITTEN FUNCTION AND CONVERT IT TO CLICK EVENT function showPrintButton() { var table = $("table[title='Refresh']"); var parentTable = $(table).parents('table'); var parentDiv = $(parentTable).parents('div').parents('div').first(); var btnPrint
= $("<input type="button" id="x_x_x_btnPrint" name="x_x_x_btnPrint" value="Print" style="">"); var btnClose = $("<input type="button" id="x_x_x_btnClose" name="x_x_x_btnClose" value="Close" style="">"); btnPrint.click(function () { printPDF(this); }); btnClose.click(function
() { window.close(); }); if (parentDiv.find("input[value='Print']").length == 0) { parentDiv.append('
<table cellpadding="0" cellspacing="0" style="display:inline-block; width:6px">
<tbody>
<tr>
<td></td>
</tr>
</tbody>
</table>
'); parentDiv.append('
<div id="x_x_x_customDiv" class="" style="display:inline-block; font-family:Verdana; font-size:8pt; vertical-align:inherit">
<table cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td><span class="x_x_x_HighlightDiv" style=""><img src="../Images/Buttons/printer_blue_small.png" alt="Print Report" title="Print Report" width="18px" height="18px" style="margin-top:4px"></span></td>
</tr>
</tbody>
</table>
</div>
'); parentDiv.append('
<table cellpadding="0" cellspacing="0" style="display:inline-block; width:10px">
<tbody>
<tr>
<td></td>
</tr>
</tbody>
</table>
'); parentDiv.append('
<div id="x_x_x_customDiv" class="" style="display:inline-block; font-family:Verdana; font-size:8pt; vertical-align:inherit">
<table cellpadding="0" cellspacing="0" style="display:inline">
<tbody>
<tr>
<td><span class="x_x_x_HighlightDiv" style=""><img src="../Images/cross-circle-frame.png" alt="Close Report" title="Close Report" width="18px" height="18px" style="margin-top:4px"></span></td>
</tr>
</tbody>
</table>
</div>
'); } }
Submitted: 1 year ago.
Category: Programming
Customer: replied 1 year ago.
Posted by JustAnswer at customer's request) Hello. I would like to request the following Expert Service(s) from you: Live Phone Call. Let me know if you need more information, or send me the service offer(s) so we can proceed.
Customer: replied 1 year ago.
I am sending some more file for you to get everything you need.
Customer: replied 1 year ago.
I am having following error on ShowPrintButton:
Error 15 'ASP.default_aspx' does not contain a definition for 'showPrintButton' and no extension method 'showPrintButton' accepting a first argument of type 'ASP.default_aspx' could be found (are you missing a using directive or an assembly reference?) C:\Users\Krishna\Documents\Visual Studio 2013\WebSites\ReportsWebsite1\Default.aspx 103
Customer: replied 1 year ago.
I will welcome anyone to remote into my pc to resolv this question.Thank you very much
Customer: replied 1 year ago.
it sims ironic when I am executing my ssrs web site on IE it throw java script error but work fine on Google chrom
Customer: replied 1 year ago.
I am rewrite this question:I was searching some documentation to create extra command Button was not successful but was able to create icon on Reportviewer and I am in need of creating saprate button control which will able to print the report. the code presently working on Reportviewer is as follow:$(document).ready(function () {if ($.browser.mozilla || $.browser.webkit) {try {showPrintButton();}catch (e) { alert(e); }}});function showPrintButton() {var table = $("table[title='Refresh']");var parentTable = $(table).parents('table');var parentDiv = $(parentTable).parents('div').parents('div').first();parentDiv.append('');}// Print Report functionfunction PrintReport() {//get the ReportViewer Idvar rv1 = $('#MyReportViewer_ctl09');var iDoc = rv1.parents('html');// Reading the report stylesvar styles = iDoc.find("head style[id$='ReportControl_styles']").html();if ((styles == undefined) || (styles == '')) {iDoc.find('head script').each(function () {var cnt = $(this).html();var p1 = cnt.indexOf('ReportStyles":"');if (p1 > 0) {p1 += 15;var p2 = cnt.indexOf('"', p1);styles = cnt.substr(p1, p2 - p1);}});}if (styles == '') { alert("Cannot generate styles, Displaying without styles.."); }styles = '' + styles + "";// Reading the report htmlvar table = rv1.find("div[id$='_oReportDiv']");if (table == undefined) {alert("Report source not found.");return;}// Generating a copy of the report in a new windowvar docType = '';var docCnt = styles + table.parent().html();var docHead = 'body{margin:5;padding:0;}';var winAttr = "location=yes, statusbar=no, directories=no, menubar=no, titlebar=no, toolbar=no, dependent=no, width=720, height=600, resizable=yes, screenX=200, screenY=200, personalbar=no, scrollbars=yes";;var newWin = window.open("", "_blank", winAttr);writeDoc = newWin.document;writeDoc.open();writeDoc.write(docType + '' + docHead + '' + docCnt + '');writeDoc.close();newWin.focus();// uncomment to autoclose the preview window when printing is confirmed or canceled.// newWin.close();};
Customer: replied 1 year ago.
Posted by JustAnswer at customer's request) Hello. I would like to request the following Expert Service(s) from you: Live Phone Call. Let me know if you need more information, or send me the service offer(s) so we can proceed.
Customer: replied 1 year ago.
Posted by JustAnswer at customer's request) Hello. I would like to request the following Expert Service(s) from you: Live Phone Call. Let me know if you need more information, or send me the service offer(s) so we can proceed.
Expert:  Zabo04 replied 1 year ago.
You want to use the DoCmd.OpenReport method. You would enter it as follows
DoCmd.OpenReport "Report Name", acViewPreview 'Where Report Name is ***** ***** the name of the report, or you can use a variabel without the quotes.
That method will open a print preview screen of the report.
Customer: replied 1 year ago.
Could you please call me in next 1.2 hours thank you very much.
Customer: replied 1 year ago.
30 minutes
Customer: replied 1 year ago.
I am good at creating reports with table and store proc and I have been struggling for this topic I am sending you the code and if you can or able to show me where DoCmd.OpenReport "Report Name" I can insert.Thank you or if you like we can create Remote session tonight you can call me or send me email to confirm.Thank you very much.
for which I can pay you $65 if it is ok with you or you mention.
Vijay
Customer: replied 1 year ago.
Please discard ReportPage.txt
Customer: replied 1 year ago.
For this assignment I am using SQl ser4ver 2014, VS 2012 C# ***** ASp.NET web applicaation
Customer: replied 1 year ago.
is there any example available that I can implimant this.Thank you very much.Vijay
Customer: replied 1 year ago.
is there any provision for docmd.openreport.Reportname I can include in Button click event which will be something like
protected void Button1_Click(object sender, EventArgs e)
{
DoCmd.OpenReport Report1.rdlc();
}
Customer: replied 1 year ago.
I have report form ssrs create Labels like mailing label and I need to create report is there any other way to do with protected
DoCmd.OpenReport Report1.rdlc();
Expert:  Zabo04 replied 1 year ago.

Button1_Click(object sender, EventArgs e){

DoCmd.Open Report "Report Name", acViewPreview
}

If you do not use acViewPreview it will default to acViewNormal and just open the report, not the print preview.

Customer: replied 1 year ago.
I have tried the cmd button it is failing it is not recognise the command:Line 17: protected void Button1_Click(object sender, EventArgs e)
Line 18: {
Line 19: Docmd.OpenReport "Report1.rdlc", acViewpreview
Line 20: }and it send me compilation error:Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.Compiler Error Message: CS1002: ; expectedSource Error:If I did not mention I am using C# ***** ASP.NET if you like to talk my phone # *****(###) ###-####
Expert:  Zabo04 replied 1 year ago.

I do not understand what .rdlc is, your report name should not have an extension

Expert:  Zabo04 replied 1 year ago.

Wait, so you are using c#. What language are you trying to call to print your report, c# ***** asp.net?

Customer: replied 1 year ago.
would you like to remote in my pc:
Customer: replied 1 year ago.
Please send me invite for remote and phone
Customer: replied 1 year ago.
for DoCmd do I need any reference in reference folder of project
Expert:  Zabo04 replied 1 year ago.

Are you using c# ***** asp.net to do this?

Expert:  Zabo04 replied 1 year ago.

Are you trying to print without a print screen and print preview or do you want the print dialog brought up?

Customer: replied 1 year ago.
I am getting error mentioned in attwachment
Customer: replied 1 year ago.
attachment
Expert:  Zabo04 replied 1 year ago.

I do not even know what language you are trying to use right now. Please answer that first. Then move on to print dialog or no and preview no. If you do not answer my questions I cannot answer yours.

Expert:  Zabo04 replied 1 year ago.

Why not just use report viewer and print from there?

Customer: replied 1 year ago.
I am sorry if I make you angree
Expert:  Zabo04 replied 1 year ago.

Are you trying to direct print without the dialog? Typically users do not prefer that. I do not know exactly what you want to do are what language you are in. I assume it is c#.

Customer: replied 1 year ago.
I should be home by 9:50 PM if you like to continue this session.Thank you very much
Expert:  Zabo04 replied 1 year ago.

Okay.

Customer: replied 1 year ago.
or we can do it now
Expert:  Zabo04 replied 1 year ago.

Which ever but I need answer to my questions or I can do nothing for you.

Expert:  Zabo04 replied 1 year ago.

I do not have the time to help you if you will not respond. I am opting out.

Customer: replied 1 year ago.
Are you trying to direct print without the dialog? Typically users do not prefer that. I do not know exactly what you want to do are what language you are in. I assume it is c#.Yes I am directly print witout the dialog and yes I am using C# and I am sorry
Customer: replied 1 year ago.
I am really sorry because I did not receive you chat about previous message
Customer: replied 1 year ago.
Plus I did sent what tool I am using too
Customer: replied 1 year ago.
I would really appreciate if we can continue this conversation and I am willing to pay for phone charges.Thank you very much.Vijay
Customer: replied 1 year ago.
Is there any luck to find me a Expert?Thank you very much
Expert:  yourteqrepair replied 1 year ago.

HI are you still looking for help?

Related Programming Questions