Normal Topic print report problem (Read 866 times)
debmckee
Full Member
***
Offline



Posts: 123
Joined: Oct 5th, 2011
print report problem
Oct 15th, 2012 at 10:10pm
Print Post Print Post  
I have set up a command button to print a report.  I set it up through code builder.  The button does not work!  If i go through the menu tree, the report prints.  I don't know what to look for to see why it does not work???  Everything looks fine in the program code when I look at it.
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: print report problem
Reply #1 - Oct 16th, 2012 at 2:25am
Print Post Print Post  
This is what Code Builder creates (and it works properly for me):
Code
Select All
var vTmp as String

	If @Mode() = 1
	{
		// This prints the report to HTML Preview with default settings.
		// See the documentation for @PrintAReport for other settings you can use.
		vTmp = @PrintAReport("My Report Name Here", 1, 1, 0, -1, -1, -1, -1, -1, -1)
	} 



Is this what you have (except for the report name inside the quotes)?
Is it in the button's On Element Entry event?
Do you have any unusual characters in the report name?
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
debmckee
Full Member
***
Offline



Posts: 123
Joined: Oct 5th, 2011
Re: print report problem
Reply #2 - Oct 16th, 2012 at 3:03pm
Print Post Print Post  
This is what my code says

var vTmp as String

     If @Mode() = 1
     {
           // This prints the report to HTML Preview with default settings.
           // See the documentation for @PrintAReport for other settings you can use.
           vTmp = @PrintAReport("Numerical", 1, 1, 0, -1, -1, -1, -1, -1, -1)
     }

The other report is called "alpha".  It works in every file, form, etc. except this one.
  
Back to top
 
IP Logged
 
debmckee
Full Member
***
Offline



Posts: 123
Joined: Oct 5th, 2011
Re: print report problem
Reply #3 - Oct 16th, 2012 at 3:47pm
Print Post Print Post  
Problem solved.
I had a / in the report name!

Thank you.
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: print report problem
Reply #4 - Oct 16th, 2012 at 4:04pm
Print Post Print Post  
Well, that looks like a pretty basic report name. I was feeling confident that you must have had something like a forward slash, backslash, or pipe character in your report name. These type of things will cause Code Builder to place an incorrect name in the code. Although, you can resolve it by manually correcting it in the Program Editor.

You didn't answer the second question. But assuming that it is actually in the button's On Element Entry event, I'm not sure where the problem lies.

Feel free email me a copy of the app, and I'll see if I can resolve it. If that creeps you out, I'm sure Ray would be willing to look at it.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: print report problem
Reply #5 - Oct 16th, 2012 at 4:12pm
Print Post Print Post  
debmckee wrote on Oct 16th, 2012 at 3:47pm:
Problem solved.
I had a / in the report name!

Thank you.


Ah, you must have posted while I was typing my last response. Glad you found it.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
debmckee
Full Member
***
Offline



Posts: 123
Joined: Oct 5th, 2011
Re: print report problem
Reply #6 - Oct 16th, 2012 at 4:36pm
Print Post Print Post  
Actually ray solved it..........he was putting some code in for me that was way over my head.....and I asked him look at this problem.

Everyone at Sesame support is pretty great.
  
Back to top
 
IP Logged