Programming

Programming Questions? Ask a Programmer for Answers ASAP

Ask a Computer Expert,
Get an Answer ASAP!

Programming

I HAVE WRITTEN FUNCTION AND CONVERT IT TO CLICK EVENT

Customer Question
function showPrintButton() { var table...
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: 2 years ago.Category: Programming
Show More
Show Less
Ask Your Own Programming Question
Customer reply replied 2 years 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 reply replied 2 years ago
I am sending some more file for you to get everything you need.
Customer reply replied 2 years 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 reply replied 2 years ago
I will welcome anyone to remote into my pc to resolv this question.Thank you very much
Customer reply replied 2 years 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 reply replied 2 years 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 reply replied 2 years 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 reply replied 2 years 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.
Answered in 18 hours by:
8/14/2015
Programmer: Zabo04, Programming Enthusiast replied 2 years ago
Zabo04
Zabo04, Programming Enthusiast
Category: Programming
Satisfied Customers: 283
Experience: C/C++, python, perl, excel, matlab/octave, java, and R experience. Genetic algorithm, vision, GUIs.
Verified
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.
Ask Your Own Programming Question
Customer reply replied 2 years ago
Could you please call me in next 1.2 hours thank you very much.
Customer reply replied 2 years ago
30 minutes
Customer reply replied 2 years 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 reply replied 2 years ago
Please discard ReportPage.txt
Customer reply replied 2 years ago
For this assignment I am using SQl ser4ver 2014, VS 2012 C# ***** ASp.NET web applicaation
Customer reply replied 2 years ago
is there any example available that I can implimant this.Thank you very much.Vijay
Customer reply replied 2 years 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 reply replied 2 years 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();
Programmer: Zabo04, Programming Enthusiast replied 2 years 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.

Ask Your Own Programming Question
Customer reply replied 2 years 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 # *****(###) ###-####
Programmer: Zabo04, Programming Enthusiast replied 2 years ago

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

Ask Your Own Programming Question
Programmer: Zabo04, Programming Enthusiast replied 2 years ago

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

Ask Your Own Programming Question
Customer reply replied 2 years ago
would you like to remote in my pc:
Customer reply replied 2 years ago
Please send me invite for remote and phone
Customer reply replied 2 years ago
for DoCmd do I need any reference in reference folder of project
Programmer: Zabo04, Programming Enthusiast replied 2 years ago

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

Ask Your Own Programming Question
Programmer: Zabo04, Programming Enthusiast replied 2 years ago

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

Ask Your Own Programming Question
Customer reply replied 2 years ago
I am getting error mentioned in attwachment
Customer reply replied 2 years ago
attachment
Programmer: Zabo04, Programming Enthusiast replied 2 years 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.

Ask Your Own Programming Question
Programmer: Zabo04, Programming Enthusiast replied 2 years ago

Why not just use report viewer and print from there?

Ask Your Own Programming Question
Customer reply replied 2 years ago
I am sorry if I make you angree
Programmer: Zabo04, Programming Enthusiast replied 2 years 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#.

Ask Your Own Programming Question
Customer reply replied 2 years ago
I should be home by 9:50 PM if you like to continue this session.Thank you very much
Programmer: Zabo04, Programming Enthusiast replied 2 years ago

Okay.

Ask Your Own Programming Question
Customer reply replied 2 years ago
or we can do it now
Programmer: Zabo04, Programming Enthusiast replied 2 years ago

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

Ask Your Own Programming Question
Programmer: Zabo04, Programming Enthusiast replied 2 years ago

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

Ask Your Own Programming Question
Customer reply replied 2 years 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 reply replied 2 years ago
I am really sorry because I did not receive you chat about previous message
Customer reply replied 2 years ago
Plus I did sent what tool I am using too
Customer reply replied 2 years 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 reply replied 2 years ago
Is there any luck to find me a Expert?Thank you very much
Programmer: yourteqrepair, Computer Systems Analyst replied 2 years ago
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.
Verified

HI are you still looking for help?

Ask Your Own Programming Question
Ask yourteqrepair Your Own Question
yourteqrepair
yourteqrepair
yourteqrepair, Computer Systems Analyst
Category: Programming
Satisfied Customers: 50
50 Satisfied Customers
Experience: I have earned my 13+ years of knowledge through self-taught repairs, research, studying and plain old trial and error.

yourteqrepair is online now

A new question is answered every 9 seconds

How JustAnswer works:

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

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed.

One Happy CustomerNew York

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

RobinElkton, Maryland

< Previous | Next >

Meet the Experts:

ATLPROG

ATLPROG

Computer Software Engineer

7,677 satisfied customers

MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML

LogicPro

LogicPro

Computer Software Engineer

7,109 satisfied customers

Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.

unvadim

unvadim

Computer Software Engineer

1,168 satisfied customers

Good knowledge of OOP principles. 3+ years of programming experience with Java and C++. Sun Certified Java Programmer 5.0.

lifesaver

lifesaver

Computer Software Engineer

950 satisfied customers

Several years of intensive programming and application development experience in various platforms.

ehabtutor

ehabtutor

Computer Software Engineer

936 satisfied customers

Bachelor of computer science, 5+ years experience in software development, software company owner

TheDoctor

TheDoctor

Software Engineer

893 satisfied customers

M.S. in Internet Information Systems

The-PC-Guy

The-PC-Guy

Software Engineer

789 satisfied customers

Extensive Knowledge in PHP, MYSQL, CSS & Javascript

< Previous | Next >

Related Programming Questions
I have a homework assignment that is similar to one already
i have a homework assignment that is similar to one already posted but the assignment needs to have a gui and be in visual studio 2012 … read more
George Sibiya
George Sibiya
PhD
194 satisfied customers
I'm stuck on coding a calcButton in VB. Visual Studio
I'd like to have someone walk me through coding this button, I've got the rest of the form coded but I'm stumped on this one. … read more
George Sibiya
George Sibiya
PhD
194 satisfied customers
Just have a question with list box, visual studio 2015, I
I just confused with list box ,the question is select a workshop from one list box and a location from another list box … read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,109 satisfied customers
Working in Visual Studio 2017 - can't find definitive
Working in Visual Studio 2017 - can't find definitive instructions on how to print the form on my screen. The common instruction is to use PrintForm but I don't have that I have PrintDocument. Tried l… read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,109 satisfied customers
On Microsoft VIsual Studio C++ need it in a C++ code that
On Microsoft VIsual Studio C++need it in a C++ code that works also use the way that starts with hello world please make sure code worksNotice in the updated UML diagram that the Employee class is des… read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,109 satisfied customers
On microsoft visual studio C++ The only change to the
On microsoft visual studio C++ The only change to the Employee class is that there is a new attribute: +benefit : Benefit Notice that there is a "+" for this attribute, meaning that it is public. Make… read more
George Sibiya
George Sibiya
PhD
194 satisfied customers
I have my Visual Studio Program done, but I need to get it
I have my Visual Studio Program done, but I need to get it all under the same path location. All of the files in My Project need to be added to the original folder. So once that is done if you could s… read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,109 satisfied customers
I am programming for years mostly in vbScript having the
I am programming for years mostly in vbScript having the vbScript-Editor, but codes get very long and I seek one Editor, which can have classes on different pages and procedures be closed, that only t… read more
Steve
Steve
Consultant
Bachelor
69 satisfied customers
OKRP55211 POSTANSWER I am using Visual Studio 2015 C++ on
OKRP55211 POSTANSWER Hi I am using Visual Studio 2015 C++ on Windows 10. I have a problem with missing symbols when I migrate a GITHUB multi-project solution into a single project. I built the origina… read more
Steve
Steve
Consultant
Bachelor
69 satisfied customers
I am having trouble getting the visual Studio,visual basic
I am having trouble getting the visual Studio,visual basic forms program that uses a local Access database to distribute to stand alone desktop computers with Windows operating system to run correctly… read more
George Sibiya
George Sibiya
PhD
194 satisfied customers
Just having trouble with an assignment, Visual Studio 15,
this is part of the question: For this coding exercise, write the Visual Basic code for a pretest loop that uses an Integer variable named intEven to display the even integers from 2 through 20 in the lblEven control. … read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,109 satisfied customers
Assignment 3 Please start with this source code. Write a
Assignment 3 Please start with this source code.Write a program that opens the following text file and processes it contents. The program should display the following per store: The total sales for ea… read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,109 satisfied customers
OKPR114211 Does visual studio c++ has its own GUI (graphic
OKPR114211 Does visual studio c++ has its own GUI (graphic user interface) creator? or i have to use a different program?… read more
Steve
Steve
Consultant
Bachelor
69 satisfied customers
Windows 10 with Visual Studio 10. I have a project that
Windows 10 with Visual Studio 10. I have a project that compiles and builds on another machine. When I move the project to the Windows 10 machine, I get a message the "The project type is not supporte… read more
LogicPro
LogicPro
Computer Software Engineer
Bachelor of Technology
7,109 satisfied customers
I have a question related to C# I am using visual studio
Actual i am looking for solution to a programming question, which is available in c++ but not in c# … read more
Satchi
Satchi
Bachelor\u0027s Degree
2,102 satisfied customers
To C expert: How to convert my C source code to standard C
To C expert: How to convert my C source code to standard C source code so that it includes only standard C header files? My C source coding includes "CB.h", which is not an ANSI C standard C header fi… read more
Steve
Steve
Consultant
Bachelor
69 satisfied customers
I need help, microsoft visual studio 2012, i have a problem
i need help JA: What programs and versions are you using? Customer: microsoft visual studio 2012 JA: What is your ideal outcome? How can we solve this for you? Customer: i have a problem and you solve… read more
ATLPROG
ATLPROG
Computer Software Engineer
Master's Degree
7,677 satisfied customers
I have a SSIS 2014 Package created in Visual Studio 2013. I
I have a SSIS 2014 Package created in Visual Studio 2013. I have successfully performed a simple Data Flow from one table to another. I am now wondering how to apply additional logic: 1. Check for Exi… read more
Pete
Pete
Engineer
Bachelor\u0027s Degree
1,109 satisfied customers
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Show MoreShow Less

Ask Your Question

x